初始化 CEGUI

mRenderer = &CEGUI::OgreRenderer::bootstrapSystem(); CEGUI::Imageset::setDefaultResourceGroup("Imagesets"); CEGUI::Font::setDefaultResourceGroup("Fonts"); CEGUI::Scheme::setDefaultResourceGroup("Schemes"); CEGUI::WidgetLookManager::setDefaultResourceGroup("LookNFeel"); CEGUI::WindowManager::setDefaultResourceGroup("Layouts");

Imagesets, Fonts, Schemes, LookNFeel, Layouts,对应于 resources.cfg中的

中括号部分

[Popular] FileSystem=../Media/Popular [Imagesets] FileSystem=F:/TheThirdLib/CEGUI-0.7.4/datafiles/imagesets [Fonts] FileSystem=F:/TheThirdLib/CEGUI-0.7.4/datafiles/fonts [Schemes] FileSystem=F:/TheThirdLib/CEGUI-0.7.4/datafiles/schemes [LookNFeel] FileSystem=F:/TheThirdLib/CEGUI-0.7.4/datafiles/looknfeel [Layouts] FileSystem=F:/TheThirdLib/CEGUI-0.7.4/datafiles/layouts

如果是加载layout文件也要先调用CEGUI::System::create("^.scheme") 文件,这是很重要的,

你可能感兴趣的:(初始化 CEGUI)