wont work
Posted: Fri Jul 02, 2004 12:07 am
Hi. This is my very first attempt to do 3d programming in PB.
But it always says that "#mesh is not intiaziled".
What do i do wrong?:
in the data\ dir i have 2 files:
Cube.mesh
mytex.jpg
But it always says that "#mesh is not intiaziled".
What do i do wrong?:
Code: Select all
If InitEngine3D()
Add3DArchive("data\",#PB_3DArchive_FileSystem)
InitSprite()
InitKeyboard()
OpenScreen(1024,768,32,"3d test")
LoadMesh(1,"mymesh.mesh")
LoadTexture(1,"mytex.jpg")
mymesh=MeshID(1)
CreateEntity(1,mymesh,CreateMaterial(1,TextureID(1)))
CreateLight(1,RGB(0,0,255),100.0,0,0)
CreateCamera(1,0,0,100,100)
CameraLocate(1,0,0,100)
Repeat
ClearScreen(0,0,0)
RenderWorld()
FlipBuffers()
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_All)
EndIf
Cube.mesh
mytex.jpg