Hello
I recently started using OGRE 14 with CEGUI for a project of mine. I encountered difficulties while incorporating CEGUI as I realized sometime after that DirectX 11 didn't support multiple viewports being cleared. (https://learn.microsoft.com/fr-fr/windo ... targetview) Often you would either get all your viewports with the wrong clear color or in the worst cases, all your viewports simply not rendering anything. Although I'm not completely understanding the way CEGUI's OgreRenderer works, it seems to me that it's very likely to be the problem as other RenderSystems like D3D9, OpenGL or Vulkan work fine.
With context aside, I spent hours (10+) to actually try to fix the CEGUI UI covering what's beneath. (in my case it was my scene content)
The method I'm going to show looks more like a hack as I'm not entirely sure what's the reason behind why it works. (if you have any insights on that, let me know!)
Also note that it's not foolproof, what I tried didn't seem to have any side-effect but it doesn't mean that there aren't any!
Without further ado, the steps are as follow: (Assuming you have a setup where you at least cloned the CEGUI source code in your project)
- Open the source file "
YOUR CEGUI SRC\cegui\src\RendererModules\Ogre\GeometryBuffer.cpp
" - Locate the
draw()
method - Comment line
d_owner.setupRenderingBlendMode(d_blendMode);
- Comment line
d_renderSystem.setScissorTest(i->clip, d_clipRect.left(), d_clipRect.top(), d_clipRect.right(), d_clipRect.bottom())
- Recompile the OgreRenderer
Now you should be good to go now!