What does this mean

A scene renders at about 20FPS on my GT 430 using JOGL. But when I look at the milliseconds per frame I see this:

57,48,50,46,50,49,108,46,46,1,89,1,48,90,46,1,48,90,1,48,90

This is milliseconds between the times the display() method is called. How can a scene that renders on average at 50ms per frame sometimes get done in 1ms? It doesn’t matter how crazy I make the scene, I still get 1ms frames.

Does the renderer just repeat the last result if called too soon after a previous call? With a 1ms gap there would be no point in recalculating the screen.

Depends on how your game loop works.

Yeah this sounds like a flaw in your game loop code.

With my code, a bug is always the most likely explanation, but I can’t see it in this case. Everything is happening inside the display() method, and the display method does the same display logic each frame. The only thing that changes is the camera position, which flies in a loop…

Please show us some source code. Maybe there is something obvious that we are missing. Do you use NEWT or something else? Which kind of animator do you use? Are you under Windows? Do you use the famous hack to force the use of the high precision timer (ra4king already posted it in this forum)? Do you use the latest autobuild of JOGL 2.0? What is the version number of your driver?

Edit.: Maybe use vertical synchronisation and/or FPSAnimator. If it is still too slow, you will need some kind of (frustum, portal, contribution, …) culling and spatial subdivisions.

Edit.2: It looks like you simply don’t use the high precision timer. If I were you, I would just solve this problem and enable vertical synchronisation.