[solved] ItemListbox rendering issue
Posted: Thu Apr 11, 2013 14:21
Hi,
I try to populate the ItemListbox with some ListboxItem's containing child windows. Only the first ListboxItem is renderd correct.
The following do not render the attached childs.
I use CEGUI 0.7.9 and Ogre 1.8.1 using OgreOpenGL renderer .
The main layout:
The template like ListboxItem
The code to populate the ItemListBox
When executing the code, all items shows the text "Entry No x", but only the first Item will also render the child windows and
shows the text "Value No x"
Selecting works as expected.
What I'm missing. Please help.
Edit:
I removed the Ogre renderer and check with the CEGUI OpenGLRenderer and the issue disapears. So I think this is an issue somewhere inside
the Ogre renderer and the Ogre RTTManager.
Edit 2:
After updating the ATI drivers, the issue disaperas. It seems to me, that the older driver have a broken FBO support.
I try to populate the ItemListbox with some ListboxItem's containing child windows. Only the first ListboxItem is renderd correct.
The following do not render the attached childs.
I use CEGUI 0.7.9 and Ogre 1.8.1 using OgreOpenGL renderer .
Code: Select all
11/04/2013 14:11:35 (Std) ---- Version 0.7.9 (Build: Apr 10 2013 Debug GNU/Linux g++ 4.7.2 32 bit) ----
11/04/2013 14:11:35 (Std) ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
11/04/2013 14:11:35 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
11/04/2013 14:11:35 (Std) ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
11/04/2013 14:11:35 (Std) ---- Scripting module is: None ----
The main layout:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="DefaultWindow" Name="Config" >
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Window Type="GlossySerpentFHD/SimplePanel" Name="Config/LeftMenu" >
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0.141772,0},{0.9,0}}" />
<Window Type="GlossySerpentFHD/Button32" Name="Config/LeftMenu/Back" >
<Property Name="Font" Value="DejaVuSerif-HD-16" />
<Property Name="Text" Value="Zurück" />
<Property Name="UnifiedAreaRect" Value="{{0.0746747,0},{0.892798,0},{0.942237,0},{0.979856,0}}" />
</Window>
<Window Type="GlossySerpentFHD/Button32" Name="Config/LeftMenu/SIP_Globals" >
<Property Name="Font" Value="DejaVuSerif-HD-16" />
<Property Name="Text" Value="SIP Global" />
<Property Name="UnifiedAreaRect" Value="{{0.0746747,0},{0.0210096,0},{0.942237,0},{0.108066,0}}" />
</Window>
</Window>
<Window Type="GlossySerpentFHD/FrameWindow" Name="Config/Menu" >
<Property Name="Font" Value="DejaVuSerif-HD-16" />
<Property Name="Text" Value="Config" />
<Property Name="Alpha" Value="0.75" />
<Property Name="TitlebarFont" Value="DejaVuSerif-HD-16" />
<Property Name="SizingEnabled" Value="False" />
<Property Name="TitlebarEnabled" Value="True" />
<Property Name="UnifiedAreaRect" Value="{{0.157503,0},{0.023026,0},{0.991313,0},{0.871187,0}}" />
<Property Name="DragMovingEnabled" Value="False" />
<Property Name="CloseButtonEnabled" Value="False" />
<Window Type="GlossySerpentFHD/ItemListbox" Name="Config/Menu/List" >
<Property Name="Font" Value="DejaVuSerif-HD-16" />
<Property Name="AlwaysOnTop" Value="True" />
<Property Name="Alpha" Value="1.0" />
<Property Name="UnifiedAreaRect" Value="{{0.0163513,0},{0.0679387,0},{0.980328,0},{0.951647,0}}" />
</Window>
</Window>
</Window>
</GUILayout>
The template like ListboxItem
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="GlossySerpentFHD/ListboxItem" Name="LBI/Text" >
<Property Name="Font" Value="BlueHighway-20" />
<Property Name="AlwaysOnTop" Value="True" />
<Property Name="Alpha" Value="1.0" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{0.4,0}}" />
<Window Type="GlossySerpentFHD/StaticText" Name="LBI/Text/Base" >
<Property Name="Font" Value="DejaVuSerif-HD-12" />
<Property Name="AlwaysOnTop" Value="True" />
<Property Name="Alpha" Value="1.0" />
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
</Window>
</GUILayout>
The code to populate the ItemListBox
Code: Select all
...
CEGUI::ItemListbox * m_ILB;
CEGUI::Window * m_LBI_Text;
...
void Init()
...
m_ILB = dynamic_cast<CEGUI::ItemListbox *>(CEGUI::WindowManager::getSingletonPtr()->getWindow("Config/Menu/List"));
m_ILB->setMultiSelectEnabled(true);
m_LBI_Text = dynamic_cast<CEGUI::Window *>(CEGUI::WindowManager::getSingletonPtr()->getWindow("LBI/Text"));
...
void CreateListFromDB()
{
for( size_t i = 1 ; i < 6; i++)
{
std::string Name = format("Entry_%d",i);
CEGUI::Window * W = m_LBI_Text->clone(Name,true);
CEGUI::Window * WT = W->getChild(Name + "/Base");
CEGUI::ItemEntry * Item = dynamic_cast<CEGUI::ItemEntry *>(W);
W->setText(format("Entry No %d",i));
W->setDestroyedByParent(true);
WT->setDestroyedByParent(true);
WT->setText(format("Value No %d",i));
WT->setMousePassThroughEnabled(true);
Item->setID(i);
if(i==1)Item->setSelected(true);
m_ILB->addItem(Item);
}
m_ILB->handleUpdatedItemData(true);
}
When executing the code, all items shows the text "Entry No x", but only the first Item will also render the child windows and
shows the text "Value No x"
Selecting works as expected.
What I'm missing. Please help.
Edit:
I removed the Ogre renderer and check with the CEGUI OpenGLRenderer and the issue disapears. So I think this is an issue somewhere inside
the Ogre renderer and the Ogre RTTManager.
Edit 2:
After updating the ATI drivers, the issue disaperas. It seems to me, that the older driver have a broken FBO support.