Here's some code that perfectly illustrates it.
On the system I'm using at the moment (P4 2.2GHz, 32MB shared video RAM, 736MB RAM) that tells me that Flip is taking 8 millisecs, while the drawing takes 0. Debug mode off.
If I increase the number of rectangles to draw to 10, the drawing time remains 0 while the Flip increases to 34. 100 rectangles, you get a draw time of 0, a flip time of 292.
It's a strange result, as though everything's just waiting to be drawn at the flip instead of drawn to the backbuffer when I call DrawRect().
Edit: Which Dreamora seems to be pretty much confirming. Aha!
This does make it difficult to isolate which drawing commands are particularly slow, however. It seems I can't "time" anything individually, as they'll all come up pretty quickly and the effects won't show until flip.
Still, nice to know how Flip works.
SuperStrict Graphics 800,600, 0, 0 SetBlend alphablend While Not KeyHit(KEY_J) Cls 'Draw Local start:Int = MilliSecs() For Local count:Int = 1 To 1 DrawRect 10, 10, 600, 480 Next Local endtime:Int = MilliSecs() Print "Draw Time: "+(endtime - start) 'FLIP Local flipstart:Int = MilliSecs() Flip -1 Local flipend:Int = MilliSecs() Print "Flip Time: "+(flipend - flipstart) Wend
On the system I'm using at the moment (P4 2.2GHz, 32MB shared video RAM, 736MB RAM) that tells me that Flip is taking 8 millisecs, while the drawing takes 0. Debug mode off.
If I increase the number of rectangles to draw to 10, the drawing time remains 0 while the Flip increases to 34. 100 rectangles, you get a draw time of 0, a flip time of 292.
It's a strange result, as though everything's just waiting to be drawn at the flip instead of drawn to the backbuffer when I call DrawRect().
Edit: Which Dreamora seems to be pretty much confirming. Aha!
This does make it difficult to isolate which drawing commands are particularly slow, however. It seems I can't "time" anything individually, as they'll all come up pretty quickly and the effects won't show until flip.
Still, nice to know how Flip works.