I) Can't setup Ogre render for CEGUI SDK
I'm just starting to look at CEGui recently. and I follow
this guide to setup CeGUI with Ogre 2.1 renderer, and I hit 2 problems:
1st, Even when I set the environment variables for OIS_HOME, OGRE_HOME, OGRE_SDK. CMake can't find:
Code: Select all
OGRE_RenderSystem_Direct3D11_INCLUDE_DIR,..., OGRE_RenderSystem_GL_LIBRARY_REL.
Maybe the folder structure in the script findOgre of CeGUI is pretty outdated (it's outdated for OIS, but I can fix for OIS because OIS is pretty small).
2nd, When I build CeGUI (I just ignore the missing path above), I got 15 errors:
Code: Select all
Severity Code Description Project File Line Suppression State
Error C2660 'CEGUI::OgreRenderer::create': function does not take 0 arguments CEGUISampleFramework-0.8 E:\Source\cegui\samples_framework\src\CEGuiOgreBaseApplication.cpp 90
Error C2660 'Ogre::ResourceGroupManager::initialiseAllResourceGroups': function does not take 0 arguments CEGUISampleFramework-0.8 E:\Source\cegui\samples_framework\src\CEGuiOgreBaseApplication.cpp 141
Error C2661 'Ogre::Root::createSceneManager': no overloaded function takes 2 arguments CEGUISampleFramework-0.8 E:\Source\cegui\samples_framework\src\CEGuiOgreBaseApplication.cpp 76
Error C2664 'Ogre::Viewport *Ogre::RenderTarget::addViewport(float,float,float,float)': cannot convert argument 1 from 'Ogre::Camera *' to 'float' CEGUISampleFramework-0.8 E:\Source\cegui\samples_framework\src\CEGuiOgreBaseApplication.cpp 84
Error C2039 'OT_TRIANGLE_LIST': is not a member of 'Ogre::v1::RenderOperation' CEGUIOgreRenderer-0 E:\Source\cegui\cegui\src\RendererModules\Ogre\GeometryBuffer.cpp 99
Error C2039 'pixelShader': is not a member of 'Ogre::HlmsCache' CEGUIOgreRenderer-0 E:\Source\cegui\cegui\src\RendererModules\Ogre\Renderer.cpp 1106
Error C2530 'renderer': references must be initialized CEGUISampleFramework-0.8 E:\Source\cegui\samples_framework\src\CEGuiOgreBaseApplication.cpp 90
Error C2039 'setBackgroundColour': is not a member of 'Ogre::Viewport' CEGUISampleFramework-0.8 E:\Source\cegui\samples_framework\src\CEGuiOgreBaseApplication.cpp 85
Error C2039 'unbindGpuProgram': is not a member of 'Ogre::RenderSystem' CEGUIOgreRenderer-0 E:\Source\cegui\cegui\src\RendererModules\Ogre\Renderer.cpp 1118
Error C2039 'unbindGpuProgram': is not a member of 'Ogre::RenderSystem' CEGUIOgreRenderer-0 E:\Source\cegui\cegui\src\RendererModules\Ogre\Renderer.cpp 1119
Error C2039 'vertexShader': is not a member of 'Ogre::HlmsCache' CEGUIOgreRenderer-0 E:\Source\cegui\cegui\src\RendererModules\Ogre\Renderer.cpp 1105
Error C2039 '_setHlmsBlendblock': is not a member of 'Ogre::RenderSystem' CEGUIOgreRenderer-0 E:\Source\cegui\cegui\src\RendererModules\Ogre\Renderer.cpp 1034
Error C2039 '_setHlmsMacroblock': is not a member of 'Ogre::RenderSystem' CEGUIOgreRenderer-0 E:\Source\cegui\cegui\src\RendererModules\Ogre\Renderer.cpp 1074
Error C2039 '_setProgramsFromHlms': is not a member of 'Ogre::RenderSystem' CEGUIOgreRenderer-0 E:\Source\cegui\cegui\src\RendererModules\Ogre\Renderer.cpp 1107
Error (active) class "Ogre::v1::RenderOperation" has no member "OT_TRIANGLE_LIST" CEGUIOgreRenderer-0 e:\Source\cegui\cegui\src\RendererModules\Ogre\GeometryBuffer.cpp 99
So if I'm not mistaken, CeGUI is still need to tweak a bit to work with Ogre renderer. It's not work out-of-the-box, is it?
II) Use CeGUI in Ogre project
I just want to do I) because I want to know how to use CeGUI with Ogre project, if I successfully use CeGUI in Ogre project, I can live without I)
Anyway, I can setup the default CeGUI (without Ogre renderer) and realize that: to basically use CeGUI, I just need the lib file: CEGUIBase-0.lib. If I'm not mistaken, all I need is just include this lib into my project (also some h files of CeGUI) then I can use CeGUI with Ogre. I have already made a project, which reference to this lib file, but I don't know how to show the GUI on the Ogre Window (which is created by SDL_CreateWindow())
According to
this article, there are only 3 step to do this:
Crazy Eddie wrote:
Create an instance of a CEGUI::Renderer based object.
Create the CEGUI::System object (passing in the renderer created above).
Each frame, call the CEGUI::System::renderAllGUIContexts function to perform the rendering.
But I don't know how to do it.
To sum up, here is my goal:
I have
Ogre empty project
Code: Select all
Samples/2.0/Tutorials/EmptyProject
and
CeGUI Hello World
Goal: show
CeGUI Hello World on
Ogre empty project's window
Thanks for reading