wxOgre FPS

saladin

26-06-2007 14:14:46

Hi,

In my project I'm using wxPython to create a window and then pass the handle to ogre as its render window just like in the demos. All the resizing, redrawing and events handling are done with wxPython. wxTimer class raises an event which tell the scene to update as well as calling renderOneFrame() by a certain interval.
It works well but I noticed I can't seem to get a frame rate higher than 65 fps even when the polygon count is really low. On the same machine if I let python-ogre's mainloop render the same scene, the fps is around 300.

I tried changing the timer interval to smaller. However that did nothing in terms of helping the scene to update more often ... it only changed the value associated with the timer event. Tried turning of v-sync in my video card settings too. That didn't help either.

Could it be that a wxWindow cannot redraw more often than 60 times per second?

I'm wondering if anyone can shine some light on this.

saladin

26-06-2007 23:01:12

Instead of binding the update function to the timer, I bound it to wx.EVT_IDLE , that seems to have things working a lot more smoothly. Needs more testing though. Plus now whenever there's an event, ogre just stops rendering...

Game_Ender

28-06-2007 06:54:00

Around 60 times per second is an event every 16 ms. I think accuracy will start to suffer when you try and trigger a timer with a smaller step than that.

saladin

29-06-2007 00:47:38

Around 60 times per second is an event every 16 ms. I think accuracy will start to suffer when you try and trigger a timer with a smaller step than that.
Yeah I recon. I'm not too worried about it now.