Just a blank screen

shanefarris

02-08-2009 01:30:15

I am trying to load a simple button using the same in the wiki but all I get is a blank screen, anyone have any ideas?


void CMainMenuState::Start()
{
try
{
MyGUI::OgrePlatform* m_Platform = new MyGUI::OgrePlatform();
m_Platform->initialise(CGameManager::Instance()->GetRenderWindow());

mGUI = new MyGUI::Gui();
mGUI->initialise();

// load layout
MyGUI::LayoutManager::getInstance().load("sample.layout");
// set callback
MyGUI::ButtonPtr button = mGUI->findWidget<MyGUI::Button>("MyFirstButton");

}
catch(MyGUI::Exception& e)
{
std::cerr << e.getFullDescription() << std::endl;
}
}

void CMainMenuState::Update(f32 deltaTimeSecs)
{
mGUI->injectFrameEntered(deltaTimeSecs);
}


Here is my log, looks fine to me:

----------------------------------------------------------------------------------------------------------------------------------
loging report for : 08/01/2009 19:42:47
----------------------------------------------------------------------------------------------------------------------------------

19:42:47 | Core | Info | * Initialise: Gui | .\src\MyGUI_Gui.cpp | 83
19:42:47 | Core | Info | * MyGUI version 3.0.0 | .\src\MyGUI_Gui.cpp | 87
19:42:47 | Core | Info | * Initialise: ResourceManager | .\src\MyGUI_ResourceManager.cpp | 43
19:42:47 | Core | Info | ResourceManager successfully initialized | .\src\MyGUI_ResourceManager.cpp | 51
19:42:47 | Core | Info | * Initialise: LayerManager | .\src\MyGUI_LayerManager.cpp | 45
19:42:47 | Core | Info | LayerManager successfully initialized | .\src\MyGUI_LayerManager.cpp | 54
19:42:47 | Core | Info | * Initialise: WidgetManager | .\src\MyGUI_WidgetManager.cpp | 67
19:42:47 | Core | Info | WidgetManager successfully initialized | .\src\MyGUI_WidgetManager.cpp | 100
19:42:47 | Core | Info | * Initialise: InputManager | .\src\MyGUI_InputManager.cpp | 56
19:42:47 | Core | Info | InputManager successfully initialized | .\src\MyGUI_InputManager.cpp | 79
19:42:47 | Core | Info | * Initialise: SubWidgetManager | .\src\MyGUI_SubWidgetManager.cpp | 44
19:42:47 | Core | Info | SubWidgetManager successfully initialized | .\src\MyGUI_SubWidgetManager.cpp | 64
19:42:47 | Core | Info | * Initialise: SkinManager | .\src\MyGUI_SkinManager.cpp | 46
19:42:47 | Core | Info | SkinManager successfully initialized | .\src\MyGUI_SkinManager.cpp | 54
19:42:47 | Core | Info | * Initialise: FontManager | .\src\MyGUI_FontManager.cpp | 43
19:42:47 | Core | Info | FontManager successfully initialized | .\src\MyGUI_FontManager.cpp | 52
19:42:47 | Core | Info | * Initialise: ControllerManager | .\src\MyGUI_ControllerManager.cpp | 42
19:42:47 | Core | Info | ControllerManager successfully initialized | .\src\MyGUI_ControllerManager.cpp | 52
19:42:47 | Core | Info | * Initialise: PointerManager | .\src\MyGUI_PointerManager.cpp | 48
19:42:47 | Core | Info | PointerManager successfully initialized | .\src\MyGUI_PointerManager.cpp | 63
19:42:47 | Core | Info | * Initialise: ClipboardManager | .\src\MyGUI_ClipboardManager.cpp | 82
19:42:47 | Core | Info | ClipboardManager successfully initialized | .\src\MyGUI_ClipboardManager.cpp | 96
19:42:47 | Core | Info | * Initialise: LayoutManager | .\src\MyGUI_LayoutManager.cpp | 42
19:42:47 | Core | Info | LayoutManager successfully initialized | .\src\MyGUI_LayoutManager.cpp | 48
19:42:47 | Core | Info | * Initialise: DynLibManager | .\src\MyGUI_DynLibManager.cpp | 35
19:42:47 | Core | Info | DynLibManager successfully initialized | .\src\MyGUI_DynLibManager.cpp | 37
19:42:47 | Core | Info | * Initialise: PluginManager | .\src\MyGUI_PluginManager.cpp | 37
19:42:47 | Core | Info | PluginManager successfully initialized | .\src\MyGUI_PluginManager.cpp | 41
19:42:47 | Core | Info | * Initialise: DelegateManager | .\src\MyGUI_DelegateManager.cpp | 34
19:42:47 | Core | Info | DelegateManager successfully initialized | .\src\MyGUI_DelegateManager.cpp | 38
19:42:47 | Core | Info | * Initialise: LanguageManager | .\src\MyGUI_LanguageManager.cpp | 39
19:42:47 | Core | Info | LanguageManager successfully initialized | .\src\MyGUI_LanguageManager.cpp | 46
19:42:47 | Core | Info | * Initialise: FactoryManager | .\src\MyGUI_FactoryManager.cpp | 34
19:42:47 | Core | Info | FactoryManager successfully initialized | .\src\MyGUI_FactoryManager.cpp | 37
19:42:47 | Core | Info | Load ini file 'core_keyboard.xml' | .\src\MyGUI_ResourceManager.cpp | 146
19:42:47 | Core | Info | Load ini file 'core_language.xml' | .\src\MyGUI_ResourceManager.cpp | 146
19:42:47 | Core | Info | Load ini file 'core_layer.xml' | .\src\MyGUI_ResourceManager.cpp | 146
19:42:47 | Core | Info | Load ini file 'core_font.xml' | .\src\MyGUI_ResourceManager.cpp | 146
19:42:47 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.17' using texture size 256 x 256 | .\src\MyGUI_ResourceTrueTypeFont.cpp | 178
19:42:47 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.17' using real height 17 pixels | .\src\MyGUI_ResourceTrueTypeFont.cpp | 179
19:42:47 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.14' using texture size 256 x 256 | .\src\MyGUI_ResourceTrueTypeFont.cpp | 178
19:42:47 | Core | Info | ResourceTrueTypeFont 'font_DejaVuSans.14' using real height 14 pixels | .\src\MyGUI_ResourceTrueTypeFont.cpp | 179
19:42:47 | Core | Info | Load ini file 'core_theme.xml' | .\src\MyGUI_ResourceManager.cpp | 146
19:42:47 | Core | Info | Load ini file 'core_resource.xml' | .\src\MyGUI_ResourceManager.cpp | 146
19:42:47 | Core | Info | Load ini file 'core_skin.xml' | .\src\MyGUI_ResourceManager.cpp | 146
19:42:47 | Core | Info | Load ini file 'core_pointer.xml' | .\src\MyGUI_ResourceManager.cpp | 146
19:42:47 | Core | Info | Gui successfully initialized | .\src\MyGUI_Gui.cpp | 132



If anyone has any idea what I should look at, please tell me, I really want to figure this out, I think this is an awesome library.

Thanks,
Shane.

my.name

02-08-2009 11:10:52

Whether the pointer is visible?

shanefarris

02-08-2009 19:13:25

I don't understand, I should see a button right?

shanefarris

02-08-2009 19:15:03

I see demos that don't work when I implement the code in my own project, is there documentation on how to use MyGUI?

my.name

02-08-2009 21:37:15

update from svn abd test agian

shanefarris

03-08-2009 14:33:08

No, I still just see a blank screen. I rebuilt the mygui engine and the orgre platform, but all I see still is a blank screen. Do we have any documentation that may list the steps I need to take in order for mygui to be implemented in a project?

shanefarris

03-08-2009 21:18:30

I'm going through the mygui code, and looks like you removed the render window as a required parameter a few months ago. The render manager is not using it either, and the class doesn't look like it is doing much right now. I am still going through the code, but how does it know about Ogre root, the window to render to, or anything?

I am missing something, and I am sorry if this is a stupid question, but I really would like to know what I am doing wrong here.

shanefarris

03-08-2009 21:35:30

Found the issue, I needed to create a viewport before i initialize the ogre platform.

If you want, I would like to put what I learn in the wiki if that is ok with whoever is in charge of the MyGui wiki. Let me know please so I can share what I've learned.

Thanks.

Altren

03-08-2009 22:58:22

Feel free to edit wiki. And thank you for doing this.