Erreur pour chargement de mesh
Publié : dim. 05/déc./2004 23:07
j'essaie de charger un fichier mesh grace a ce code source :
mais a la compilation et au lancement je n'ai kun ecran noir , pourquoi ? merci d'avance
Code : Tout sélectionner
;
; ------------------------------------------------------------
;
;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