本文主要是介绍ogre3d 资料,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
官网
https://www.ogre3d.org/
主页
https://wiki.ogre3d.org/Home
Manual
https://ogrecave.github.io/ogre/api/latest/manual.html#SEC_Contents
API
https://www.ogre3d.org/docs/api/1.9/
https://ogrecave.github.io/ogre/api/latest/
SDK
http://www.ogre3d.org/download/sdk
学习
https://wiki.ogre3d.org/tiki-index.php?page=Tutorials
Python-Ogre
https://wiki.ogre3d.org/PyOgre
https://wiki.ogre3d.org/Python-Ogre
图形学
http://staff.ustc.edu.cn/~zhuang/acg/index.htm
示例代码
#include <Ogre.h>int main()
{// 创建 RootOgre::Root* root = new Ogre::Root();// 加载插件root->loadPlugin("RenderSystem_GL");// 创建 RenderSystemOgre::RenderSystem* rs = root->getRenderSystemByName("OpenGL Rendering Subsystem");root->setRenderSystem(rs);// 初始化 Rootroot->initialise(false);// 创建窗口Ogre::RenderWindow* window = root->createRenderWindow("Ogre3D Example", 800, 600, false);// 创建场景管理器Ogre::SceneManager* sceneMgr = root->createSceneManager(Ogre::ST_GENERIC);// 创建相机Ogre::Camera* camera = sceneMgr->createCamera("MainCamera");camera->setPosition(Ogre::Vector3(0, 0, 500));camera->lookAt(Ogre::Vector3(0, 0, 0));// 创建视口Ogre::Viewport* viewport = window->addViewport(camera);viewport->setBackgroundColour(Ogre::ColourValue(0.5, 0.5, 0.5));// 设置渲染队列sceneMgr->setRenderQueueInvocationSequenceName("Basic");// 创建实体Ogre::Entity* entity = sceneMgr->createEntity("ExampleEntity", "ogrehead.mesh");// 创建场景节点Ogre::SceneNode* node = sceneMgr->getRootSceneNode()->createChildSceneNode();node->attachObject(entity);// 开始渲染循环while (!window->isClosed()){// 渲染一帧root->renderOneFrame();}// 清理root->shutdown();delete root;return 0;
}
这篇关于ogre3d 资料的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!