Interface
02-07-2008, 06:56 PM
My new OGL app has a strange behaviour pattern.
For the first few seconds, the FPS of the drawing loop is horrible, and the animation on-screen is noticeably slow (jerky - it is frame independent animation).
Then it improves to what one would expect and it performs like that for the rest of the lifetime of the process.
The more vertices/faces i have on screen, the longer it takes for the "slowness" to go away.
(If you want numbers, looking at ~30 seconds for 4 models of 13214 faces and 1014 vertices each, and ~10 seconds for 4 models of 4221 faces and 515 vertices each.)
The FPS jumps from 4 to 60(=vertical refresh, i tried disabling that but issue remains).
Other OGL apps I have written do not have this behaviour, and it is not computer-specific either.
I've narrowed it down to the call to glDrawElements() (i'm using vertex/normal arrays).
I've tried disabling pretty much all features (depth, color, lighting) with solely a vertexarray enabled for the call to gldrawelements. I've tried getting rid of animations /rotations / translations all together leaving nothing but the camera modelview, to no avail.
I guess i'm not exactly looking for an answer from these message boards but hopefully some suggestions as to what else i could try. The only thing i could see is some strange difference in initialization between my other apps and this one, but i can't really understand the reasoning behind that.
Either way i'll look into that and hopefully with some suggestions from this board i will find the answer.
For the first few seconds, the FPS of the drawing loop is horrible, and the animation on-screen is noticeably slow (jerky - it is frame independent animation).
Then it improves to what one would expect and it performs like that for the rest of the lifetime of the process.
The more vertices/faces i have on screen, the longer it takes for the "slowness" to go away.
(If you want numbers, looking at ~30 seconds for 4 models of 13214 faces and 1014 vertices each, and ~10 seconds for 4 models of 4221 faces and 515 vertices each.)
The FPS jumps from 4 to 60(=vertical refresh, i tried disabling that but issue remains).
Other OGL apps I have written do not have this behaviour, and it is not computer-specific either.
I've narrowed it down to the call to glDrawElements() (i'm using vertex/normal arrays).
I've tried disabling pretty much all features (depth, color, lighting) with solely a vertexarray enabled for the call to gldrawelements. I've tried getting rid of animations /rotations / translations all together leaving nothing but the camera modelview, to no avail.
I guess i'm not exactly looking for an answer from these message boards but hopefully some suggestions as to what else i could try. The only thing i could see is some strange difference in initialization between my other apps and this one, but i can't really understand the reasoning behind that.
Either way i'll look into that and hopefully with some suggestions from this board i will find the answer.