Issue #1137 new

Ogre 2.1 doesn't display Windows without AutoRenderingSurface set to FALSE

Anonymous created an issue

Operating System: Windows (64-bit) OS version/build: 7 Professional GPU: Intel(R) HD Graphics GPU driver: 10.18.10.3496

Bug: Ogre 2.1 (pulled from v2-1 branch on 16-08-05) doesn't render any windows with AutoRenderingSurface = TRUE. Moving the mouse over control surfaces (such scrollbar buttons), even though you can't see them, will often cause the window to flicker on. No odd mentions of the non-displaying Window appear in the log.

Reproduction: Add a CEGUI::Window to CEGUI::WindowManager (either as GUIContext::setRootWindow() or CEGUI::Window::addChild() ) that was created with AutoRenderingSurface set to TRUE. This window does not display. This applies to both Windows created in code and those created from XML.

Workaround: Explicitly set AutoRenderingSurface to FALSE on every Window, DefaultWindow and FrameWindow. In code, this is

CEGUI:Window::setUsingAutoRenderingSurface( false );
//  in XML .layout files this is 
<Property name="AutoRenderingSurface" value="false" />

Any Window without AutoRenderingSurface set to FALSE, or with any child windows without AutoRenderingSurface set to FALSE will not display.

Issue Demonstration:

/ This properly displays /

CEGUI::Window *sheet = CEGUI::WindowManager::getSingleton().createWindow( "DefaultWindow", "_Root_Sheet" );
CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow( sheet );

CEGUI::Window *frame_win = CEGUI::WindowManager::getSingleton().createWindow( "TaharezLook/FrameWindow", "FrameWindow" );
frame_win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.15, 0 ), CEGUI::UDim( 0.15, 0 ) ) );
frame_win->setUsingAutoRenderingSurface( false );       // Setting AutoRenderingSurface to FALSE

CEGUI::Window *mybutton_code_win = CEGUI::WindowManager::getSingleton().createWindow( "TaharezLook/Button", "mybutton_code" );
mybutton_code_win->setText( "My Code Button" );
mybutton_code_win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.15, 0 ), CEGUI::UDim( 0.55, 0 )) );
frame_win->addChild( mybutton_code_win );

sheet->addChild( frame_win );

/ This does not properly display. /

CEGUI::Window *sheet = CEGUI::WindowManager::getSingleton().createWindow( "DefaultWindow", "_Root_Sheet" );
CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow( sheet );

CEGUI::Window *frame_win = CEGUI::WindowManager::getSingleton().createWindow( "TaharezLook/FrameWindow", "FrameWindow" );
frame_win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.15, 0 ), CEGUI::UDim( 0.15, 0 ) ) );
// AutoRenderingSurface not set to FALSE; is implicitly TRUE

CEGUI::Window *mybutton_code_win = CEGUI::WindowManager::getSingleton().createWindow( "TaharezLook/Button", "mybutton_code" );
mybutton_code_win->setText( "My Code Button" );
mybutton_code_win->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.15, 0 ), CEGUI::UDim( 0.55, 0 )) );
frame_win->addChild( mybutton_code_win );

sheet->addChild( frame_win );

/ This .layout file properly displays */

<?xml version="1.0" encoding="UTF-8"?>
<GUILayout version="4" >
    <Window name="DemoWindow" type="TaharezLook/FrameWindow">
        <Property name="Text" value="Tree Demo" />
        <Property name="AutoRenderingSurface" value="false" />

        <Window type="TaharezLook/Button" name="mybutton_xml" >
            <Property name="Text" value="My XML Button" />
        </Window>
    </Window>
</GUILayout>

/ This .layout file does not properly display */

<?xml version="1.0" encoding="UTF-8"?>
<GUILayout version="4" >
    <Window name="DemoWindow" type="TaharezLook/FrameWindow">
        <Property name="Text" value="Tree Demo" />
        <Property name="AutoRenderingSurface" value="false" />

        <Window type="TaharezLook/Button" name="mybutton_xml" >
            <Property name="Text" value="My XML Button" />
        </Window>
    </Window>
</GUILayout>
27/08/2016 16:40:14 (Std)   ********************************************************************************
27/08/2016 16:40:14 (Std)   ---- Version: 0.8.7 (Build: Aug 25 2016 Debug Microsoft Windows MSVC++ 14.0 (2015) 32 bit) ----
27/08/2016 16:40:14 (Std)   ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
27/08/2016 16:40:14 (Std)   ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
27/08/2016 16:40:14 (Std)   ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
27/08/2016 16:40:14 (Std)   ---- Scripting module is: None ----

Comments (7)

  1. Yaron Cohen-Tal

    Lukas Meindl: Again, I wasn't notified in time about this new issue, gotta check that with bitbucket.

    The Ogre 2.x renderer requires major reshape that I currently work on, but it will take some time. It currently doesn't support rendering to texture which I guess is y ARS doesn't work, and is y the sample framework doesn't work.

  2. Log in to comment