This doesnot work right!

Blitz3D Forums/Blitz3D Beginners Area/This doesnot work right!

I see 10, but it's for the same reason as this program "drawing" a yellow line instead of just a box at the mouse pointer:
Graphics 800,600,16

Global mouseimage = CreateImage (10,10)

SetBuffer ImageBuffer(mouseimage)
Color 255,255,0
Rect 0,0,10,10,1

SetBuffer BackBuffer() 

While Not KeyHit(1)
	;Cls
	DrawImage mouseimage,MouseX(), MouseY()
	Flip 
Wend
End 


Notice that the Cls is commented out as yours is in your example. The problem is that even though you are flipping the buffer, you're not clearing the flipped buffer. So the buffer flips to the back with whatever was on it to begin with. In your loop, the buffer is carrying the rectangles with it that have already been drawn on the buffer. You have to cls the buffer. I'm not sure if the clearing is dependent on video card or not.. Maybe some clear automatically when flipped to the back buffer, and other's don't.