Page 1 of 1

Loading Mesh failed

Posted: Tue Oct 05, 2004 1:44 pm
by Yerrel
Hoi me again,

Now with the following struggle. :evil: f
I've created a cube in Milkshape 3D and export it as ogr .mesh file-format.
So far so good,,,, But: uuggggghhh

When i try to load the mesh in Purebasic than i get the following:

Specified #Mesh is not initialized....

The Code:

If InitEngine3D()
Add3DArchive("Data\", #PB_3DArchive_FileSystem)

InitKeyboard()
InitSprite()

If OpenScreen(640, 480, 16, "Mesh Test")=0
MessageRequester("Error", "Could not open 640x480x16 scrren")
EndIf


LoadMesh(0,"cube.mesh")

CreateMaterial(1,LoadTexture(1,"clouds.jpg"))
CreateEntity (0, MeshID(0), MaterialID(1))

The following rest of code is taken from the mesh examples source:

Repeat

ClearScreen(0, 0, 0)

If ExamineKeyboard()

If KeyboardPushed(#PB_Key_Left)
KeyX = -1
ElseIf KeyboardPushed(#PB_Key_Right)
KeyX = 1
Else
KeyX = 0
EndIf

If KeyboardPushed(#PB_Key_Up)
KeyY = -1
ElseIf KeyboardPushed(#PB_Key_Down)
KeyY = 1
Else
KeyY = 0
EndIf

If KeyboardPushed(#PB_Key_PageUp)
RollZ = 3
Else
RollZ = 0
EndIf

If KeyboardPushed(#PB_Key_Add)
Frame.f+0.005
EndIf

EndIf

If ExamineMouse()
MouseX = -MouseDeltaX()/10
MouseY = -MouseDeltaY()/10
EndIf

RotateEntity(0, 1, 0, 0)

RotateCamera(0, MouseX, MouseY, RollZ)
MoveCamera (0, KeyX, 0, KeyY)

RenderWorld()

FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
EndIf

The Data's are organized as follows:
In the map Data: i'v put: cube.mesh and clouds.jpg ( sisze = 256 x 256 )

Posted: Tue Oct 05, 2004 4:05 pm
by grapy
Seems you have the wrong Ogre Exporters.

These are the right one: OgreExporters-0.11.1.zip

grapy :mrgreen:

Posted: Tue Oct 05, 2004 6:42 pm
by Yerrel
grapy wrote:Seems you have the wrong Ogre Exporters.

These are the right one: OgreExporters-0.11.1.zip

grapy :mrgreen:
HoYeah Grapy....

True, i was using the wrong exporters ( had used the new one )... thanks for the link... :wink:

when will OGre be updated in PureBasic?

Posted: Wed Oct 06, 2004 9:01 am
by marvin
When will OGre be updated in PureBasic?

Just need to know an approximate date.

Thanks