Screensaver Problem

Blitz3D Forums/Blitz3D Beginners Area/Screensaver Problem

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

As above with this addition:
Function ExecuteScreensaver()

	; Set graphics mode
	Graphics3D 640, 480
	SetBuffer BackBuffer()

	; Clear the key and mouse buffers
	FlushKeys 
	FlushMouse
	; Position the mouse so we can check if it moves
	MoveMouse 0, 0

	; *----* CODE ADDITION *----*
	cam = CreateCamera()		; Create a camera so we can 'see' the 3D cube
	cube = CreateCube()		; Make a cube
	EntityColor cube, 255, 0, 0	; Make it a red cube
	PositionEntity cube, 0, 0, 2	; Position the cube ahead of the camera
	Repeat 
		TurnEntity cube, 1, 1, 1; Turns the cube around
		Renderworld		; Renders all 3D items through visible cameras
		Flip			; Flips the buffers so we can see the results

	; The line below just checks to see if a key has been hit or the mouse moved.
	Until MouseX() <> 0 Or MouseY() <> 0 Or GetKey() <> 0 Or GetMouse() <> 0 
	End 
End Function
Get to grips with the individual commands and, more importantly, how they fit together to form a program. Once you learn the basic structure of a program, the rest just falls into place.