petrSchreiber / BetweenTheBubbles-tb

Bugs adventure in an infinite bubbleverse, thinBasic game
1 stars 0 forks source link

FPS Question #10

Closed DirectuX closed 4 years ago

DirectuX commented 4 years ago

https://github.com/petrSchreiber/BetweenTheBubbles-tb/blob/2448a4ba78c7159cb3efa2a17ad43813004b6596/src/BetweenTheBubbles.tbasic#L28

petrSchreiber commented 4 years ago

Good questions!

DIM maxFrameRate AS LONG = TBGL_GetVSyncMaxFrameRate()

WHILE TBGL_IsWindow( hWnd ) ' -- Rendering loop start

FrameRate = TBGL_GetFramerate ' -- Retrieve FPS

' -- Condition, if FPS should be more than max, turn VSync on, else off TBGL_UseVSync IIF( FrameRate < maxFrameRate , 0, 1 )

' ... rendering here ...

WEND ' -- Rendering loop end

DirectuX commented 4 years ago

all ok !

DirectuX commented 4 years ago

added to the BTB.cts roadmap !

petrSchreiber commented 4 years ago

Thank you!