SFML community forums
Help => Window => Topic started by: RaptorIV on February 13, 2012, 11:59:35 pm
-
I recently updated my game engine with SFML 2.0 and after updating for all the API changes and compiling, I noticed a drastic drop in framerate (Before it was capped at 30fps, not I get 7-9 fps). I've tried commenting large sections of code just to see if it may be causing the framerate drop, but the only thing that makes a difference is if comment my Window.Clear(), Window.Draw() loop, and Window.Display() all together. Just commenting one (I.E. just the Draw loop) doesn't make any change.
The Frame is drawn in a separate thread.
Compiling on Windows 7 64bit (32bit exe) Intel Core i7-2600k
Any reason why this may be happening?
-
Do you compile your code with DEBUG mode or RELEASE mode?
-
debug
EDIT
Just tested, release build has the same framerate
-
Right now I am calling the Render thread in the main thread when it is not running, I changed it to call the render thread once and have a while Window->IsOpen() in the render thread. This restores framerate but causes the program to not respond.
-
Are you handling events? Sounds like a infinite graphics loop without event handling and no VSync.
-
Events are handled in the main thread and graphics are handled in a separate thread.
-
Also, graphics are not drawn in a a while loop within the graphics thread, the graphics thread is perpetually launched from the main thread.
-
Sorry to keep bumping, but:
Is it better to call the render thread over and over from the main thread, or to call it once and have a while loop in the render thread?
-
Please Help?! I am also having this problem, essentially the exact same thing! any help would be much appreciated.