The specified textureID is null - error =>help!
Posted: Wed Sep 03, 2003 10:29 am
				
				Hello,
I'm new to PB, so in my first program I want to show a 3d model of a tank (in two parts - the bottom half and top half).
This is the code:
InitEngine3D()
InitSprite()
OpenScreen(800,600,32,"Tank")
Add3DArchive("data\",#PB_3DArchive_FileSystem)
LoadMesh(1,"bottom.mesh")
LoadMesh(2,"top.mesh")
LoadTexture(1,"tex.bmp")
CreateMaterial(1,TextureID(1))
CreateEntity(1,MeshID(1),MaterialID(1))
CreateEntity(2,MeshID(2),MaterialID(1))
CreateCamera(1,0,0,100,100)
CameraLocate(1,-10,-10,-10)
CameraLookAt(1,0,0,0)
CreateLight(1,RGB(150,150,150),0,0,15)
Repeat
RenderWorld()
a=a+1
  
Until a=10000
It gives an error in the creatematerial function: The specified textureID is null
Greetz,
Bernard
			I'm new to PB, so in my first program I want to show a 3d model of a tank (in two parts - the bottom half and top half).
This is the code:
InitEngine3D()
InitSprite()
OpenScreen(800,600,32,"Tank")
Add3DArchive("data\",#PB_3DArchive_FileSystem)
LoadMesh(1,"bottom.mesh")
LoadMesh(2,"top.mesh")
LoadTexture(1,"tex.bmp")
CreateMaterial(1,TextureID(1))
CreateEntity(1,MeshID(1),MaterialID(1))
CreateEntity(2,MeshID(2),MaterialID(1))
CreateCamera(1,0,0,100,100)
CameraLocate(1,-10,-10,-10)
CameraLookAt(1,0,0,0)
CreateLight(1,RGB(150,150,150),0,0,15)
Repeat
RenderWorld()
a=a+1
Until a=10000
It gives an error in the creatematerial function: The specified textureID is null
Greetz,
Bernard