Hello everyone,
I am new to the CEGUI community.
First let me say THANK YOU! to Crazy Eddie (and all of the other developers) for pouring your heart and soul into this killer project. Can't wait to see the depth of its power!
My problem:
I have the GUI system up and rendering with a DX9 app (I followed the basic tutorials--easy enough). However, regardless of where I place the renderGUI() call in my drawGame() sequence, CEGUI paints over everything else and leaves a black background. I can't get my underlying tiles to be visible.
EDIT --
I did some further debugging and found that on the first loop through the drawing routine, the tiles get drawn and the GUI window is drawn over top as it should be. ONLY on the first run through the drawGame() loop. What could be breaking here?
-- EDIT
I'm using this layout file:
<?xml version="1.0" ?>
<GUILayout>
<Window Type="DefaultWindow" Name="root">
<Window Type="TaharezLook/FrameWindow" Name="testWindow">
<Property Name="Position" Value="x:0.25 y:0.25" />
<Property Name="Size" Value="w:0.5 h:0.5" />
<Property Name="Text" Value="Hello World!" />
</Window>
</Window>
</GUILayout>
and here is my initialization code (called in the constructor of my graphics class):
//Setup the CEGUI Renderer
this->myRenderer = new CEGUI::DirectX9Renderer(this->d3dDevice, 0);
new CEGUI::System(myRenderer);
// load in the scheme file, which auto-loads the TaharezLook imageset
CEGUI::SchemeManager::getSingleton().loadScheme("../datafiles/schemes/TaharezLook.scheme");
// load in a font. The first font loaded automatically becomes the default font.
CEGUI::FontManager::getSingleton().createFont("../datafiles/fonts/Commonwealth-10.font");
CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");
CEGUI::Window* myRoot = CEGUI::WindowManager::getSingleton().loadWindowLayout("test.layout");
CEGUI::System::getSingleton().setGUISheet(myRoot);
I would greatly appreciate a point in the right direction, friends. Let me know if you have one!
Cheers,
Synergy
GEGUI breaking my drawing routine?
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: GEGUI breaking my drawing routine?
I would imagine that there is some render state being set by CEGUI which does not get properly re-set for your own rendering next time through the render loop - which is why it works for only one frame.
Take a look at the states we currently set in the src/renderers/directx9GUIRenderer/d3d9renderer.cpp file, and you'll probably be able to work out which one(s) you need to initialise for your own rendering
Take a look at the states we currently set in the src/renderers/directx9GUIRenderer/d3d9renderer.cpp file, and you'll probably be able to work out which one(s) you need to initialise for your own rendering

Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: GEGUI breaking my drawing routine?
Aha!
CrazyEddie, you're clearly 'the man'. I had suspicions that the CEGUI renderer was changing something, but my limited knowledge of DirectX-related details led me to this forum.
I examined the differences and determined that I needed to call SetFVF (reset to my vertex format) and SetSamplerState (reset texture filtering to remove a blur effect I was experiencing).
Problem fixed!
I really appreciate the support you provide in these forums, CrazyEddie. Rock on!
Cheers,
Synergy
CrazyEddie, you're clearly 'the man'. I had suspicions that the CEGUI renderer was changing something, but my limited knowledge of DirectX-related details led me to this forum.
I examined the differences and determined that I needed to call SetFVF (reset to my vertex format) and SetSamplerState (reset texture filtering to remove a blur effect I was experiencing).
Problem fixed!
I really appreciate the support you provide in these forums, CrazyEddie. Rock on!
Cheers,
Synergy
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 3 guests