PDA

View Full Version : Constant speed gl query



kcgl
03-01-2001, 01:41 AM
I am currently reworking the sample race code provided with opengl, to now support drawsprockets(fullscreen opengl), inputsprockets, texture mapping, alpha blending etc. and replace the buildings included to allow the user to walk around them, look through windows etc. Because of this, the polygon count can get quite high at times - hence the speed of the game decreases. Does anyone know of a way to keep game speed constant, by allowing opengl to drop/skip frames, or is it just a matter of reducing my poly count? This would be very helpful as at the moment, if the scene is complex, all the users actions become slower.
Thanks.

phenotic
03-01-2001, 09:28 AM
I'm not sure this will work for you but I found it on the net.
http://nate.scuzzy.net/gltut/

Look under the timers header.

cheers

DJ Tricky S
03-01-2001, 11:56 AM
The best way to do this is to track velocity and time for your game objects. Then when your rendering starts to lag, the game objects still move correctly with time, since their position at rendering time is based on their last position + velocity * delta time.