Archived

This topic is now archived and is closed to further replies.

HardSniper

text to the screen

Recommended Posts

I am attempting to draw some text to the screen, wait a few seconds, clear the screen, and draw some more text to the screen. I can''t get it to work. I can make the both pieces of text appear at the same time though. Basically I''m trying to do it this way, but with real code: clear screen / buffer; reset the view; draw the first text; wait a few seconds; clear screen / buffer; reset the view; draw more text; I get nothing but the background out of that code... HardSniper

Share this post


Link to post
Share on other sites
Im not sure how you are drawing the text, but i dont think you would need to reset the view, just clearing the buffer would be sufficent.

You should check into GLF, you can do a search on google to find it.

Share this post


Link to post
Share on other sites
I'm drawing the text just as NeHe did it in text tutorials using units instead of pixels. I'll try leaving out the resets... It's on my professor's comp. I'm looking into GLF now...

HardSniper

Edited by - HardSniper on November 6, 2001 7:33:05 PM

Share this post


Link to post
Share on other sites
Use a timer function to activate the text at different intervals i.e.

pseudo code (cant remember the C code for it)

global variable:

int text_piece;

inside DrawGL:

if(timerElasped()>100){
text_piece++;
timerReset();
}

switch(text_piece){
case 1:
glPrint(..
case 2:
glPrint(..

This code would draw a new piece of text every 100 seconds

Share this post


Link to post
Share on other sites