#include <OGRE/ExampleApplication.h> #include <OGRE/Ogre.h> class EnvMapApplication : public ExampleApplication { public: EnvMapApplication() { } virtual void createScene() { mSceneMgr->setAmbientLight(Ogre::ColourValue(1.0, 0.0, 0.0, 0.0)); Ogre::Light * light = mSceneMgr->createLight("MainLight"); this->mWindow->setFullscreen(false, 800, 600); Ogre::Entity * ent = mSceneMgr->createEntity("head", "/usr/share/OGRE/media/models/ogrehead.mesh"); mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); } }; int main() { EnvMapApplication app; app.go(); return 0; }
project(OGRETest) cmake_minimum_required(VERSION 2.8) find_package(Boost COMPONENTS thread QUIET) aux_source_directory(. SRC_LIST) add_executable(${PROJECT_NAME} ${SRC_LIST}) target_link_libraries(${PROJECT_NAME} libOIS.so libOgreRTShaderSystem.so libOgreMain.so libOgreProperty.so libOgrePaging.so ${OGRE_${PLUGIN}_LIBRARY} ${Boost_LIBRARIES} ${OGRE_LIBRARIES} libGL.so libGLU.so)