Re: GLSL + 6800 + Multiple steps by frame

Anteru <[email protected]>
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
You need to call glFinish (), not glFlush (). glFlush () means that all 
commands are passed to OpenGL for processing - not that the processing 
has finished (for example, if you use OpenGL via Network, glFlush () 
send all commands in a packet). glFinish () on the other hand does wait 
until the rendering has finished.

Cheers

Matthäus Chajdas

Rhadamés Carmona schrieb:
> Hello Everybody
> 
> I am programming with 3D textures and GLSL. At some point, I was interested 
> in making 2 renderings in one frame, for comparrison...
> 
> void DrawScene()
> {
>   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
>   Render();
>   glFlush();
>   ReadFrameBuffer(A);
>   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
>   Render();
>   glFlush();
>   ReadFrameBuffer(B);
>   difference = B-A;
>   // Do something with difference, here!....
>   glFlnish();
>   glutSwapBuffer();
> }
> 
> The second rendering is not correct... I get a mess. But, If I put an 
> Sleep(200) after every glFluch, everything is ok!.... Coudl you give me any 
> clue about what the hell is goiing on?
> 
> Cheers Guys!
> 
> Rix
> 
> Note: I am using latest drivers.... 
> 
> ----- 
> FAQ and OpenGL Resources at:
>   http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
> 
----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

-- 
Author: Anteru
  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).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.