Page 1 of 1

error to load mesh

Posted: Sun Dec 05, 2004 4:12 pm
by vedder
hello everybody !!

i try to to load mesh and i have taken a source :

Code: Select all

;
; ------------------------------------------------------------
;
;DUPORT Eric
;
;    (c) 2004 - Misleading lands
;
; ------------------------------------------------------------
;

IncludeFile "Screen3DRequester.pb"

DefType.f KeyX, KeyY, MouseX, MouseY
  
If InitEngine3D()

  Add3DArchive("Data\" , #PB_3DArchive_FileSystem)
  Add3DArchive("Data\camp.zip", #PB_3DArchive_Zip)
  
  InitSprite()
  InitKeyboard()
  InitMouse()
  
  If Screen3DRequester()
    
    LoadMesh(0,"camp.mesh")
        
    CreateLight(0, RGB(0,0,0))
          
    CreateCamera(0, 0, 0, 100, 100)
    CameraLocate(0,0,0,100)
      
    Repeat
      Screen3DEvents()
            
      If ExamineKeyboard()
      
        If KeyboardPushed(#PB_Key_Left)
          KeyX = -1
        ElseIf KeyboardPushed(#PB_Key_Right)
          KeyX = 1
        Else
          KeyX = 0
        EndIf
        
        If KeyboardPushed(#PB_Key_Up)
          KeyY = -1
        ElseIf KeyboardPushed(#PB_Key_Down)
          KeyY = 1
        Else
          KeyY = 0
        EndIf
        
        If KeyboardPushed(#PB_Key_PageUp)
          RollZ = 3
        Else
          RollZ = 0
        EndIf
        
        If KeyboardPushed(#PB_Key_Add)
          Frame.f+0.005
        EndIf
        
      EndIf
      
      If ExamineMouse()
        MouseX = -MouseDeltaX()/10 
        MouseY = -MouseDeltaY()/10
      EndIf
      
     
      RotateCamera(0, MouseX, MouseY, RollZ)
      MoveCamera  (0, KeyX, 0, KeyY)
      
      RenderWorld()
      
      FlipBuffers()
    Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1
  EndIf
    
Else
  MessageRequester("Error", "The 3D Engine can't be initialized",0)
EndIf
  
End
; ExecutableFormat=Windows
; DisableDebugger
; EOF
but when i want to compil this , i have a black scren and not the mesh i want to load , Why ??
thanks for advance

Posted: Sun Dec 05, 2004 4:46 pm
by PolyVector
is the data directory that contains all the media in folder as your source?

Posted: Sun Dec 05, 2004 7:48 pm
by vedder
yes , the folder data is my source , the mesh file is in this folder