Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>After getting ogre compiled/installed using cmake on linux those two config files live at </p> <pre><code>/usr/local/share/OGRE/resources.cfg /usr/local/share/OGRE/plugins.cfg </code></pre> <p>just import both into your ogre project Once ogre is installed, your project does not need cmake To get you going for the tutorials :</p> <p>How to setup eclipse with ogre :</p> <p>File -> New -> C++ Project -> EmptyProject</p> <p>C/C++ Build -> Environment OGRE_LOC /home/scott/src/ogre_src_v1-7-3</p> <p>C/C++ Build -> Settings</p> <pre><code>GCC C++ Compiler -&gt; Includes ${OGRE_LOC}/OgreMain/include /usr/local/include/OGRE ${OGRE_LOC}/Samples/Common/include /usr/include/OIS GCC C++ Linker -&gt; Libraries (-l) OgreMain OgreTerrain OIS CEGUIOgreRenderer </code></pre> <p>right click project -> Properties -> Import</p> <pre><code>General -&gt; File System -&gt; ONLY import those 4 files from the tutorial project (NOT dist, build, makefiles ...) BaseApplication.cpp BaseApplication.h TutorialApplication.cpp TutorialApplication.h also import these files : /usr/local/share/OGRE/resources.cfg /usr/local/share/OGRE/plugins.cfg </code></pre> <p>Now you are ready to compile and run !</p> <p>To add an Ogre model :</p> <p>First do above steps to create an ogre project, assure it compiles OK. On execution it'll render a black screen - thats fine. Now to add a model (an Ogre) simply edit TutorialApplication.cpp so function createScene appears as :</p> <p>``</p> <p>void TutorialApplication::createScene(void) {</p> <pre><code>Ogre::Entity* ogreHead = mSceneMgr-&gt;createEntity("Head", "ogrehead.mesh"); Ogre::SceneNode* headNode = mSceneMgr-&gt;getRootSceneNode()-&gt;createChildSceneNode(); headNode-&gt;attachObject(ogreHead); // Set ambient light mSceneMgr-&gt;setAmbientLight(Ogre::ColourValue(0.5, 0.5, 0.5)); // Create a light Ogre::Light* l = mSceneMgr-&gt;createLight("MainLight"); l-&gt;setPosition(20,80,50); </code></pre> <p>}</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload