I am a newcomer to Ogre3D and have had some trouble getting up and running to where I can build applications. I am running Gentoo Linux with gcc 4.3.4. Here is what I have done and where I have gotten stuck:
- I downloaded, compiled, and installed the 1.7.0RC1 source release with no problems following the wiki instructions
- Set up an environment variable pointing to the ogre folder extracted from the source release. (The Wiki says to point it at the 'ogrenew' folder, but then I saw an old post on the forum that said 'ogrenew' isn't used anymore... looks like the wiki needs an update?)
Code: Select all
peter@i7beast ~/gamedev $ env | grep OGRE OGRE_SRC=/home/peter/gamedev/ogre-source/ogre
- Set up the SampleApp project following the instructions from the wiki, which involved
- copying some headers from $OGRE_SRC/Samples/Common/include to the application's include folder
- creating the SampleApp.cpp within the application's src folder
- creating the CMakeLists.txt within the application's folder. (I am willing to try other build setups, but I figured since Ogre uses cmake, I might as well also)
Code: Select all
peter@i7beast ~/gamedev/00_baseOgreProject $ ls . include/ src/ .: CMakeCache.txt CMakeFiles CMakeLists.txt Makefile cmake_install.cmake include src include/: ExampleApplication.h ExampleFrameListener.h src/: SampleApp.cpp
- Running cmake looks OK
Code: Select all
peter@i7beast ~/gamedev/00_baseOgreProject $ cmake . -- Looking for OGRE... -- Found Ogre Cthugha (1.7.0) -- Found OGRE: optimized;/usr/local/lib64/libOgreMain.so;debug;/usr/local/lib64/libOgreMain.so -- Looking for OGRE_Paging... -- Found OGRE_Paging: optimized;/usr/local/lib64/libOgrePaging.so;debug;/usr/local/lib64/libOgrePaging.so -- Looking for OGRE_Terrain... -- Found OGRE_Terrain: optimized;/usr/local/lib64/libOgreTerrain.so;debug;/usr/local/lib64/libOgreTerrain.so -- Looking for OGRE_Property... -- Found OGRE_Property: optimized;/usr/local/lib64/libOgreProperty.so;debug;/usr/local/lib64/libOgreProperty.so -- Looking for OGRE_RTShaderSystem... -- Found OGRE_RTShaderSystem: optimized;/usr/local/lib64/libOgreRTShaderSystem.so;debug;/usr/local/lib64/libOgreRTShaderSystem.so -- Looking for OIS... -- Found OIS: optimized;/usr/lib64/libOIS.so;debug;/usr/lib64/libOIS.so -- Configuring done -- Generating done -- Build files have been written to: /home/peter/gamedev/00_baseOgreProject
- make looks OK
Code: Select all
peter@i7beast ~/gamedev/00_baseOgreProject $ make [100%] Building CXX object CMakeFiles/SampleApp.dir/src/SampleApp.cpp.o Linking CXX executable SampleApp [100%] Built target SampleApp
- Executing SampleApp fails (but I fixed it -- keep reading)
I remember the wiki saying I needed some cfg files, but with no additional explanation... I found them installed in /usr/local/bin, so I copied them to the application folder and took a look at them. I changed PluginFolder within plugins.cfg because the original used a relative path (that didn't exist!). I then also manually changed all relative paths in resources.cfg to absolute paths. At this point I was thinking, I must be doing this wrong (more on this later).
Code: Select all
... plugins.cfg not found, automatic plugin loading disabled. *-*-* OGRE Initialising *-*-* Version 1.7.0RC1 (Cthugha) Exception: OGRE EXCEPTION(6:FileNotFoundException): 'resources.cfg' file not found! in ConfigFile::load at /home/peter/gamedev/ogre/ogre/OgreMain/src/OgreConfigFile.cpp (line 83) *-*-* OGRE Shutdown ...
Code: Select all
[plugins.cfg] # Define plugin folder PluginFolder=/usr/local/lib/OGRE ... [resources.cfg] # Resources required by the sample browser and most samples. [Essential] Zip=/home/peter/gamedev/ogre-source/ogre/Samples/Media/packs/SdkTrays.zip FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/thumbnails # Common sample resources needed by many of the samples. # Rarely used resources should be separately loaded by the # samples which require them. [Popular] FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/fonts FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/materials/programs FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/materials/scripts FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/materials/textures FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/materials/textures/nvidia FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/models FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/particle FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/DeferredShadingMedia FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/PCZAppMedia FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media/RTShaderLib Zip=/home/peter/gamedev/ogre-source/ogre/Samples/Media/packs/cubemap.zip Zip=/home/peter/gamedev/ogre-source/ogre/Samples/Media/packs/cubemapsJS.zip Zip=/home/peter/gamedev/ogre-source/ogre/Samples/Media/packs/dragon.zip Zip=/home/peter/gamedev/ogre-source/ogre/Samples/Media/packs/fresneldemo.zip Zip=/home/peter/gamedev/ogre-source/ogre/Samples/Media/packs/ogretestmap.zip Zip=/home/peter/gamedev/ogre-source/ogre/Samples/Media/packs/ogredance.zip Zip=/home/peter/gamedev/ogre-source/ogre/Samples/Media/packs/skybox.zip [General] FileSystem=/home/peter/gamedev/ogre-source/ogre/Samples/Media
- Running SampleApp then yielded:
more on the installer... I installed Ogre3D using the quick start guide which basically just tells you to cmake and then make. What it didn't tell me is that this would NOT install the samples and media content that I would need(?) in order to build the SampleApp. Looking at the installed /usr/local/bin/*.cfg was confusing as the locations point to relative paths (under ../share) that didn't exist. I went back and changed the following build options to TRUE within $OGRE_SRC/CMakeLists.txt, and reinstalled Ogre.
Code: Select all
option(OGRE_INSTALL_PLUGINS_HEADERS "Install header files for Ogre plugins." TRUE)
option(OGRE_INSTALL_SAMPLES "Install Ogre demos." TRUE)
option(OGRE_INSTALL_DOCS "Install documentation." TRUE)
option(OGRE_INSTALL_MEDIA "Install media files." TRUE)
option(OGRE_INSTALL_SAMPLES_SOURCE "Install samples source files." TRUE)
latest resources.cfg
Code: Select all
# Resources required by the sample browser and most samples.
[Essential]
Zip=/usr/local/share/OGRE/media/packs/SdkTrays.zip
FileSystem=/usr/local/share/OGRE/media/thumbnails
# Common sample resources needed by many of the samples.
# Rarely used resources should be separately loaded by the
# samples which require them.
[Popular]
FileSystem=/usr/local/share/OGRE/media/fonts
FileSystem=/usr/local/share/OGRE/media/materials/programs
FileSystem=/usr/local/share/OGRE/media/materials/scripts
FileSystem=/usr/local/share/OGRE/media/materials/textures
FileSystem=/usr/local/share/OGRE/media/materials/textures/nvidia
FileSystem=/usr/local/share/OGRE/media/models
FileSystem=/usr/local/share/OGRE/media/particle
FileSystem=/usr/local/share/OGRE/media/DeferredShadingMedia
FileSystem=/usr/local/share/OGRE/media/PCZAppMedia
FileSystem=/usr/local/share/OGRE/media/RTShaderLib
Zip=/usr/local/share/OGRE/media/packs/cubemap.zip
Zip=/usr/local/share/OGRE/media/packs/cubemapsJS.zip
Zip=/usr/local/share/OGRE/media/packs/dragon.zip
Zip=/usr/local/share/OGRE/media/packs/fresneldemo.zip
Zip=/usr/local/share/OGRE/media/packs/ogretestmap.zip
Zip=/usr/local/share/OGRE/media/packs/ogredance.zip
Zip=/usr/local/share/OGRE/media/packs/skybox.zip
[General]
FileSystem=/usr/local/share/OGRE/media
Thanks for reading. Comments/suggestions appreciated.