OK, your replies seem to rule out my initial guesses. That leaves your drawing code.
Check for redundant loading of textures, or repeated calling of initializing/state setting code.
Also using direct mode (as opposed to using display lists) can be much slower.
Without better indication of the heavily used areas in your application it is quite difficult to give additional general advise.
BTW, before switching to GLUT I used the following main loop (based on NeHe’s tutorials):
while(!done){
if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE)){
// handle windows messages
if( msg.message==WM_QUIT){
done=true;
}else{
TranslateMessage( &msg);
DispatchMessage( &msg); // this will activate WindowsEventCB if necessary
}
}else{
// do some work
if(myKBHandler.GetKeyStatus(VK_ESCAPE)){
done = true;
}else{
if( !pause){
myGLContext.DrawGLScene();
}
}
}
}
Jean-Marc
[This message has been edited by JML (edited 02-21-2002).]
I too have noticed in some glut programs, that if I hold a button down, the fps increases quite a bit. I think the Sphere dot(draws a sphere with dots and tells you dots per second) program in downloads from nehe does this.