#include <OgreRoot.h>
Inheritance diagram for Ogre::Root:
Public Types | |||||||||||
typedef ConstMapIterator< MovableObjectFactoryMap > | MovableObjectFactoryIterator | ||||||||||
Public Member Functions | |||||||||||
Root (const String &pluginFileName="plugins.cfg", const String &configFileName="ogre.cfg", const String &logFileName="Ogre.log") | |||||||||||
Constructor. | |||||||||||
~Root () | |||||||||||
void | saveConfig (void) | ||||||||||
Saves the details of the current configuration. | |||||||||||
bool | restoreConfig (void) | ||||||||||
Checks for saved video/sound/etc settings. | |||||||||||
bool | showConfigDialog (void) | ||||||||||
Displays a dialog asking the user to choose system settings. | |||||||||||
void | addRenderSystem (RenderSystem *newRend) | ||||||||||
Adds a new rendering subsystem to the list of available renderers. | |||||||||||
RenderSystemList * | getAvailableRenderers (void) | ||||||||||
Retrieve a list of the available render systems. | |||||||||||
RenderSystem * | getRenderSystemByName (const String &name) | ||||||||||
Retrieve a pointer to the render system by the given name. | |||||||||||
void | setRenderSystem (RenderSystem *system) | ||||||||||
Sets the rendering subsystem to be used. | |||||||||||
RenderSystem * | getRenderSystem (void) | ||||||||||
Retrieve a pointer to the currently selected render system. | |||||||||||
RenderWindow * | initialise (bool autoCreateWindow, const String &windowTitle="OGRE Render Window") | ||||||||||
Initialises the renderer. | |||||||||||
bool | isInitialised (void) const | ||||||||||
Returns whether the system is initialised or not. | |||||||||||
void | addSceneManagerFactory (SceneManagerFactory *fact) | ||||||||||
Register a new SceneManagerFactory, a factory object for creating instances of specific SceneManagers. | |||||||||||
void | removeSceneManagerFactory (SceneManagerFactory *fact) | ||||||||||
Unregister a SceneManagerFactory. | |||||||||||
const SceneManagerMetaData * | getSceneManagerMetaData (const String &typeName) const | ||||||||||
Get more information about a given type of SceneManager. | |||||||||||
SceneManagerEnumerator::MetaDataIterator | getSceneManagerMetaDataIterator (void) const | ||||||||||
Iterate over all types of SceneManager available for construction, providing some information about each one. | |||||||||||
SceneManager * | createSceneManager (const String &typeName, const String &instanceName=StringUtil::BLANK) | ||||||||||
Create a SceneManager instance of a given type. | |||||||||||
SceneManager * | createSceneManager (SceneTypeMask typeMask, const String &instanceName=StringUtil::BLANK) | ||||||||||
Create a SceneManager instance based on scene type support. | |||||||||||
void | destroySceneManager (SceneManager *sm) | ||||||||||
Destroy an instance of a SceneManager. | |||||||||||
SceneManager * | getSceneManager (const String &instanceName) const | ||||||||||
Get an existing SceneManager instance that has already been created, identified by the instance name. | |||||||||||
SceneManagerEnumerator::SceneManagerIterator | getSceneManagerIterator (void) | ||||||||||
Get an iterator over all the existing SceneManager instances. | |||||||||||
TextureManager * | getTextureManager (void) | ||||||||||
Retrieves a reference to the current TextureManager. | |||||||||||
MeshManager * | getMeshManager (void) | ||||||||||
Retrieves a reference to the current MeshManager. | |||||||||||
String | getErrorDescription (long errorNumber) | ||||||||||
Utility function for getting a better description of an error code. | |||||||||||
void | addFrameListener (FrameListener *newListener) | ||||||||||
Registers a FrameListener which will be called back every frame. | |||||||||||
void | removeFrameListener (FrameListener *oldListener) | ||||||||||
Removes a FrameListener from the list of listening classes. | |||||||||||
void | queueEndRendering (void) | ||||||||||
Queues the end of rendering. | |||||||||||
void | startRendering (void) | ||||||||||
Starts / restarts the automatic rendering cycle. | |||||||||||
bool | renderOneFrame (void) | ||||||||||
Render one frame. | |||||||||||
void | shutdown (void) | ||||||||||
Shuts down the system manually. | |||||||||||
void | addResourceLocation (const String &name, const String &locType, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, bool recursive=false) | ||||||||||
Adds a location to the list of searchable locations for a Resource type. | |||||||||||
void | removeResourceLocation (const String &name, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) | ||||||||||
Removes a resource location from the list. | |||||||||||
void | convertColourValue (const ColourValue &colour, uint32 *pDest) | ||||||||||
Generates a packed data version of the passed in ColourValue suitable for use with the current RenderSystem. | |||||||||||
RenderWindow * | getAutoCreatedWindow (void) | ||||||||||
Retrieves a pointer to the window that was created automatically. | |||||||||||
RenderWindow * | createRenderWindow (const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0) | ||||||||||
Key: "colourDepth" Description: Colour depth of the resulting rendering window; only applies if fullScreen is set. Values: 16 or 32 Default: desktop depth Notes: [W32 specific] Key: "left" Description: screen x coordinate from left Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen Key: "top" Description: screen y coordinate from top Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen Key: "depthBuffer" [DX9 specific] Description: Use depth buffer Values: false or true Default: true Key: "externalWindowHandle" [API specific] Description: External window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong (display*:screen:windowHandle) or poslong:posint:poslong:poslong (display*:screen:windowHandle:XVisualInfo*) for GLX Default: 0 (None) Key: "parentWindowHandle" [API specific] Description: Parent window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong for GLX (display*:screen:windowHandle) Default: 0 (None) Key: "FSAA" Description: Full screen antialiasing factor Values: 0,2,4,6,... Default: 0 Key: "displayFrequency" Description: Display frequency rate, for fullscreen mode Values: 60...? Default: Desktop vsync rate Key: "vsync" Description: Synchronize buffer swaps to vsync Values: true, false Default: 0 Key: "border" Description: The type of window border (in windowed mode) Values: none, fixed, resize Default: resize Key: "outerDimensions" Description: Whether the width/height is expressed as the size of the outer window, rather than the content area Values: true, false Default: false
Key: "useNVPerfHUD" [DX9 specific] Description: Enable the use of nVidia NVPerfHUD Values: true, false Default: false | |||||||||||
void | detachRenderTarget (RenderTarget *pWin) | ||||||||||
Destroys a rendering window. | |||||||||||
void | detachRenderTarget (const String &name) | ||||||||||
Destroys a named rendering window. | |||||||||||
RenderTarget * | getRenderTarget (const String &name) | ||||||||||
Retrieves a pointer to the a named render window. | |||||||||||
void | loadPlugin (const String &pluginName) | ||||||||||
Manually load a plugin. | |||||||||||
void | unloadPlugin (const String &pluginName) | ||||||||||
Manually unloads a plugin. | |||||||||||
Timer * | getTimer (void) | ||||||||||
Gets a pointer to the central timer used for all OGRE timings. | |||||||||||
bool | _fireFrameStarted (FrameEvent &evt) | ||||||||||
Method for raising frame started events. | |||||||||||
bool | _fireFrameEnded (FrameEvent &evt) | ||||||||||
Method for raising frame ended events. | |||||||||||
bool | _fireFrameStarted () | ||||||||||
Method for raising frame started events. | |||||||||||
bool | _fireFrameEnded () | ||||||||||
Method for raising frame ended events. | |||||||||||
unsigned long | getCurrentFrameNumber (void) const | ||||||||||
Gets the number of the current frame. | |||||||||||
SceneManager * | _getCurrentSceneManager (void) const | ||||||||||
Returns the scene manager currently being used to render a frame. | |||||||||||
void | _setCurrentSceneManager (SceneManager *sm) | ||||||||||
Sets the scene manager currently being used to render a frame. | |||||||||||
void | _updateAllRenderTargets (void) | ||||||||||
Internal method used for updating all RenderTarget objects (windows, renderable textures etc) which are set to auto-update. | |||||||||||
RenderQueueInvocationSequence * | createRenderQueueInvocationSequence (const String &name) | ||||||||||
Create a new RenderQueueInvocationSequence, useful for linking to Viewport instances to perform custom rendering. | |||||||||||
RenderQueueInvocationSequence * | getRenderQueueInvocationSequence (const String &name) | ||||||||||
Get a RenderQueueInvocationSequence. | |||||||||||
void | destroyRenderQueueInvocationSequence (const String &name) | ||||||||||
Destroy a RenderQueueInvocationSequence. | |||||||||||
void | destroyAllRenderQueueInvocationSequences (void) | ||||||||||
Destroy all RenderQueueInvocationSequences. | |||||||||||
void | clearEventTimes (void) | ||||||||||
Clears the history of all event times. | |||||||||||
void | setFrameSmoothingPeriod (Real period) | ||||||||||
Sets the period over which OGRE smooths out fluctuations in frame times. | |||||||||||
Real | getFrameSmoothingPeriod (void) const | ||||||||||
Gets the period over which OGRE smooths out fluctuations in frame times. | |||||||||||
void | addMovableObjectFactory (MovableObjectFactory *fact, bool overrideExisting=false) | ||||||||||
Register a new MovableObjectFactory which will create new MovableObject instances of a particular type, as identified by the getType() method. | |||||||||||
void | removeMovableObjectFactory (MovableObjectFactory *fact) | ||||||||||
Removes a previously registered MovableObjectFactory. | |||||||||||
bool | hasMovableObjectFactory (const String &typeName) const | ||||||||||
Checks whether a factory is registered for a given MovableObject type. | |||||||||||
MovableObjectFactory * | getMovableObjectFactory (const String &typeName) | ||||||||||
Get a MovableObjectFactory for the given type. | |||||||||||
uint32 | _allocateNextMovableObjectTypeFlag (void) | ||||||||||
Allocate the next MovableObject type flag. | |||||||||||
MovableObjectFactoryIterator | getMovableObjectFactoryIterator (void) const | ||||||||||
Return an iterator over all the MovableObjectFactory instances currently registered. | |||||||||||
Static Public Member Functions | |||||||||||
void | termHandler () | ||||||||||
Root & | getSingleton (void) | ||||||||||
Override standard Singleton retrieval. | |||||||||||
Root * | getSingletonPtr (void) | ||||||||||
Override standard Singleton retrieval. | |||||||||||
Static Protected Attributes | |||||||||||
Root * | ms_Singleton | ||||||||||
Private Types | |||||||||||
typedef std::map< String, MovableObjectFactory * > | MovableObjectFactoryMap | ||||||||||
typedef std::map< String, RenderQueueInvocationSequence * > | RenderQueueInvocationSequenceMap | ||||||||||
enum | FrameEventTimeType { FETT_ANY, FETT_STARTED, FETT_ENDED } | ||||||||||
Indicates the type of event to be considered by calculateEventTime(). More... | |||||||||||
Private Member Functions | |||||||||||
void | loadPlugins (const String &pluginsfile="plugins.cfg") | ||||||||||
Method reads a plugins configuration file and instantiates all plugins. | |||||||||||
void | initialisePlugins () | ||||||||||
Initialise all loaded plugins - allows plugins to perform actions once the renderer is initialised. | |||||||||||
void | shutdownPlugins () | ||||||||||
Shuts down all loaded plugins - allows things to be tidied up whilst all plugins are still loaded. | |||||||||||
void | unloadPlugins () | ||||||||||
Unloads all loaded plugins. | |||||||||||
void | oneTimePostWindowInit (void) | ||||||||||
Real | calculateEventTime (unsigned long now, FrameEventTimeType type) | ||||||||||
Internal method for calculating the average time between recently fired events. | |||||||||||
Private Attributes | |||||||||||
RenderSystemList | mRenderers | ||||||||||
RenderSystem * | mActiveRenderer | ||||||||||
String | mVersion | ||||||||||
String | mConfigFileName | ||||||||||
bool | mQueuedEnd | ||||||||||
bool | mFirstTimePostWindowInit | ||||||||||
LogManager * | mLogManager | ||||||||||
ControllerManager * | mControllerManager | ||||||||||
SceneManagerEnumerator * | mSceneManagerEnum | ||||||||||
SceneManager * | mCurrentSceneManager | ||||||||||
DynLibManager * | mDynLibManager | ||||||||||
PlatformManager * | mPlatformManager | ||||||||||
ArchiveManager * | mArchiveManager | ||||||||||
MaterialManager * | mMaterialManager | ||||||||||
MeshManager * | mMeshManager | ||||||||||
ParticleSystemManager * | mParticleManager | ||||||||||
SkeletonManager * | mSkeletonManager | ||||||||||
OverlayElementFactory * | mPanelFactory | ||||||||||
OverlayElementFactory * | mBorderPanelFactory | ||||||||||
OverlayElementFactory * | mTextAreaFactory | ||||||||||
OverlayManager * | mOverlayManager | ||||||||||
FontManager * | mFontManager | ||||||||||
ArchiveFactory * | mZipArchiveFactory | ||||||||||
ArchiveFactory * | mFileSystemArchiveFactory | ||||||||||
ResourceGroupManager * | mResourceGroupManager | ||||||||||
ResourceBackgroundQueue * | mResourceBackgroundQueue | ||||||||||
Timer * | mTimer | ||||||||||
RenderWindow * | mAutoWindow | ||||||||||
Profiler * | mProfiler | ||||||||||
HighLevelGpuProgramManager * | mHighLevelGpuProgramManager | ||||||||||
ExternalTextureSourceManager * | mExternalTextureSourceManager | ||||||||||
CompositorManager * | mCompositorManager | ||||||||||
unsigned long | mCurrentFrame | ||||||||||
Real | mFrameSmoothingTime | ||||||||||
std::vector< DynLib * > | mPluginLibs | ||||||||||
MovableObjectFactoryMap | mMovableObjectFactoryMap | ||||||||||
uint32 | mNextMovableObjectTypeFlag | ||||||||||
MovableObjectFactory * | mEntityFactory | ||||||||||
MovableObjectFactory * | mLightFactory | ||||||||||
MovableObjectFactory * | mBillboardSetFactory | ||||||||||
MovableObjectFactory * | mManualObjectFactory | ||||||||||
MovableObjectFactory * | mBillboardChainFactory | ||||||||||
MovableObjectFactory * | mRibbonTrailFactory | ||||||||||
RenderQueueInvocationSequenceMap | mRQSequenceMap | ||||||||||
bool | mIsInitialised | ||||||||||
Are we initialised yet? | |||||||||||
std::set< FrameListener * > | mFrameListeners | ||||||||||
Set of registered frame listeners. | |||||||||||
std::set< FrameListener * > | mRemovedFrameListeners | ||||||||||
Set of frame listeners marked for removal. | |||||||||||
std::deque< unsigned long > | mEventTimes [3] | ||||||||||
Contains the times of recently fired events. | |||||||||||
Friends | |||||||||||
class | RenderSystem |
Definition at line 61 of file OgreRoot.h.
|
Definition at line 806 of file OgreRoot.h. |
|
Definition at line 108 of file OgreRoot.h. |
|
Definition at line 119 of file OgreRoot.h. |
|
Indicates the type of event to be considered by calculateEventTime().
Definition at line 155 of file OgreRoot.h. |
|
Constructor.
|
|
|
|
Allocate the next MovableObject type flag.
|
|
Method for raising frame ended events.
|
|
Method for raising frame ended events.
|
|
Method for raising frame started events.
|
|
Method for raising frame started events.
|
|
Returns the scene manager currently being used to render a frame.
Definition at line 668 of file OgreRoot.h. |
|
Sets the scene manager currently being used to render a frame.
|
|
Internal method used for updating all RenderTarget objects (windows, renderable textures etc) which are set to auto-update.
|
|
Registers a FrameListener which will be called back every frame.
|
|
Register a new MovableObjectFactory which will create new MovableObject instances of a particular type, as identified by the getType() method.
|
|
Adds a new rendering subsystem to the list of available renderers.
|
|
Adds a location to the list of searchable locations for a Resource type.
|
|
Register a new SceneManagerFactory, a factory object for creating instances of specific SceneManagers.
|
|
Internal method for calculating the average time between recently fired events.
|
|
Clears the history of all event times.
|
|
Generates a packed data version of the passed in ColourValue suitable for use with the current RenderSystem.
|
|
Create a new RenderQueueInvocationSequence, useful for linking to Viewport instances to perform custom rendering.
|
|
Key: "colourDepth" Description: Colour depth of the resulting rendering window; only applies if fullScreen is set. Values: 16 or 32 Default: desktop depth Notes: [W32 specific] Key: "left" Description: screen x coordinate from left Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen Key: "top" Description: screen y coordinate from top Values: positive integers Default: 'center window on screen' Notes: Ignored in case of full screen Key: "depthBuffer" [DX9 specific] Description: Use depth buffer Values: false or true Default: true Key: "externalWindowHandle" [API specific] Description: External window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong (display*:screen:windowHandle) or poslong:posint:poslong:poslong (display*:screen:windowHandle:XVisualInfo*) for GLX Default: 0 (None) Key: "parentWindowHandle" [API specific] Description: Parent window handle, for embedding the OGRE context Values: positive integer for W32 (HWND handle) poslong:posint:poslong for GLX (display*:screen:windowHandle) Default: 0 (None) Key: "FSAA" Description: Full screen antialiasing factor Values: 0,2,4,6,... Default: 0 Key: "displayFrequency" Description: Display frequency rate, for fullscreen mode Values: 60...? Default: Desktop vsync rate Key: "vsync" Description: Synchronize buffer swaps to vsync Values: true, false Default: 0 Key: "border" Description: The type of window border (in windowed mode) Values: none, fixed, resize Default: resize Key: "outerDimensions" Description: Whether the width/height is expressed as the size of the outer window, rather than the content area Values: true, false Default: false Key: "useNVPerfHUD" [DX9 specific] Description: Enable the use of nVidia NVPerfHUD Values: true, false Default: false
|
|
Create a SceneManager instance based on scene type support.
|
|
Create a SceneManager instance of a given type.
|
|
Destroy all RenderQueueInvocationSequences.
|
|
Destroy a RenderQueueInvocationSequence.
|
|
Destroy an instance of a SceneManager.
|
|
Destroys a named rendering window.
|
|
Destroys a rendering window.
|
|
Retrieves a pointer to the window that was created automatically.
|
|
Retrieve a list of the available render systems.
|
|
Gets the number of the current frame.
Definition at line 661 of file OgreRoot.h. |
|
Utility function for getting a better description of an error code.
|
|
Gets the period over which OGRE smooths out fluctuations in frame times.
Definition at line 771 of file OgreRoot.h. References Ogre::Real. |
|
Retrieves a reference to the current MeshManager.
|
|
Get a MovableObjectFactory for the given type.
|
|
Return an iterator over all the MovableObjectFactory instances currently registered.
|
|
Get a RenderQueueInvocationSequence.
|
|
Retrieve a pointer to the currently selected render system.
|
|
Retrieve a pointer to the render system by the given name.
|
|
Retrieves a pointer to the a named render window.
|
|
Get an existing SceneManager instance that has already been created, identified by the instance name.
|
|
Get an iterator over all the existing SceneManager instances.
|
|
Get more information about a given type of SceneManager.
|
|
Iterate over all types of SceneManager available for construction, providing some information about each one.
|
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< Root >. |
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< Root >. |
|
Retrieves a reference to the current TextureManager.
|
|
Gets a pointer to the central timer used for all OGRE timings.
|
|
Checks whether a factory is registered for a given MovableObject type.
|
|
Initialises the renderer.
|
|
Initialise all loaded plugins - allows plugins to perform actions once the renderer is initialised.
|
|
Returns whether the system is initialised or not.
Definition at line 288 of file OgreRoot.h. |
|
Manually load a plugin.
|
|
Method reads a plugins configuration file and instantiates all plugins.
|
|
|
|
Queues the end of rendering.
|
|
Removes a FrameListener from the list of listening classes.
|
|
Removes a previously registered MovableObjectFactory.
|
|
Removes a resource location from the list.
|
|
Unregister a SceneManagerFactory.
|
|
Render one frame.
|
|
Checks for saved video/sound/etc settings.
|
|
Saves the details of the current configuration.
|
|
Sets the period over which OGRE smooths out fluctuations in frame times.
Definition at line 769 of file OgreRoot.h. References Ogre::Real. |
|
Sets the rendering subsystem to be used.
|
|
Displays a dialog asking the user to choose system settings.
|
|
Shuts down the system manually.
|
|
Shuts down all loaded plugins - allows things to be tidied up whilst all plugins are still loaded.
|
|
Starts / restarts the automatic rendering cycle.
|
|
|
|
Manually unloads a plugin.
|
|
Unloads all loaded plugins.
|
|
Definition at line 65 of file OgreRoot.h. |
|
Definition at line 68 of file OgreRoot.h. |
|
Definition at line 82 of file OgreRoot.h. |
|
Definition at line 98 of file OgreRoot.h. |
|
Definition at line 116 of file OgreRoot.h. |
|
Definition at line 114 of file OgreRoot.h. |
|
Definition at line 88 of file OgreRoot.h. |
|
Definition at line 102 of file OgreRoot.h. |
|
Definition at line 70 of file OgreRoot.h. |
|
Definition at line 77 of file OgreRoot.h. |
|
Definition at line 103 of file OgreRoot.h. |
|
Definition at line 79 of file OgreRoot.h. |
|
Definition at line 80 of file OgreRoot.h. |
|
Definition at line 112 of file OgreRoot.h. |
|
Contains the times of recently fired events.
Definition at line 160 of file OgreRoot.h. |
|
Definition at line 101 of file OgreRoot.h. |
|
Definition at line 93 of file OgreRoot.h. |
|
Definition at line 73 of file OgreRoot.h. |
|
Definition at line 91 of file OgreRoot.h. |
|
Set of registered frame listeners.
Definition at line 149 of file OgreRoot.h. |
|
Definition at line 104 of file OgreRoot.h. |
|
Definition at line 100 of file OgreRoot.h. |
|
Are we initialised yet?
Definition at line 123 of file OgreRoot.h. |
|
Definition at line 113 of file OgreRoot.h. |
|
Definition at line 76 of file OgreRoot.h. |
|
Definition at line 115 of file OgreRoot.h. |
|
Definition at line 83 of file OgreRoot.h. |
|
Definition at line 84 of file OgreRoot.h. |
|
Definition at line 109 of file OgreRoot.h. |
|
Definition at line 110 of file OgreRoot.h. |
|
Definition at line 90 of file OgreRoot.h. |
|
Definition at line 87 of file OgreRoot.h. |
|
Definition at line 85 of file OgreRoot.h. |
|
Definition at line 81 of file OgreRoot.h. |
|
Definition at line 106 of file OgreRoot.h. |
|
Definition at line 99 of file OgreRoot.h. |
|
Definition at line 71 of file OgreRoot.h. |
|
Set of frame listeners marked for removal.
Definition at line 152 of file OgreRoot.h. |
|
Definition at line 67 of file OgreRoot.h. |
|
Definition at line 95 of file OgreRoot.h. |
|
Definition at line 94 of file OgreRoot.h. |
|
Definition at line 117 of file OgreRoot.h. |
|
Definition at line 120 of file OgreRoot.h. |
|
Definition at line 54 of file OgreSingleton.h. |
|
Definition at line 78 of file OgreRoot.h. |
|
Definition at line 86 of file OgreRoot.h. |
|
Definition at line 89 of file OgreRoot.h. |
|
Definition at line 97 of file OgreRoot.h. |
|
Definition at line 69 of file OgreRoot.h. |
|
Definition at line 92 of file OgreRoot.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:43:01 2006