Page 1 of 1

CEGUI on DirectX 11 with OGRE 14

Posted: Tue Apr 29, 2025 12:10 pm
by lyn19417

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)

  1. Open the source file "YOUR CEGUI SRC\cegui\src\RendererModules\Ogre\GeometryBuffer.cpp"
  2. Locate the draw() method
  3. Comment line d_owner.setupRenderingBlendMode(d_blendMode);
  4. Comment line d_renderSystem.setScissorTest(i->clip, d_clipRect.left(), d_clipRect.top(), d_clipRect.right(), d_clipRect.bottom())
  5. Recompile the OgreRenderer

Now you should be good to go now!


Re: CEGUI on DirectX 11 with OGRE 14

Posted: Tue May 06, 2025 12:35 pm
by sercero

And with this change the other renderers work fine too? (I mean: DirectX9, OpenGL, etc?)

If that is the case then why is that code there? :?


Re: CEGUI on DirectX 11 with OGRE 14

Posted: Thu Jun 19, 2025 1:47 pm
by lyn19417

Other renderers don't have that issue, it's only occurring on DirectX 11. With the changes, I didn't notice any side effects even on DirectX9 or Open GL.


Re: CEGUI on DirectX 11 with OGRE 14

Posted: Wed Nov 19, 2025 11:35 am
by paul424

I had similar issue, that is did the same to allow Ogre3d operating on large textures ( opengl 3.0) ...... the solution was to disable the scissors test, otherwise the texture would be clamped to the size of current viewport..... Would also love to learn how to adapt the CEGUI to newer version of Ogre, as opendungoens-plus upgrade to OGRE 14 is blocked by errors in this library.


Re: CEGUI on DirectX 11 with OGRE 14

Posted: Sat Jun 13, 2026 11:05 pm
by slapin

See PRs.