Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / GL Screen Flickering? Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
w4rPh3ous

March 26, 2005, 11:32 AM

Hi,

Heres another question....

This aught not to be such a tough one but ill still try and explain it...

I added text to my Heightmap engine...I made the function "RenderFont()"
and it sits in text.cpp... I finally got it to work displaying text using "glDrawText(x, y, string);" within the function "RenderFont()" but when i run the programme the screen flickers on fullscreen and window mode?

What can that possibly be....Any help will be greatly apreciated!!

cheers dudes!

 
Reedbeta

March 26, 2005, 12:27 PM

What is glDrawText? That is not a native OpenGL function, it must be coming from some 3rd-party library.

 
Chris

March 26, 2005, 12:59 PM

I guess your "glDrawText" comes from some library that uses gl-like names (which it really shouldn't) and it simply uses GDI to render the string. But GDI renders to the front buffer, et voilą, flickering.

 
w4rPh3ous

March 26, 2005, 03:49 PM

The glDrawText is something i programmed myself....

It worked before, when I called the glDrawText in "void RenderScene()" but then i made a function "void RenderFont()" to clean up the programme a bit more and now when i run the programme the whole programme flickers, not just the text. The text shows...

I got the glDrawText idea from a tutorial...

 
Vast

March 26, 2005, 04:35 PM

mabe u are clearing the color buffer bit somewhere accidentaly (twice)?

 
w4rPh3ous

March 27, 2005, 02:52 AM

That was a good one of Vast, I was clearing it twice in main.cpp and in text.cpp but it still doesnt help.

Any more advice and tips would be greatly apreaciated!!!

 
w4rPh3ous

March 27, 2005, 07:27 AM

Dont worry, I GOT IT!!!

There was a problem of the swapping of the buffers! :/ Then all that i had to to was initialize it where it swapped the buffers around in another part of the code... Thats probably bad and it does make the programme considerably slower! But ill try and fix that later at a later stage!

Im trying to teach myself(with use of internet)programming, so i kinda gotta do it like trile and error!

Oh well, but Vast got me thinking!! U have no idea how much i learned during this headache fest!

Thanks!

 
This thread contains 7 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.