I have a rectangle moving across the screen, left to right. Nothing fancy.
When I create my device with a size of 800 X 600 for the window, my rectangle moves across the screen at a reasonable rate.
When I create the device with a size of 1200 X 1000, the rectangle moves across the screen at probably 1/2 to 1/3 the rate compared to when the size was 800 X 600.
Here is the code:
Code: Select all
while(device->run() && driver)
if (device->isWindowActive())
{
driver->beginScene(true, true, video::SColor(255,100,101,140));
driver->draw2DImage(rect1, core::position2d<s32>(xpos,ypos),
core::rect<s32>(0,0,256,128), 0,
video::SColor(255,255,255,255), true);
xpos++;
env->drawAll();
driver->endScene();
}
It's as if my while loop is looping slower while the bigger window...which would increment xpos slower and thus move the rectangle slower across the screen.
BTW, the while loop is being entered on every iteration, I've checked, therefore, xpos is getting incremented on every iteration.
I realize with a bigger wiindow there is more to update which may slow down the while loop, would that be the reason?
Comments?