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/Python-Ogre

图形学

http://staff.ustc.edu.cn/\~zhuang/acg/index.htm

示例代码

c++ 复制代码
#include <Ogre.h>

int main()
{
    // 创建 Root
    Ogre::Root* root = new Ogre::Root();

    // 加载插件
    root->loadPlugin("RenderSystem_GL");

    // 创建 RenderSystem
    Ogre::RenderSystem* rs = root->getRenderSystemByName("OpenGL Rendering Subsystem");
    root->setRenderSystem(rs);

    // 初始化 Root
    root->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;
}
 
相关推荐
地狱为王9 小时前
Unity使用VoxLock实现语音隔离
unity·游戏引擎·音频处理·voxlock
解决小子13 小时前
【虚幻引擎】【GAS】模块详解
游戏引擎·虚幻·gas
一只大鸽子14 小时前
游戏开发笔记0-Godot启动
笔记·游戏引擎·godot
暴走约伯16 小时前
【VFX工具链源码拆解 03】告别机械劳动(下):材质字典映射批处理与智能纹理槽识别
unity·游戏引擎·材质
暴走约伯17 小时前
【VFX工具链源码拆解 01】总体架构:大型项目特效流程的程序化落地
开发语言·经验分享·3d·unity·架构·游戏引擎
Oiiouui1 天前
Godot-GridGame架构DI容器全局联动设计
架构·游戏引擎·godot
FFFFujige2 天前
【Unity】一个的Dots用Ruhanka踩坑记录
unity·游戏引擎
wgslucky3 天前
Godot UI管理与使用
游戏引擎·godot
Oiiouui3 天前
Godot-GridGame架构屏幕UI层
架构·游戏引擎·godot
凯基迪科技3 天前
Unity游戏加密锁逆向方案、选型与攻防分析
游戏·unity·游戏引擎