[Solved] FrameWindow produces black window with red border

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

g1nsu
Just popping in
Just popping in
Posts: 3
Joined: Sun Apr 20, 2014 14:44

[Solved] FrameWindow produces black window with red border

Postby g1nsu » Sun Apr 20, 2014 14:55

Hi,

Hopefully someone can point me in the right direction here. I have added a root window and within the root window I have added a TaharezLook/FrameWindow. The position and size work but nothing else seems to have an impact on what is visible.

Here is the essential log. There are no errors.

Code: Select all

---- Version: 0.8.3 (Build: Apr 19 2014 GNU/Linux g++ 4.8.1 64 bit) ----
20/04/2014 10:46:49 (Std)       ---- Renderer module is: CEGUI::OpenGL3Renderer - Official OpenGL 3.2 core based renderer module.  TextureTarget support enabled via FBO OGL 3.2 core implementation. ----
20/04/2014 10:46:49 (Std)       ---- XML Parser module is: CEGUI::LibxmlParser - Official libxml2 based parser module for CEGUI ----
20/04/2014 10:46:49 (Std)       ---- Image Codec module is: STBImageCodec - stb_image.c based image codec ----
20/04/2014 10:46:49 (Std)       ---- Scripting module is: None ----

---- Begining CEGUI System initialisation ----
20/04/2014 10:46:49 (Std)       [CEGUI::ImageManager] Singleton created (0xb62400)
20/04/2014 10:46:49 (Std)       [CEGUI::ImageManager] Registered Image type: BasicImage
20/04/2014 10:46:49 (Std)       CEGUI::FontManager singleton created. (0xc81080)
20/04/2014 10:46:49 (Std)       CEGUI::WindowFactoryManager singleton created
20/04/2014 10:46:49 (Std)       CEGUI::WindowManager singleton created (0xb15a30)
20/04/2014 10:46:49 (Std)       CEGUI::SchemeManager singleton created. (0xc811b0)
20/04/2014 10:46:49 (Std)       CEGUI::GlobalEventSet singleton created. (0xc80ed0)
20/04/2014 10:46:49 (Std)       CEGUI::AnimationManager singleton created (0xc812e0)
20/04/2014 10:46:49 (Std)       CEGUI::WidgetLookManager singleton created. (0xb62720)
20/04/2014 10:46:49 (Std)       CEGUI::WindowRendererManager singleton created (0xb15ac0)
20/04/2014 10:46:49 (Std)       CEGUI::RenderEffectManager singleton created (0xcab320)
...

Started creation of Scheme from XML specification:
20/04/2014 10:46:49 (Std)       ---- CEGUI GUIScheme name: TaharezLook
20/04/2014 10:46:49 (Std)       [ImageManager] Started creation of Imageset from XML specification:
20/04/2014 10:46:49 (Std)       [ImageManager] ---- CEGUI Imageset name: TaharezLook
20/04/2014 10:46:49 (Std)       [ImageManager] ---- Source texture file: TaharezLook.png
20/04/2014 10:46:49 (Std)       [ImageManager] ---- Source texture resource group: (Default)
20/04/2014 10:46:49 (Std)       [OpenGLRenderer] Created texture: TaharezLook
...

===== Falagard 'root' element: look and feel parsing begins =====
20/04/2014 10:46:49 (Std)       ===== Look and feel parsing completed =====
20/04/2014 10:46:49 (Std)       No window renderer factories specified for module 'CEGUICoreWindowRendererSet' - adding all available factories...
..


Here is the basic code. It doesn't matter if I use a layout or in code I get the same result.

Code: Select all

    renderer = &CEGUI::OpenGL3Renderer::bootstrapSystem();
    CEGUI::SchemeManager::getSingleton().createFromFile("TaharezLook.scheme");

    //Create the root window
    //CEGUI::Window* _rootWindow = CEGUI::WindowManager::getSingleton().loadLayoutFromFile("TreeDemoTaharez.layout"); //.createWindow("DefaultWindow", "_MasterRoot");
    CEGUI::Window* _rootWindow = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "_MasterRoot");
    CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(_rootWindow);

    //show window
    CEGUI::Window* _baseWindow = static_cast<CEGUI::FrameWindow*>(CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/FrameWindow", "FirstWindow"));
    _baseWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0.01, 0), CEGUI::UDim(0.01, 0)));
    _baseWindow->setSize(CEGUI::USize(CEGUI::UDim(0.5, 0), CEGUI::UDim(0.5, 0)));
    _baseWindow->setText("Hello");
    _baseWindow->setProperty("CloseButtonEnabled", "True");

//    CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->addChild(_baseWindow);
    _rootWindow->addChild(_baseWindow);


And finally, this is what I see.

Image

Thanks for any help.
Last edited by g1nsu on Sun Apr 20, 2014 23:10, edited 2 times in total.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: FrameWindow produces black window with red border

Postby Ident » Sun Apr 20, 2014 18:50

Hmm, so far I have no specific suspicion, also I have never seen such an issue before.

Three points:
1.What is the background?
2. Do you render anything on your own ?
- if yes: can you switch all that code off so we can see if it renders correctly if you do not change anything in your opengl context? i have not yet implemented the full reset of all opengl states in the opengl renderers. it is documented though that certain states need to be set a certain way. i will try to make it better in future releases once i have time.
3. please post the full log. always the full log. thanks
CrazyEddie: "I don't like GUIs"

g1nsu
Just popping in
Just popping in
Posts: 3
Joined: Sun Apr 20, 2014 14:44

Re: FrameWindow produces black window with red border

Postby g1nsu » Sun Apr 20, 2014 22:14

You are correct. It is something I am doing in my rendering. I'll take a look at my OpenGL states and read some more documentation.

Also, I'll remember to post the full log from now on.

Thanks for your help.


*Edit: I had to set glActiveTexture(GL_TEXTURE0); at the end of my rendering loop right before rendering the GUI. Everything is good now. Thanks again!
Last edited by g1nsu on Sun Apr 20, 2014 22:42, edited 1 time in total.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: FrameWindow produces black window with red border

Postby Ident » Sun Apr 20, 2014 22:18

I recommend you to change back all changed opengl states to their default values before rendering CEGUI. I do know this can be tedious but there is no real better way. Also please tell us which states you had to change, maybe we can consider them in future changes and/or someone else might be helped.
CrazyEddie: "I don't like GUIs"

g1nsu
Just popping in
Just popping in
Posts: 3
Joined: Sun Apr 20, 2014 14:44

Re: FrameWindow produces black window with red border

Postby g1nsu » Sun Apr 20, 2014 22:44

I had to set glActiveTexture(GL_TEXTURE0); at the end of my rendering loop right before rendering the GUI.

Everything else was cleaned up so that was definitely the culprit.

Thanks again!

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Solved] FrameWindow produces black window with red bord

Postby Ident » Tue Apr 22, 2014 11:40

Thanks for the info, I will keep it in mind when i will add an optional state-preserving functionality to the OGL Renderers.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 28 guests