SkinType "default"

Cronk

03-12-2008 16:17:57

OGRE EXCEPTION(22:): SkinType "default" does not exist! in Widget::setSkinTypePretty clear and I understand what it means, but I do not how to set the "default" SkinType.
I miss a documentation or something like this for QuickGUI...

kungfoomasta

03-12-2008 17:59:03

All widgets have a skinType which is "default" initially. The demo comes with many .skinType files, these outline the SkinTypes for all the widgets. More information can be found in the skinning article in the wiki:

http://www.ogre3d.org/wiki/index.php/QuickGUI_Artist_Tutorial_1

I should probably upgrade the exception message to list what type of Widget is missing the SkinType desired. For now just add all the .skinType files into your Ogre resource directory and it shouldn't give any problems.

Let me know if you have more questions.

Cronk

03-12-2008 20:43:30

I just copied the complete "resources" folder from the QuickGUI dir, added it to resources.cfg and loaded it. Still same problem.

kungfoomasta

03-12-2008 20:51:51

Does the demo run?

Can you post your code? If you comment out the widgets you're trying to create you can limit down the possible widgets throwing the exception. As a start, comment out all widget creation code, then just uncomment the first, see if it compiles and runs, and go from there.

I should probably make QuickGUI log information to the ogre.log if its in use, so that we can see what skin types are defined and detected. Will add this in next chance I get.

Cronk

03-12-2008 21:21:40

No, playpen does not run, instead it tells me the "Allow NVPerfHud" option wouldn't exist. Maybe i'll fix that tomorrow by just letting it show the standard config dialog.

The really strange thing is, that I do not try to create any widgets at all :?. Just wanted it to run without errors before adding widgets.

The code (running in the constructor of the FrameListener) looks like this:
new QuickGUI::Root();

QuickGUI::GUIManagerDesc d;
d.sceneManager = root->getSceneManager("Default SceneManager");
d.viewport = root->getSceneManager("Default SceneManager")->getCamera("Camera")->getViewport();
d.queueID = Ogre::RENDER_QUEUE_OVERLAY;

mGuiMgr = QuickGUI::Root::getSingletonPtr()->createGUIManager(d);

QuickGUI::SkinTypeManager::getSingleton().loadTypes();

keyboard->setEventCallback(this);
mouse->setEventCallback(this);
Just beforeResourceGroupManager::getSingleton().initialiseResourceGroup("Bootstrap");
ResourceGroupManager::getSingleton().initialiseResourceGroup("General");
ResourceGroupManager::getSingleton().initialiseResourceGroup("GUI");
there isQuickGUI::registerScriptReader();

kungfoomasta

03-12-2008 22:58:35

I don't have the code in front of me so I can't be sure, but I think I hardcoded the playpen to run in direct X. Something about the playpen setup is choosing options that are not supported by the renderer in use.

Sorry for the troubles on getting started. I'm sure the problems you're having aren't complex, we just have to narrow it down on where to look. If you can get the playpen example running that will be a good start. What IDE/OS/Ogre are you using?

Cronk

04-12-2008 15:06:58

You made some stuff up in PlayPen that definetely can not work. I'll just paste it here:#if defined _DEBUG
// mOgreRoot->loadPlugin("RenderSystem_GL_d.dll");
mOgreRoot->loadPlugin("RenderSystem_Direct3D9_d.dll");
#else
mOgreRoot->loadPlugin("RenderSystem_GL.dll");
// mOgreRoot->loadPlugin("RenderSystem_Direct3D9.dll");
#endif

mOgreRoot->setRenderSystem((*(mOgreRoot->getAvailableRenderers()))[0]);

mRenderSystem = mOgreRoot->getRenderSystem();

// OpenGL Parameters
/*
mRenderSystem->setConfigOption( "Colour Depth", "32" );
mRenderSystem->setConfigOption( "Display Frequency", "N/A" );
mRenderSystem->setConfigOption( "FSAA", "0" );
mRenderSystem->setConfigOption( "Full Screen", "No" );
mRenderSystem->setConfigOption( "RTT Preferred Mode", "FBO" );
mRenderSystem->setConfigOption( "VSync", "No" );
mRenderSystem->setConfigOption( "Video Mode", "800 x 600" );
*/
// DirectX Parameters

mRenderSystem->setConfigOption( "Allow NVPerfHUD", "No" );
mRenderSystem->setConfigOption( "Anti aliasing", "None" );
mRenderSystem->setConfigOption( "Floating-point mode", "Fastest" );
mRenderSystem->setConfigOption( "Full Screen", "No" );
mRenderSystem->setConfigOption( "VSync", "No" );
mRenderSystem->setConfigOption( "Video Mode", "800 x 600 @ 32-bit colour" );

mRenderSystem->validateConfigOptions();
This can not work, because if you do a non-debug build it will be loading the OpenGL renderer, but trying to set DirectX configurations. No chance. I fixed this, I'll paste the code here, so you maybe should overtake this ;)#ifndef _DEBUG
// mOgreRoot->loadPlugin("RenderSystem_GL_d.dll");
mOgreRoot->loadPlugin("RenderSystem_Direct3D9_d.dll");
#else
mOgreRoot->loadPlugin("RenderSystem_GL.dll");
// mOgreRoot->loadPlugin("RenderSystem_Direct3D9.dll");
#endif

mOgreRoot->setRenderSystem((*(mOgreRoot->getAvailableRenderers()))[0]);

mRenderSystem = mOgreRoot->getRenderSystem();

#if defined _DEBUG
// OpenGL Parameters
mRenderSystem->setConfigOption( "Colour Depth", "32" );
mRenderSystem->setConfigOption( "Display Frequency", "N/A" );
mRenderSystem->setConfigOption( "FSAA", "0" );
mRenderSystem->setConfigOption( "Full Screen", "No" );
mRenderSystem->setConfigOption( "RTT Preferred Mode", "FBO" );
mRenderSystem->setConfigOption( "VSync", "No" );
mRenderSystem->setConfigOption( "Video Mode", "800 x 600" );
#else
// DirectX Parameters
mRenderSystem->setConfigOption( "Allow NVPerfHUD", "No" );
mRenderSystem->setConfigOption( "Anti aliasing", "None" );
mRenderSystem->setConfigOption( "Floating-point mode", "Fastest" );
mRenderSystem->setConfigOption( "Full Screen", "No" );
mRenderSystem->setConfigOption( "VSync", "No" );
mRenderSystem->setConfigOption( "Video Mode", "800 x 600 @ 32-bit colour" );
#endif
However it now crasehs with a not defined standard-windows-error, same on Debug as on Release.
Using WinXP SP2, VC++ 2008. Having access to Ubuntu 8.10 Intrepid Ibex as well. Can use GNU and NetBeans on both as well.

kungfoomasta

04-12-2008 18:25:53

I will upload the latest version tonight, I have changed the demo to make use of a bool, where it can be set to setup OpenGL or DirectX. I develop on Debug and didn't test against retail mode. What is the windows error, at which line of execution does it occur? I use Vista with VS2005, not sure if that is relevant.

kungfoomasta

05-12-2008 05:26:47

I uploaded the latest here. This is not the official release, more to come, but the demo is upgraded slightly. I'm able to run in debug mode as-is without any problems. If you do get some error, please try to step through and let me know where it occurs, and what the error message is.

Cronk

05-12-2008 17:13:57

OK, PlayPen now runs fine. I'll try out some stuff.