Screen Fade

BlitzMax Forums/BlitzMax Programming/Screen Fade

as I suspected, this takes around 200ms in windowed mode and longer in full-screen mode. Weird thing is if I do it when my game framework has been running it only takes 50-70ms, can't explain that! Maybe the system is still doing stuff when this demo first runs... I'll try it waiting for a keypress first.

Strict
Graphics 800,600,0

Cls
DrawRect(100,100,100,100)
Flip

Local start = MilliSecs()
Local temp: TImage = CreateImage(800, 600)
GrabImage(temp,0,0)
SetImageHandle(temp,0,0) 'in case AutoMidHandle is true
DebugLog MilliSecs() - start



[edit] OK, with this after the flip it brings the full-screen back in line with the windowed mode time of 200ms. Bear this in mind when writing benchmark apps that the systems needs to be "ready" before you start testing.

While Not KeyHit(KEY_SPACE) Wend