Query OpenGL to know if there are still commands on the queue

Igor Kravtchenko <[email protected]> Tue, 03 Oct 2006 01:53:24 -0800
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
Hi!

We have noticed some problems of render-to-texture in our application on 
some drivers (the texture remains
totally white).  After having investigated the code, I noticed it lacks 
a call to glFlush() before swapping double
buffer or releasing a pbuffer (used for the render-to-texture).

So at first, I just wanted to add a call to glFlush(), commit the code 
et voila.
The problem is we have a pretty rigorous QA that just forbids to commit 
any line of code if it's not
proved to solve a problem with an appropriate test code.

My idea was to find a way to query OpenGL and ask if there are still GL 
commands on the queue
just before swapping double buffer or releasing a pbuffer.  If yes make 
a call to glFlush().
I'm pretty confident it's a good thing to always make a glFlush() so 
this would be really just for the QA's
stuff.  Maybe, it's just not feasible anyway...

Any hint would be appreciated,

Igor.

----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

-- 
Author: Igor Kravtchenko
  INET: [email protected]

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).