Blitz+ Graphic Example

Blitz3D Forums/Blitz3D Beginners Area/Blitz+ Graphic Example

Apollonius(Posted 2003) [#1]
This is the example:
;GRAPHICS Example

; Set The Graphic Mode
Graphics 800,600

; Now print something on the graphic screen
Text 0,0, "This is some text printed on the graphic screen (and a white box)!  Press ESC ..."

; Now for a box
Rect 100,100,200,200,1

While Not KeyHit(1)
Wend

Which doesnt work really, it doesnt show the text nor the rectangle,but this works:

;GRAPHICS Example

; Set The Graphic Mode
Graphics 800,600,32,2

; Now print something on the graphic screen
Text 0,0, "This is some text printed on the graphic screen (and a white box)!  Press ESC ..."

; Now for a box
Rect 100,100,200,200,1

While Not KeyHit(1)
Wend


Why I don't get it?


smilertoo(Posted 2003) [#2]
something to do with window mode double buffering?


Andy_A(Posted 2003) [#3]
Kaisuo,

What John was alluding to, is that you need a "SetBuffer BackBuffer()" statement after setting the resolution.

Every time you want to see the updated graphics, you need use the "FLIP" command.

Graphics 800,600,32,2
SetBuffer BackBuffer()

....draw stuff on the screen
Flip ;make it visible

WaitKey()

End