day before yesterday i was creating a cube with an image applied to it that auto rotates something like that.
;Set 3D Mode
Graphics3D 800,600
SetBuffer BackBuffer()
;Create a camera
camera=CreateCamera()
;Create a light
light=CreateLight()
;Create a cube
cube=CreateCube()
;load texture
tex=LoadTexture("Winter.jpg")
;make a brush
brush=CreateBrush()
;Apply texture to brush
BrushTexture brush,tex
;and some shininess
BrushShininess brush,1
;paint mesh with brush
PaintMesh cube,brush
While KeyDown(1)
pitch#=0
yaw#=0
roll#=0
If KeyDown(31)=True Then pitch#=-1
If KeyDown(31)=True Then pitch#=1
If KeyDown(31)=True Then yaw#=-1
If KeyDown(31)=True Then yaw#=1
If KeyDown(31)=True Then roll#=-1
If KeyDown(31)=True Then roll#=1
;position cube
PositionEntity cube,0,0,5
;turning object
TurnEntity cube,pitch#,yaw#,roll#
RenderWorld
Flip
Wend
End
I run it that day and it worked fine no errors nothing. Then yesterday came I run it again it loads up a black screen and shuts down very fast. Why is this happening?
;Set 3D Mode
Graphics3D 800,600
SetBuffer BackBuffer()
;Create a camera
camera=CreateCamera()
;Create a light
light=CreateLight()
;Create a cube
cube=CreateCube()
;load texture
tex=LoadTexture("Winter.jpg")
;make a brush
brush=CreateBrush()
;Apply texture to brush
BrushTexture brush,tex
;and some shininess
BrushShininess brush,1
;paint mesh with brush
PaintMesh cube,brush
While KeyDown(1)
pitch#=0
yaw#=0
roll#=0
If KeyDown(31)=True Then pitch#=-1
If KeyDown(31)=True Then pitch#=1
If KeyDown(31)=True Then yaw#=-1
If KeyDown(31)=True Then yaw#=1
If KeyDown(31)=True Then roll#=-1
If KeyDown(31)=True Then roll#=1
;position cube
PositionEntity cube,0,0,5
;turning object
TurnEntity cube,pitch#,yaw#,roll#
RenderWorld
Flip
Wend
End
I run it that day and it worked fine no errors nothing. Then yesterday came I run it again it loads up a black screen and shuts down very fast. Why is this happening?