PDA

View Full Version : glut and event managing



spoootnic
12-28-2000, 03:15 AM
I'm very new to glut and gl; I've a problem
with the event managing of glut; I would like to draw
polygons in a window: I would like to make some calls
to a polygon subroutine at different moment of time
(which i don't know since it's kind of random calls)
in order to draw some polygons in my windows.
But since there's this event managing (MainLoop)
I cannot have access to the windows as i would like.

If someon could explain me a way to go
through this problem..

Deiussum
12-28-2000, 05:49 AM
How do you determine what moment in time you need to draw? There are a couple of options. There are callback functions you can use for Glut to call on certain events. Two you might want to look at are the idle function or the timer function. If your event is at regular intervals, you could use the timer callback. The idle function is called when nothing else is being done, so you can also use that to do whatever you need to do to determine if you need to draw.