OpenGL child windows (SketchUp)
thunderbird2k at gmail.com
Fri Feb 10 00:00:02 CST 2012
On Wed, Feb 8, 2012 at 2:42 PM, Brian Bloniarz <brian.bloniarz at gmail.com> wrote:
> On Wed, Feb 8, 2012 at 12:33 PM, Roderick Colenbrander
> <thunderbird2k at gmail.com> wrote:
>> On Wed, Feb 8, 2012 at 6:31 PM, Matteo Bruni <matteo.mystral at gmail.com>
>> > I'm not really such an expert in the area, but I think both (1) and
>> > (2) make sense. I'm not sure in (1) case about the glXWaitGL call, as
>> > technically glXSwapBuffers is not a GL call, but given that it works
>> > for you (while XSync doesn't) on Nvidia, I guess it's fine... Make
>> > sure it works correctly on all the drivers you mentioned, or even that
>> > e.g. it doesn't cause excessive slowdowns.
>> glXWaitGL and friends were intended for syncing GLX and X, so this may
>> be the most reliable way. As you pointed out there may be bugs in DRI,
>> but this needs a careful read of the specs (will try to look at it).
>> As you said the damage extension can be used as well, but I think I
>> would lean to using the classic glX/X synchronization features first.
> Thanks for looking, both of you!
> I'm looking at the GLX1.3 spec at:
> "Sequentiality" has:
> "glXSwapBuffers is in the OpenGL stream if and only if
> the display and drawable are those belonging to the calling thread's
> current context; otherwise it is in the X stream."
> That would put our glXSwapBuffers in the OpenGL stream,
> and hence something that should be serialized by a call
> to glXWaitGL(). I wouldn't test it in court though :)
> Whatever the approach, I'd be happy to test and/or benchmark
> on the 4 renderers I have access to.
A patch like this is what should do the job. I'm not sure what the
penalty will be. Remember glXSwapBuffers already performs a glFlush,
so a glXWaitGL on top of that may not be too bad.
I can't quickly think of a good test application. You would like a
game or some benchmark, but I can't think of anything stressful now
which uses a child window (an application which has a menu bar,
doesn't use a child window). Google Earth always was a good test.
We need to figure out if the DRI drivers are indeed buggy. I will see
if I have time to look at it, but my time is very limited these days
More information about the wine-devel