Elementary..so I thought.. Just trying to vary the back color.. simple: use the ClsColor/Cls combination ..oops..
I obviously do not understand some basic concept with B3D..
code:
Graphics3D 1024,768,16,2
SetBuffer BackBuffer() ;<--- Build in backbuffer
ClsColor 255,0,0 ;red ;<-- next cls sets curr buff to clr
Cls ;<--- set the backbuffer to red
cam=CreateCamera()
cube=CreateCube()
light=CreateLight(1,cam)
PositionEntity cam,0,0,-5
;CameraClsColor cam,255,0,0 ;<---- must have ???
While Not KeyDown(1)
TurnEntity cube,.500,.000,.0
If KeyDown (208) MoveEntity cam, 0, 0, 0.1
If KeyDown (200) MoveEntity cam, 0, 0, -0.1
UpdateWorld()
;WaitKey() ;<------ screen is red before render
RenderWorld() ;<---- turns black ???
;WaitKey()
Flip
If KeyDown(203) TurnEntity cam,0,3,1
If KeyDown(205) TurnEntity cam,0,-3,-1
Wend
End
====
In Playing with it..
the RenderWorld shows the background as black unless the
cameraClsColor is used...
I simply wanted to show a cube on a red background..What is happening ?
I obviously do not understand some basic concept with B3D..
code:
Graphics3D 1024,768,16,2
SetBuffer BackBuffer() ;<--- Build in backbuffer
ClsColor 255,0,0 ;red ;<-- next cls sets curr buff to clr
Cls ;<--- set the backbuffer to red
cam=CreateCamera()
cube=CreateCube()
light=CreateLight(1,cam)
PositionEntity cam,0,0,-5
;CameraClsColor cam,255,0,0 ;<---- must have ???
While Not KeyDown(1)
TurnEntity cube,.500,.000,.0
If KeyDown (208) MoveEntity cam, 0, 0, 0.1
If KeyDown (200) MoveEntity cam, 0, 0, -0.1
UpdateWorld()
;WaitKey() ;<------ screen is red before render
RenderWorld() ;<---- turns black ???
;WaitKey()
Flip
If KeyDown(203) TurnEntity cam,0,3,1
If KeyDown(205) TurnEntity cam,0,-3,-1
Wend
End
====
In Playing with it..
the RenderWorld shows the background as black unless the
cameraClsColor is used...
I simply wanted to show a cube on a red background..What is happening ?