Unhandled memory exception in first 3D app!

BlitzMax Forums/BlitzMax Programming/Unhandled memory exception in first 3D app!

SkyCube(Posted 2009) [#1]
Hi all,

I get an "Unhandled memory exception when I try to run this code using Bmax/B3dsdk:

Rem B3DSDK CAMERA app:  
End rem


Import blitz3d.blitz3dsdk

' Main Code Chunk

Init3d()
InitObjects()
MainLoop()

Function MainLoop()

bbUpdateWorld()
bbRenderWorld()
bbFlip()

End Function

Function InitObjects()
cam = bbCreateCamera()

plane= bbCreatePlane()

bbPositionEntity(cam,0,1,0)
pisoimg = bbLoadImage("piso.jpg")
End Function


Function Init3D()
bbBeginBlitz3D

bbGraphics3D(800,600,32,GFX_FULLSCREEN)
bbSetBuffer (bbBackBuffer())
bbEndBlitz3D
End Function






Am I missing something? The examples run fine, so I know I am not missing either DX7 or the B3d.dll file required.


SkyCube(Posted 2009) [#2]
Never mind. Removed bbEndBlitz3D from Init()