1
Graphics / Partially solved
« on: December 24, 2008, 05:18:39 pm »
I found why the ball was moving outside the screen
With high framerates ball movement step is so small that sometimes it stays in zone where angle recalculation (bounce) is made and it recalculates the angle even it is not needed. So I rounded ball position to window width/height (depends where the bounce happens) each time when it's more or equal to boundaries.
But framerate with vertical sync enabled still is very jumpy. Perhaps it's graphics driver related stuff?
And I got another question:
Is there some way to continue doing stuff (draw frames, loop etc.) while window is moved across desktop?
With high framerates ball movement step is so small that sometimes it stays in zone where angle recalculation (bounce) is made and it recalculates the angle even it is not needed. So I rounded ball position to window width/height (depends where the bounce happens) each time when it's more or equal to boundaries.
But framerate with vertical sync enabled still is very jumpy. Perhaps it's graphics driver related stuff?
And I got another question:
Is there some way to continue doing stuff (draw frames, loop etc.) while window is moved across desktop?