Ogre_v1.12.0 最新github版升级总结

Ogre_v1.12.0版中将 图片解码器完全单独抽离出来,仅内置
DDS和ETC两种图片解码的支持,不再依赖庞大的FreeImage图片解码库,这意味着更小的核心。编译成dll仅3M多,相比以前8M左右的包体,大大缩小了程序文件,在Android上编译成apk(压缩3M的so)只有接近2M的大小, 同样如果要支持png jpg bmp等多种图片格式,需要以插件的形式加载 Codec_STBI 插件,该插件使用stb-image库解码。并且该库也只有不到300k的大小。

遇到不兼容问题:1. Ogre:: OgreWindowEventUtilities 类从OgreMain中移动到了 OgreBites组件中,并且改变命名空间 成OgreBites::OgreWindowEventUtilities. 编译MyGUI时需要注意修改包含路径,官方文档如下:
WindowEventUtilities were moved to the Bites Component. They rely on low level platform code (like X11 on linux) and are mostly obsoleted by the ApplicationContext class. Generally you should be using SDL2/ Qt for windowing and just embed Ogre.
Windows porting note: to continue using WindowEventUtilities, you now must explicitly register _WndProc for each window you create:

NameValuePairList miscParams;
miscParams[“windowProc”] =
StringConverter::toString((size_t)WindowEventUtilities::_WndProc);
RenderWindow* renderWindow =
Root::getSingleton().createRenderWindow(name, width, height, isFullScreen, &miscParams);
WindowEventUtilities::_addRenderWindow(renderWindow);
i.e. Ogre::Root::initialise(True, …) does no longer work.

similarly the ConfigDialog was moved to the Bites Component.

unused ErrorDialog API was dropped

遇到的bug:
Ogre::Root类使用自动创建窗口方法有bug。也即下面的用法会报错
mWindow = mRoot->initialise(true);
解决方法:修改OgreRoot.cpp 中 initialise(…)函数;,将
mIsInitialised = true; 移动到 下面的if判断之前。也即

mIsInitialised = true;  
    if (autoCreateWindow)
    {
        auto desc = mActiveRenderer->getRenderWindowDescription();
        desc.name = windowTitle;
        mAutoWindow = createRenderWindow(desc);
    }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值