OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 year)
Log in
Home
Tutorials
Tutorials Home
Basic Tutorials
Intermediate Tutorials
Mad Marx Tutorials
In Depth Tutorials
Older Tutorials
External Tutorials
Cookbook
Cookbook Home
CodeBank
Snippets
Experiences
Ogre Articles
Libraries
Libraries Home
Alternative Languages
Assembling A Toolset
Development Tools
OGRE Libraries
List of Libraries
Tools
Tools Home
DCC Tools
DCC Tutorials
DCC Articles
DCC Resources
Assembling a production pipeline
Development
Development Home
Roadmap
Building Ogre
Installing the Ogre SDK
Setting Up An Application
Ogre Wiki Tutorial Framework
Frequently Asked Questions
Google Summer Of Code
Help Requested
Ogre Core Articles
Community
Community Home
Projects Using Ogre
Recommended Reading
Contractors
Wiki
Immediate Wiki Tasklist
Wiki Ideas
Wiki Guidelines
Article Writing Guidelines
Wiki Styles
Wiki Page Tracker
Ogre Wiki Help
Ogre Wiki Help Overview
Help - Basic Syntax
Help - Images
Help - Pages and Structures
Help - Wiki Plugins
Toolbox
Freetags
Categories
List Pages
Structures
Trackers
Statistics
Rankings
List Galleries
Ogre Lexicon
Comments
History: Psyco and PyOgre
View page
Source of version: 2
(current)
[http://psyco.sourceforge.net/|Psyco] works with pyogre, but it causes problems if you try to import and run psyco too soon. You should not start psyco running until after you have setup Ogre, perferably just before calling root.startRendering. For example, look at the sampleframework.py and change this function: {CODE(wrap="1", colors="python")} def go( self ): if not self._setUp(): return self.root.startRendering() {CODE} To be this: {CODE(wrap="1", colors="python")} def go( self ): if not self._setUp(): return # Import Psyco if available try: import psyco psyco.full() except ImportError: pass self.root.startRendering() {CODE} This will allow psyco to do its thing without affecting ogre's startup process. You should also change all of your class definitions to inherit from the new-style python object (this helps psyco speed things up). To do this with the sample framework, you would replace these lines: {CODE(wrap="1", colors="python")} class Application: class FrameListener(ogre.FrameListener): {CODE} To this: {CODE(wrap="1", colors="python")} class Application( object ): class FrameListener(ogre.FrameListener, object): {CODE} Do this for all classes you intend to use psyco on. There should not be any noticable difference in application behavior by making this change. If you truely intend to use psyco in your application you should really run it through psyco's profiler and manually select what you want to optimize. Read more information on the [http://psyco.sourceforge.net/|Psyco Website]
Search by Tags
Search Wiki by Freetags
Latest Changes
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
MogreSocks
Critter AI
Mogre Add-ons
MOGRE
Mogre MyGUI wrapper
MOGRE Editable Terrain Manager
...more
Search
Find
Advanced
Search Help
Online Users
26 online users