Code: Select all
InitEngine3D()
InitSprite()
OpenWindow(0,0,0,500,500,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(0),0,0,500,500)
CreateLight(0,RGB(255,0,0),0,0,1000,#PB_Light_Point)
CreateCamera(0,0,0,100,100)
MoveCamera(0,0,0,1000)
CreateMesh(0, #PB_Mesh_TriangleList, #PB_Mesh_Dynamic)
MeshVertexPosition(-128,128,0)
MeshVertexTextureCoordinate(0,0)
MeshVertexPosition(128,128,0)
MeshVertexTextureCoordinate(0,1)
MeshVertexPosition(128,-128,0)
MeshVertexTextureCoordinate(1,1)
MeshVertexPosition(-128,-128,0)
MeshVertexTextureCoordinate(1,0)
MeshFace(2,1,0)
MeshFace(0,3,2)
FinishMesh(#True)
CreateCube(1,50)
CreateEntity(0,MeshID(0),#PB_Material_None)
CreateEntity(1,MeshID(1),#PB_Material_None)
MoveEntity(1,-130,0,0)
Repeat
RenderWorld()
FlipBuffers()
Until WindowEvent() = #PB_Event_CloseWindow
PB 5.70