Ogre 游戏中初始化 CEGUI

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

你可能感兴趣的:(游戏,function,System,output)