Hi, I hope this is not some idiotic error on my behalf. The following code when compiled gives an Unhandled memory access error and freezes when run. When I kill the app Renderworld is highlighted. I know that my klepto mod is working as I have successfully compiled and run most of the examples that came with sidesign.minib3d.
/code
Import klepto.minib3d
Strict
'Set up some varaibles for the graphics window
Local width=800,height=600,depth=0,mode=0
'create the graphics window
Graphics width,height,depth,mode
'set up a camera
Local cam:TCamera=CreateCamera()
CameraRange cam,0.5,500
PositionEntity cam,0,10,-10
'set up a light
Local light:TLight=CreateLight()
RotateEntity light,90,0,0
'now load our mesh
Local obj:TMesh=LoadMesh("./teapot.b3d")
PositionEntity obj,0,0,10
'main loop
While Not KeyHit(KEY_ESCAPE)
UpdateWorld
RenderWorld
Flip
Wend
End
/code
Thanks for any help
Matthew
/code
Import klepto.minib3d
Strict
'Set up some varaibles for the graphics window
Local width=800,height=600,depth=0,mode=0
'create the graphics window
Graphics width,height,depth,mode
'set up a camera
Local cam:TCamera=CreateCamera()
CameraRange cam,0.5,500
PositionEntity cam,0,10,-10
'set up a light
Local light:TLight=CreateLight()
RotateEntity light,90,0,0
'now load our mesh
Local obj:TMesh=LoadMesh("./teapot.b3d")
PositionEntity obj,0,0,10
'main loop
While Not KeyHit(KEY_ESCAPE)
UpdateWorld
RenderWorld
Flip
Wend
End
/code
Thanks for any help
Matthew