PDA

View Full Version : Refresh Problem



suresh kannan
03-20-2001, 05:08 AM
Hi,
I used outline fonts to display text at various locations.

for example "Text1" at location (30,30)
"Text2" at location (60,60) and

i am using glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
option.

It took some time to clear the color buffer. So it is looking like flicker on the screen. How i can avoid it?. If i removed the GL_COLOR_BUFFER_BIT it is working fine. But when i am displaying text "text3" at location (30,30), the "text3" is superimposed on the text "text1".

Thanks,
Kannan

DaViper
03-20-2001, 05:27 AM
the GlClear call blocks the graphic pipeline untill it is finished you should avoid all drawing calls soon after a glClear, do some calcualtions or other stuff.

thats the only thing i can say to this topic
Chris

Relic
03-20-2001, 09:31 AM
You see the flicker because you're working on the front buffer. Select a double buffered pixelformat, render in the backbuffer and do a SwapBuffers().
By this you don't see the clear and drawing happening on your screen but only the final image.

DaViper
03-21-2001, 12:43 AM
hmm geee I never think of the simple answers http://www.opengl.org/discussion_boards/ubb/smile.gif