|
Post by ptrxyz on Mar 21, 2007 18:21:11 GMT -5
!Problem solved. Solution at end of post.!
my program should run in fullscreen and in windowed mode. In windowed mode, i graphics.fps returns a value around 1000, at this, my program runs quite fine. if i switch to fullscreen, the framerate decreases (as expected). i thouhgt it should be limited by my screen, but i get a value around 120 which definitly isnt the refresh rate of my notebook-tft (-> should be 60). so, to make the program run as fast as it should, no matter if windowed or not, i used the graphics.setfps(50) command. now i expected a value of 50 for both, windowed and fullscreen mode. but nothing chaged! i still have values of around 1000 fps (window) and 120fps (fullscreen).
My program looks like this (..just main parts..):
sub main () if (graphics.initialize(640,480,false) <> True) then exit sub graphics.setfps 50
do while running=true makeit() write_fps_with_graphics_dot_fps(); loop
end sub
can anyone help?
!Problem solved. Solution at end of post.!
!Solution!
The command "graphics.SetFPS 50" needs to be put into the main loop...this works well:
do while running=true makeit() write_fps_with_graphics_dot_fps(); graphics.setfps 50 loop
|
|