GEGUI breaking my drawing routine?
Posted: Mon Aug 01, 2005 17:28
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
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