Static Background

Blitz3D Forums/Blitz3D Programming/Static Background

23v(Posted 2004) [#1]
Hi,

Sorry to be a pain but I just want some advice on what is the best way to display a static background image (bitmap) which my 3D objects overlay

Regards,

Andy


_PJ_(Posted 2004) [#2]
Maybe with disabling the camera cls I think, with an image drawn before rendering

or load the bitmap as a sprite and parent this to the camera, entityOrdered to be behind everything else.


23v(Posted 2004) [#3]
Cheers for that, much appreciated.

Andy


Mustang(Posted 2004) [#4]
You might check out my menu example, it does that:

http://www.caffeineoverdose.net/cod/coding_coding.shtml

***Note that text command is notoriously SLOW, so copyrecting whatever graphics would be much faster.

Graphics3D 800,600,16,1


cam = CreateCamera()
CameraClsMode cam,0,1
MoveEntity cam,0,0,-5

light = CreateLight()
MoveEntity light,-10,10,-10

cube = CreateCube()
EntityColor cube,51,51,204
EntityAlpha cube,.75

y = -220: LineSpacing = 12: z = 0

Repeat

	Cls
	Z=Z+1
	Color 153,153,255
	Rect 40,y-10,345,250
	Color 0,0,92
	Rect 50,y,325,230
	
	If z=<40 Then
	Color 153,153,255
	Rect 50,y+62,9,10
	EndIf
	If z=80 Then z=0
	
	y = y+1
	If y > GraphicsHeight() Then y=-220
	
	Color 153,153,255
	w=6
	
	Text 50,(LineSpacing*0)+y,"    **** COMMODORE 64 BASIC V2 ****"
	Text 50,(LineSpacing*2)+y," 64K RAM SYSTEM  38911 BASIC BYTES FREE"
	Text 50,(LineSpacing*4)+y,"READY"
	Text 50,(LineSpacing*w+1)+y,"PRESS 'ESC' TO GET BACK TO THE NENU"
	
	TurnEntity cube,2,1,.5 
	RenderWorld				
	
	Flip
	
Until KeyHit (1)



Rob Farley(Posted 2004) [#5]
I would suggest using a 3d sprite or creating a quad, setting the entity order to draw before everything else and parent it to the camera.

There is sometimes a problem mixing 2d and 3d, and some graphics cards don't like it.