Irrlicht related timing issues (screen shaking)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
StefanB

Irrlicht related timing issues (screen shaking)

Post by StefanB »

Look at this, they are times that Irrlich rendering (driver->beginScene(..); smgr->drawAll(); env->drawAll(); driver->endScene();) each everyframe.

irr: 0.016010
irr: 0.016085
irr: 0.029230 <-
irr: 0.007414 <-
irr: 0.011154
irr: 0.016205
irr: 0.016091
irr: 0.023851 <-
irr: 0.007928 <-
irr: 0.016249
irr: 0.016026
irr: 0.016055
irr: 0.016083
irr: 0.016041

Average frame time is about 16 ms. But then every now and then Irrlicht rendering takes about 10 ms longer. And the next frame it takes about 10 ms less time. This happens one or two times a second and in some places it goes more wild.

This causes screen to jump everytime. Why is Irrlich doing that? The amount of time this frame takes to process is the delta time for physics in next frame. I don't really know how I should solve this. If I use constant 16ms every frame for physics then there is no jumping and moving is smooth (even though there is still those jumps in Irrlicht rendering time).

I though some kind of adaptive frame time could be solution. Frame time is kept about constant, only small changes are made to adjust so that processed time progresses in real time.

I have tried this with Irrlicht timer, GetTickcount and QueryPerformanceCounter, same problem with all of them.
dingo
Posts: 95
Joined: Tue Mar 09, 2004 5:02 am
Location: Brisbane, Australia
Contact:

Post by dingo »

I don't really know the answer but if I was you I'd look to see if some memory is being allocated within the draw loop or if some array is being resized, or file being read in or massive memory moves etc every frame
-= Want your C code to control real life robots? www.users.on.net/~symes =-
Post Reply