CameraClsMode() behaving differently fullscreen

BlitzMax Modules Forums/MiniB3D/CameraClsMode() behaving differently fullscreen

There is quite a nice 'free' blurry-trails effect that you can get in B3D by having a semi-transparent background object and fiddling with CameraClsMode(). I was quite chuffed to see that MiniB3D behaves in the same way, only it doesn't if you go from windowed mode to fullscreen (instead there's just a dark background with no after-image).

I'm aware that this might not technically be a bug as OGL and DirectX may simply operate differently (or the effect may be driver-dependant). But as the idea with MiniB3D is to clone B3Ds functionality I thought I'd mention it. Example below:

SuperStrict
Framework sidesign.minib3d

Select Proceed("Fullscreen mode?")
	Case 0
	Graphics3D 800,600,0,2

	Case 1
	If GraphicsModeExists(800,600,32)
		Graphics3D 800,600,32,1
	Else
		Notify "Can't set 800x600x32"
		End
	EndIf
	
	Default
	End
End Select
HideMouse()

Local cam:TCamera = CreateCamera()
CameraClsMode cam,False,True

Local light:TLight = CreateLight()
PositionEntity light,100,100,-100

Local background:TSprite = CreateSprite(cam)
EntityOrder background,10
EntityAlpha background,.1
PositionEntity background,0,0,1

Local cube:TEntity = CreateCube()
Local cubeModX:Int = 0
Local redMod:Int = 0
Local blueMod:Int = 0
Local greenMod:Int = 0

While Not KeyHit(KEY_ESCAPE)
	cubeModX:+1
	redMod:+1
	blueMod:+2
	greenMod:+3
	PositionEntity cube,Cos(cubeModX)*4,0,6
	EntityColor cube,Abs(Cos(redMod))*255,Abs(Cos(greenMod))*255,Abs(Cos(blueMod))*255
	TurnEntity cube,1,2,3
	
	RenderWorld
	Flip -1
	Delay 1
Wend


You can never count on the backbuffer remaining in place after a flip...

On some video cards the screen will be automatically cleared, and on others you may either see the previous frame, or whatever was on the screen 2, 3, or 4 frames ago. (Which leads to horrible flickering and jumping around.

Different video card drivers treat the backbuffers differently, and may recycle anywhere from 0 to 4 or more of them. As you found out, even full-screen and windowed don't behave the same on all computers...

bottom line: Don't count on the backbuffer showing the previous frame, ever. Many, many computers will return unpredictable results.

Thought it might be that -- I did think that the whole point of CameraClsMode() was to provide a measure of control, though. :/ Oh well.