please explain the SampleFramework

jamesdy

09-08-2007 09:32:25

The SampleFramework appears in each demo of tutorials,but i really want to learn python-ogre from the very beginning without the precode module.could someone please expain SampleFramework particularly just as to show Tk() first, when teaching Tkinter.(inneractive has a topic:Python-Ogre Minimal Application.but didn't explain it,eg:details of module;function;method;constant)

andy

09-08-2007 10:45:09

There isn't any Tinker support with Python-Ogre..

If you need a GUI then look at CEGUI or QuickGui (demos/gui)...

Have a look at the tutorials http://python-ogre.org/wiki/Hints

For a non Sample Framework demo have a look at Demo_Basic -- however much of your learning has to be to understand Ogre, so I would start with the docuementation etc on ogre3d.org and then take your time to understand the Sample Framework (it's not perfect, however it's also not that hard to understand once you drill into it)..

Cheers
Andy

jamesdy

09-08-2007 14:34:37

There isn't any Tinker support with Python-Ogre..

If you need a GUI then look at CEGUI or QuickGui (demos/gui)...

Have a look at the tutorials http://python-ogre.org/wiki/Hints

For a non Sample Framework demo have a look at Demo_Basic -- however much of your learning has to be to understand Ogre, so I would start with the docuementation etc on ogre3d.org and then take your time to understand the Sample Framework (it's not perfect, however it's also not that hard to understand once you drill into it)..

Cheers
Andy



thanks for your answer andy.i didn't mean to use tkinter in python-orge,just given an analogy.waiting for your documentation to disabuse our perplexity.

TimErwin

15-08-2007 12:46:06

A good starting point is to work through the MinimalPracticalApplication. It's written in C++ but so basic, that a) you can easily rewrite it in Python and b) it is self-explaining. Everything else in the sampleFramework is just extending it.
You should examine the sampleFramework itself. Just start in the go() method and pretend to be an interpreter ;) Most of the methods (those starting with "_" ) are nothing more than structuring the code. They are called by _setUp() one after the other. Pretty straight forward.
You don't even need too much documentation, which is what I love about the Ogre API: it's self-explaining. If you need to know more about a specific method/class have a look into Ogre's API documentation.

Regards,
Tim-Erwin

TimErwin

15-08-2007 20:49:52

I just got the hint to have a look into the DemoSpinner.py. And indeed that's pretty cool, because it is not based on the sampleFramework but instead does everything itself. It is similar to the above mentioned MinimalPracticalApplication.

Regards,
Tim-Erwin

Game_Ender

15-08-2007 21:34:13

The SampleFramework is really not meant to teach you how to use Ogre as a whole. Its meant to show how to use one specific feature of Ogre. As such, its not a good example of how to work with Ogre as a whole, or how to setup an Ogre application. This should probably be started more clearly somewhere. The practical/minimal examples and applications posted are the better way to learn how put together an Ogre application.

scriptkid

16-08-2007 13:41:32

Hi,

interesting thread since i have also asked myself the question "shall i use the sample framework or will i write my own code?". I decided for the first. The reason is that the sample framework is pretty straightforward IMO. It does all the things which you will have to do anyway when using Ogre. Only maybe in a slightly different "taste" as you might prefer yourself.

Besides the Sample application, i have my GameLoop class which derives from the CeguiSampleFrameListener, which includes handy Cegui stuff. Again, things you need anyway.

That said, i don't use the _createScene method except for loading up some Cegui files. Actual mesh loading and other state-related management happens in my GameLoop and helper classes.

Bye.