PyOGRE: Root object has no attribute setRenderSystem


28-09-2005 02:40:36

I wasn't sure if this is known, but Root doesn't have an attribute of setRenderTarget. I'm trying to modify the terrain PyOgre demo to not use the config menu.

def _configure(self):
"""This shows the config dialog and creates the renderWindow."""
drivers = self.root.getAvailableRenderers()
driver = drivers[0]
driver.setConfigOption("Full Screen","No")
driver.setConfigOption("Video Mode","800 x 600 @ 32-bit colour")

self.renderWindow = self.root.initialise(True)
return True


28-09-2005 02:44:55

Just realised I can do:

self.root.renderSystem = driver


28-09-2005 10:14:28

Right, all the basic set/get functions are now attributes (much more pythonic.)


11-01-2006 06:52:54

Doh! *slaps forehead*

Is there a place with API information like this? It would be very useful. :)

Edit: Well, there is this at the wiki. I suppose it's just a matter of experience with PyOgre to learn all these details.

While I'm at it, there's also a way to build docs using DoxyGen.