yogsodoth
22-08-2008 03:15:23
Hi all,
I'm new to OGRE but not to Python. Trying to get the first tutorial on the Wiki working. Are they up to date? Here's my code:
When it launches, I get the window and the OGRE overlay with FPS etc. but it doesn't load the robot.mesh... just a plain black screen behind the overlay. Triangle count shows as 250, which seems a little low for me for a full mesh, and I can't see a thing (at this stage the tutorial says "You should see a robot").
Any idea what I'm doing wrong?
I'm new to OGRE but not to Python. Trying to get the first tutorial on the Wiki working. Are they up to date? Here's my code:
import sys
sys.path.insert(0,'..')
import PythonOgreConfig
import ogre.renderer.OGRE as ogre
import ogre.io.OIS as OIS
import SampleFramework as sf
class TutorialApplication(sf.Application):
def _createScene(self):
sceneManager = self.sceneManager
sceneManager.ambientLight = ogre.ColourValue (1, 1, 1)
ent1 = sceneManager.createEntity ("Robot", "robot.mesh")
node1 = sceneManager.getRootSceneNode().createChildSceneNode("RobotNode")
node1.attachObject(ent1)
if __name__ == '__main__':
import exceptions
try:
application = TutorialApplication()
application.go()
except ogre.OgreException, e:
print e
When it launches, I get the window and the OGRE overlay with FPS etc. but it doesn't load the robot.mesh... just a plain black screen behind the overlay. Triangle count shows as 250, which seems a little low for me for a full mesh, and I can't see a thing (at this stage the tutorial says "You should see a robot").
Any idea what I'm doing wrong?