LoadingMeshesWithoutOgre         Some quick notes on loading meshes without initialising the Ogre renderer
Print

This can be used for loading meshes for things like collision detection on dedicated game servers (ie no rendering)

Table of contents

Setup

mRoot = new Root("", "ogre.cfg", "Ogre.log");
    new Ogre::DefaultHardwareBufferManager();
    Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
                    "resources", "FileSystem", 
                    Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();

Loading the mesh

 

Ogre::MeshPtr    mesh = Ogre::MeshManager::getSingleton().load(
                    "tree1.mesh", 
                    Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    // do something nefarious with 'mesh'

 


Contributors to this page: jacmoe133512 points  and OgreWikiBot .
Page last modified on Saturday 02 of January, 2010 23:37:10 UTC by jacmoe133512 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.