[Solved] Window not rendering with Ogre

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

philipv
Just popping in
Just popping in
Posts: 2
Joined: Fri Mar 23, 2007 21:46

[Solved] Window not rendering with Ogre

Postby philipv » Sun Mar 25, 2007 18:24

Hi all,

I'm trying to get a simple application running that displays a CEGUI window within Ogre. Everything is compiling with no errors, and it runs and shows the Ogre stuff, but the CEGUI window does not display. The code I have is:-

Code: Select all

        m_2DRenderer = new CEGUI::OgreCEGUIRenderer(m_window);
   m_2DSystem = new CEGUI::System(m_2DRenderer);

   // load in the scheme file, which auto-loads the TaharezLook imageset
   CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"./TaharezLook.scheme");

   // load in a font.  The first font loaded automatically becomes the default font.
   CEGUI::FontManager::getSingleton().createFont((CEGUI::utf8*)"./Commonwealth-10.font");
   
   CEGUI::System::getSingleton().setDefaultFont((CEGUI::utf8*)"Commonwealth-10");
   CEGUI::System::getSingleton().setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", "MouseArrow");

   CEGUI::WindowManager& m_2DWinManager = CEGUI::WindowManager::getSingleton();
   m_2DRootWindow = m_2DWinManager.createWindow((CEGUI::utf8*)"DefaultWindow", "root");
   m_2DRootWindow->setArea(cegui_reldim(0), cegui_reldim(0), cegui_reldim(1.0f), cegui_reldim(1.0f));
   CEGUI::System::getSingleton().setGUISheet(m_2DRootWindow);

   CEGUI::FrameWindow* fWnd = (CEGUI::FrameWindow*)m_2DWinManager.createWindow((CEGUI::utf8*)"TaharezLook/FrameWindow", (CEGUI::utf8*)"testWindow");
   m_2DRootWindow->addChildWindow(fWnd);
   fWnd->setPosition( CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.25f)));
   fWnd->setSize( CEGUI::UVector2(cegui_reldim(0.5f), cegui_reldim( 0.5f)));
   fWnd->setText( "Hello");



The Ogre log's relevant section is:

Code: Select all

22:14:04: Creating viewport on target 'CDK', rendering from camera 'camera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
22:14:04: Viewport for camera 'camera', actual dimensions L: 0 T: 0 W: 1024 H: 768
22:14:04: Texture: TaharezLook.tga: Loading 1 faces(PF_A8R8G8B8,256x256x1) with  hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
22:14:09: *-*-* OGRE Shutdown


which also shows the log entry for when I shut the app down.

The CEGUI log is:

Code: Select all


23/03/2007 22:14:04 (InfL1)   CEGUI::Logger singleton created.
23/03/2007 22:14:04 (InfL1)   ---- Begining CEGUI System initialisation ----
23/03/2007 22:14:04 (InfL1)   CEGUI::ImagesetManager singleton created
23/03/2007 22:14:04 (InfL1)   CEGUI::FontManager singleton created.
23/03/2007 22:14:04 (InfL1)   CEGUI::WindowFactoryManager singleton created
23/03/2007 22:14:04 (InfL1)   CEGUI::WindowManager singleton created
23/03/2007 22:14:04 (InfL1)   CEGUI::SchemeManager singleton created.
23/03/2007 22:14:04 (InfL1)   CEGUI::MouseCursor singleton created.
23/03/2007 22:14:04 (InfL1)   CEGUI::GlobalEventSet singleton created.
23/03/2007 22:14:04 (InfL1)   CEGUI::WidgetLookManager singleton created.
23/03/2007 22:14:04 (InfL1)   CEGUI::WindowRendererManager singleton created
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'DefaultWindow' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'DragContainer' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'ScrolledContainer' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'ClippedContainer' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Checkbox' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/PushButton' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/RadioButton' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Combobox' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/ComboDropList' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Editbox' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/FrameWindow' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/ItemEntry' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Listbox' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/ListHeader' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/ListHeaderSegment' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Menubar' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/PopupMenu' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/MenuItem' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/MultiColumnList' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/MultiLineEditbox' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/ProgressBar' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/ScrollablePane' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Scrollbar' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Slider' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Spinner' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/TabButton' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/TabControl' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Thumb' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Titlebar' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/Tooltip' windows added.
23/03/2007 22:14:04 (InfL1)   WindowFactory for 'CEGUI/ItemListbox' windows added.
23/03/2007 22:14:04 (InfL1)   Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
23/03/2007 22:14:04 (InfL1)   CEGUI::System singleton created.
23/03/2007 22:14:04 (InfL1)   ---- CEGUI System initialisation completed ----
23/03/2007 22:14:04 (InfL1)   ---- Version 0.5.1 ----
23/03/2007 22:14:04 (InfL1)   ---- Renderer module is: CEGUI::OgreRenderer - Official Ogre based renderer module for CEGUI ----
23/03/2007 22:14:04 (InfL1)   ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
23/03/2007 22:14:04 (InfL1)   ---- Scripting module is: None ----
23/03/2007 22:14:04 (InfL1)   Attempting to load Scheme from file './TaharezLook.scheme'.
23/03/2007 22:14:04 (InfL1)   Attempting to create an Imageset from the information specified in file 'TaharezLook.imageset'.
23/03/2007 22:14:04 (InfL1)   Started creation of Imageset from XML specification:
23/03/2007 22:14:04 (InfL1)   ---- CEGUI Imageset name: TaharezLook
23/03/2007 22:14:04 (InfL1)   ---- Source texture file: TaharezLook.tga in resource group: (Default)
23/03/2007 22:14:04 (InfL1)   ===== Falagard 'root' element: look and feel parsing begins =====
23/03/2007 22:14:05 (InfL1)   ===== Look and feel parsing completed =====
23/03/2007 22:14:05 (InfL1)   No window renderer factories specified for module 'CEGUIFalagardWRBase' - adding all available factories...
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Button' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Default' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Editbox' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/FrameWindow' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/ItemEntry' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/ListHeader' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/ListHeaderSegment' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Listbox' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Menubar' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/MenuItem' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/MultiColumnList' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/MultiLineEditbox' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/PopupMenu' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/ProgressBar' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/ScrollablePane' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Scrollbar' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Slider' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Static' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/StaticImage' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/StaticText' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/SystemButton' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/TabButton' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/TabControl' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Titlebar' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/ToggleButton' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/Tooltip' added.
23/03/2007 22:14:05 (InfL1)   WindowRendererFactory 'Falagard/ItemListbox' added.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Button' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'TaharezLook/Button'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Checkbox' using base type 'CEGUI/Checkbox', window renderer 'Falagard/ToggleButton' and Look'N'Feel 'TaharezLook/Checkbox'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/ImageButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' and Look'N'Feel 'TaharezLook/ImageButton'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/RadioButton' using base type 'CEGUI/RadioButton', window renderer 'Falagard/ToggleButton' and Look'N'Feel 'TaharezLook/RadioButton'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/FrameWindow' using base type 'CEGUI/FrameWindow', window renderer 'Falagard/FrameWindow' and Look'N'Feel 'TaharezLook/FrameWindow'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Titlebar' using base type 'CEGUI/Titlebar', window renderer 'Falagard/Titlebar' and Look'N'Feel 'TaharezLook/Titlebar'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/SystemButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/SystemButton' and Look'N'Feel 'TaharezLook/Button'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Editbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' and Look'N'Feel 'TaharezLook/Editbox'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/MultiLineEditbox' using base type 'CEGUI/MultiLineEditbox', window renderer 'Falagard/MultiLineEditbox' and Look'N'Feel 'TaharezLook/MultiLineEditbox'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Menubar' using base type 'CEGUI/Menubar', window renderer 'Falagard/Menubar' and Look'N'Feel 'TaharezLook/Menubar'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/PopupMenu' using base type 'CEGUI/PopupMenu', window renderer 'Falagard/PopupMenu' and Look'N'Feel 'TaharezLook/PopupMenu'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/MenuItem' using base type 'CEGUI/MenuItem', window renderer 'Falagard/MenuItem' and Look'N'Feel 'TaharezLook/MenuItem'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/AlternateProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' and Look'N'Feel 'TaharezLook/AltProgressBar'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/ProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' and Look'N'Feel 'TaharezLook/ProgressBar'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/VUMeter' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' and Look'N'Feel 'TaharezLook/VUMeter'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/VerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' and Look'N'Feel 'TaharezLook/VerticalScrollbar'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/HorizontalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' and Look'N'Feel 'TaharezLook/HorizontalScrollbar'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/VerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'TaharezLook/VerticalScrollbarThumb'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/HorizontalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'TaharezLook/HorizontalScrollbarThumb'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/LargeVerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' and Look'N'Feel 'TaharezLook/LargeVerticalScrollbar'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/LargeVerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'TaharezLook/LargeVerticalScrollbarThumb'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/TabButton' using base type 'CEGUI/TabButton', window renderer 'Falagard/TabButton' and Look'N'Feel 'TaharezLook/TabButton'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/TabControl' using base type 'CEGUI/TabControl', window renderer 'Falagard/TabControl' and Look'N'Feel 'TaharezLook/TabControl'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/TabContentPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'TaharezLook/TabContentPane'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/TabButtonPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' and Look'N'Feel 'TaharezLook/TabButtonPane'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/ComboDropList' using base type 'CEGUI/ComboDropList', window renderer 'Falagard/Listbox' and Look'N'Feel 'TaharezLook/ComboDropList'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/ComboEditbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' and Look'N'Feel 'TaharezLook/ComboEditbox'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Combobox' using base type 'CEGUI/Combobox', window renderer 'Falagard/Default' and Look'N'Feel 'TaharezLook/Combobox'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Listbox' using base type 'CEGUI/Listbox', window renderer 'Falagard/Listbox' and Look'N'Feel 'TaharezLook/Listbox'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/ListHeader' using base type 'CEGUI/ListHeader', window renderer 'Falagard/ListHeader' and Look'N'Feel 'TaharezLook/ListHeader'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/ListHeaderSegment' using base type 'CEGUI/ListHeaderSegment', window renderer 'Falagard/ListHeaderSegment' and Look'N'Feel 'TaharezLook/ListHeaderSegment'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/MultiColumnList' using base type 'CEGUI/MultiColumnList', window renderer 'Falagard/MultiColumnList' and Look'N'Feel 'TaharezLook/MultiColumnList'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Slider' using base type 'CEGUI/Slider', window renderer 'Falagard/Slider' and Look'N'Feel 'TaharezLook/Slider'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/SliderThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' and Look'N'Feel 'TaharezLook/SliderThumb'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/ScrollablePane' using base type 'CEGUI/ScrollablePane', window renderer 'Falagard/ScrollablePane' and Look'N'Feel 'TaharezLook/ScrollablePane'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Spinner' using base type 'CEGUI/Spinner', window renderer 'Falagard/Default' and Look'N'Feel 'TaharezLook/Spinner'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/Tooltip' using base type 'CEGUI/Tooltip', window renderer 'Falagard/Tooltip' and Look'N'Feel 'TaharezLook/Tooltip'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/StaticImage' using base type 'DefaultWindow', window renderer 'Falagard/StaticImage' and Look'N'Feel 'TaharezLook/StaticImage'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/StaticText' using base type 'DefaultWindow', window renderer 'Falagard/StaticText' and Look'N'Feel 'TaharezLook/StaticText'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/ItemListbox' using base type 'CEGUI/ItemListbox', window renderer 'Falagard/ItemListbox' and Look'N'Feel 'TaharezLook/ItemListbox'.
23/03/2007 22:14:05 (InfL1)   Creating falagard mapping for type 'TaharezLook/ListboxItem' using base type 'CEGUI/ItemEntry', window renderer 'Falagard/ItemEntry' and Look'N'Feel 'TaharezLook/ListboxItem'.
23/03/2007 22:14:05 (InfL1)   Attempting to create Font from the information specified in file './Commonwealth-10.font'.
23/03/2007 22:14:05 (InfL1)   Started creation of FreeType Font:
23/03/2007 22:14:05 (InfL1)   ---- CEGUI font name: Commonwealth-10
23/03/2007 22:14:05 (InfL1)   ----     Source file: Commonv2c.ttf in resource group: (Default)
23/03/2007 22:14:05 (InfL1)   ---- Real point size: 10
23/03/2007 22:14:05 (InfL1)   Succsessfully loaded 219 glyphs



The thing that might be causing the problem is the fact that I am rendering Ogre using a call to m_ogre->renderOneFrame(), and I'm not sure whether this does everything needed to show the CEGUI window. If this is the case then I could do with a couple of pointers as to what I need to change.

Also, I'm running the app. windowed at 1024x768 resolution, and am not 100% certain I have the window dimensions and position right.

Any help would be greatly appreciated.

Cheers,

Phil
Last edited by philipv on Sun Mar 25, 2007 21:55, edited 1 time in total.

philipv
Just popping in
Just popping in
Posts: 2
Joined: Fri Mar 23, 2007 21:46

Postby philipv » Sun Mar 25, 2007 21:54

Solved the problem myself - I wasnt passing the scenemanager to CEGUI!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests