Refresh Problem

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

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

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.

hmm geee I never think of the simple answers