' ------------------------------------------------------------
'   n3xt-D exemples
'
'   Sample 055  :  load a DeepMesh scene
'   
'   Thanks to Innesoft for the media used in this sample. (and painting on the wall, called 'Tina' by J.H.Lynch )
'    
'                http://deepmesh.innesoft.com
'
'   Historique  :
'     09/06/11  19:16    TMyke
'
' ------------------------------------------------------------

' Includes libraries
#include "N3xtD.bi"

' Globales
Dim app As any Ptr
Dim Quit As Integer


'----------------------------------------------------------
' open n3xt-D screen
app = _CreateGraphics3D(800,600)
If app=NULL Then
  End
End If



' set the curent folder
_ChangeWorkingDirectory("media/house/")

'; load an 3D scene 
  Dim  scene As EntityNode = _LoadDpmScene("room5.dpm", "")




' create a camera
DIM cam As CameraNode = _CreateCameraFPS(70, 0.01)
_PositionNode(cam, 0,0,-5)




' ---------------------------------------
'           main loop
' ---------------------------------------
While Quit=0
 

' If Escape Key, Exit	
  If _GetKeyDown(KEY_ESCAPE) then
    Quit=1
  EndIf


  	' ---------------
  	'      Render
  	' ---------------
  _BeginScene(20,20,50)
     _DrawScene()
  _EndScene()


Wend 
' end
_FreeEngine()
