您的位置:首页 > 其它

OGRE HelloWorld

2014-01-05 11:46 183 查看
#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)


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: