Simple Question; I HOPE!

Blitz3D Forums/Blitz3D Beginners Area/Simple Question; I HOPE!

Stede(Posted 2003) [#1]
I have a 3D object spinning around the center of my 800 x 600 resolution screen. Instead of a black background I would like to stick a bitmap image (also 800 x 600) as the background.

What is the fastest way to do this?

Thanks,
Stede


jfk EO-11110(Posted 2003) [#2]
check cameraclsmode and use drawblock to put the background img on screen, then renderworld and flip.


Stede(Posted 2003) [#3]
Is this the proper way?

Graphics3D 800,600
SetBuffer BackBuffer()

camera=CreateCamera()

CameraViewport camera,0,0,800,600
CameraClsMode camera, False, True

light=CreateLight()

stede=LoadMesh("stede.x")
background=LoadImage("background1.bmp")

PositionEntity stede, 0, 0, 10

d# = 0

While Not KeyHit(1)

RotateEntity stede,0,d,0
d# = d# + 1
DrawBlock background, 0, 0
RenderWorld
Flip

Wend

End

Stede


WolRon(Posted 2003) [#4]
I dont see an UpdateWorld in there, but otherwise it looks like what you want.


jfk EO-11110(Posted 2003) [#5]
Personally I prevere to draw 2D first, then calculate 3D, then render it:

While Not KeyHit(1)
DrawBlock background, 0, 0
RotateEntity stede,0,d,0
d# = d# + 1
RenderWorld
Flip
Wend

But it really doesn't matter. Did it work? Then it's ok :)


GfK(Posted 2003) [#6]
I dont see an UpdateWorld in there, but otherwise it looks like what you want.
Why would he need UpdateWorld? He isn't doing animation or collisions.


Stede(Posted 2003) [#7]
You guys are the best. Thanks for all your help,

Stede