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: OGRE-MOGRE interconnection
View page
Source of version: 2
(current)
Normally a wrapper (like ((OgreDotNet)), which uses SWIG) will create a new .NET object each time you need access to a native object, and the class type of the .NET object will be that of the method's return type (the wrapper cannot know which subclass the native object actually is). To address this issue the OGRE's source is modified and the OGRE classes are interconnected to the MOGRE classes. Instead of MOGRE creating a new .NET object each time you need to access an OGRE object, the OGRE object itself creates the appropriate .NET object the first time it is requested and returns it in subsequent requests. This allows for checking equality of objects (example code is in C#): {CODE(wrap="1", colors="c#")} Camera cam1 = sceneMgr.CreateCamera("PlayerCam"); Camera cam2 = sceneMgr.GetCamera("PlayerCam"); bool areEqual = (cam1 == cam2); //areEqual is true{CODE} And returning the correct subclass: {CODE(wrap="1", colors="c#")} MovableObject object = sceneNode.GetAttachedObject(0); if (object is Entity) { ... } else if (object is Camera) { ... } else { ... }{CODE} Because of the modifications to OGRE's source, in order to use a native plugin with MOGRE (like the ((Paging Scene Manager))) you have to recompile it using the modified OGRE's include files.
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
20 online users