Tested on Linux + PB 6.21. (have not tested this on Windows!)
Code (based on the example from the help):
Code: Select all
InitEngine3D()
InitSprite()
OpenWindow(0, 0, 0, 640, 480, "Line3D example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 640, 480, 0, 0, 0)
; Light
CreateLight(#PB_Any, RGB(25, 25, 180), -5, 10, 5, #PB_Light_Point)
; Camera
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 2, 1, 3, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)
; Erstelle die Linie und binde sie an die Szene
CreateLine3D(0, 0, 0, 0, RGB(255, 0, 0), 1, 1, 1, RGB(0, 0, 255))
Debug CreateEntity(0, MeshID(0), #PB_Material_None);<- does not create the entity!
Repeat
RotateEntity(0,0.5,0.5,0.5,#PB_Relative);<- can not rotate the line!
RenderWorld()
FlipBuffers()
Until WaitWindowEvent(1) = #PB_Event_CloseWindow