Ogre 游戏中初始化 CEGUI

来源:互联网 发布:淘宝网禁售电话卡 编辑:程序博客网 时间:2024/05/19 18:16

1, 在类中添加 成员变量 CEGUI::OgreRenderer *mRenderer; 

2,构造函数中初始化 mRenderer=0;

3,在setup()函数里调用 initCEGUI();

void Game::initCEGUI()
{
 mRenderer = &CEGUI::OgreRenderer::bootstrapSystem();
}

 

booststrpSystem()函数的功能:

Convenience function that creates all the Ogre specific objects and then initialises the CEGUI system with them.

The created Renderer will use the default Ogre rendering window as the  default output surface.

 

 

        This will create and initialise the following objects for you:
        - CEGUI::OgreRenderer
        - CEGUI::OgreResourceProvider
        - CEGUI::OgreImageCodec
        - CEGUI::System

原创粉丝点击