Hier ein erstes Ergebnis:
Code: Alles auswählen
EnableExplicit
;{ InitSystem
CompilerIf #PB_Compiler_Debugger=#True
#ScrW=800
#ScrH=600
CompilerElse
#ScrW=800
#ScrH=600
CompilerEndIf
#STitle=""
If InitSprite()=0:End:EndIf
If InitKeyboard()=0:End:EndIf
If InitMouse()=0:End:EndIf
If InitSprite3D()=0:End:EndIf
If InitSound()=0:End:EndIf
If InitEngine3D()=0:End:EndIf
CompilerIf #PB_Compiler_Debugger=#False
OpenScreen(#ScrW,#ScrH,32,#STitle,#PB_Screen_WaitSynchronization,60)
CompilerElse
ExamineDesktops()
OpenWindow(1,(DesktopWidth(0)-#ScrW)/2,(DesktopHeight(0)-#ScrH)/2,#ScrW,#ScrH,#STitle)
OpenWindowedScreen(WindowID(1),0,0,#ScrW,#ScrH,1,0,0)
SetFrameRate(60)
CompilerEndIf
;}
Enumeration
#cube
#cylinder
#sphere
EndEnumeration
CreateCube(#cube,10)
CreateEntity(#cube, MeshID(#cube),0,-30,0,0)
CreateCylinder(#cylinder,10,25)
CreateEntity(#cylinder, MeshID(#cylinder),0,0,0,0)
CreateSphere(#sphere,10)
CreateEntity(#sphere, MeshID(#sphere),0,30,0,0)
CreateCamera(0, 0, 0, 100, 100)
CameraLocate(0,0,0,100)
Repeat
CompilerIf #PB_Compiler_Debugger=#True
Repeat
Select (WindowEvent())
Case #Null
Break 1
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
CompilerEndIf
ExamineKeyboard()
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)