fullscreen graphism problem

Blitz3D Forums/Blitz3D Beginners Area/fullscreen graphism problem

DeadSquirrel(Posted 2004) [#1]
Never noticed this problem before, it doesn't have much importance, but I'm curious to know why it's happening.

When moving a certain graphism around on the screen, if you do not use cls to clear the preceding frames, you "paint" the graphism on your screen.
In the windowed mode, these "painted" graphisms look normal.

The problem is, when I go to fullscreen mode, no matter what resolution, the "painted" graphism start shuttering.
Looking at the code, it's not logic for it to shutter the way it does.... so I was wondering if it's my video card (geforce4MX), or if there's another explanation for it, if so, is it fixable without using any workarounds?

simple example of code:
Graphics 800, 600
While Not KeyHit(1)
	SetBuffer BackBuffer()
	Color 255, 0, 0
	Text MouseX(), MouseY(), "Test"
	Flip
Wend
End


Thanks for any insight :)


Neo Genesis10(Posted 2004) [#2]
You arent clearing the background each frame, so you see the redrawn graphic as well as the previous ones. Use the Cls command in place of the SetBuffer command. Place SetBuffer outside of the loop. like so:
Graphics 800, 600
SetBuffer BackBuffer()

While Not KeyHit(1)
	Cls
	Color 255, 0, 0
	Text MouseX(), MouseY(), "Test"
	Flip
Wend
End
Blitz does not automatically clear the buffer when you set buffers. This allows you more control over when and how it is cleared. The reason for the flicker is because the backbuffer (invisible) is drawn to and then flipped to become the frontbuffer (viewable). The items drawn to each buffer may and probably will differ, so your screen is alternating between two different images.