Current situation:
If you try to create a sky dome with a non-existing material, you directly get a crash in the function SceneManager::_setSkyDome(...) in line 1939 in OgreSceneManager.cpp.
Proposal:
I would propose to change that behaviour to the same that is implemented e.g. in the SubEntitie's setMaterialName(...) function: If you try to set a non-existing material for a SubEntity you get a warning output in logfile and the default "BaseWhite" material is applied instead of crashing the whole application.
Note:
Unless there is a special reasoning behind the fact that Ogre just crahses here, I would strongly suggest to change that behaviour.
Cheers
spacegaier
[Request] Remove exception from SceneManager::_setSkyDome(.)
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
[Request] Remove exception from SceneManager::_setSkyDome(.)
Last edited by spacegaier on Mon Apr 26, 2010 12:21 pm, edited 1 time in total.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: Remove exception from SceneManager::_setSkyDome(...)
Any comments / opinions?
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
- madmarx
- OGRE Expert User
- Posts: 1671
- Joined: Mon Jan 21, 2008 10:26 pm
- x 50
Re: Remove exception from SceneManager::_setSkyDome(...)
Personnaly, I like the fact that 'underscored' functions perform less tests, since it is 'use it at your own risks'.
Why don't you use setSkyDome() ? Would you appreciate a new function setSkyDome() with the renderqueue directly + some tests on the parameters, instead of changing the _setSkyDome() behavior ?
Maybe you can do the test yourself too quite easily before calling the _setSkyDome() function, what do you think ?
Why don't you use setSkyDome() ? Would you appreciate a new function setSkyDome() with the renderqueue directly + some tests on the parameters, instead of changing the _setSkyDome() behavior ?
Maybe you can do the test yourself too quite easily before calling the _setSkyDome() function, what do you think ?
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: Remove exception from SceneManager::_setSkyDome(...)
There already is a setSkyDome that calls then _setSkyDome without any further tests. I would now like that e.g. in setSkyDome there is done a test much like in setMaterial (I linked to it in my first post). That would be more consistent and would prevent apps from crashing here.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
- madmarx
- OGRE Expert User
- Posts: 1671
- Joined: Mon Jan 21, 2008 10:26 pm
- x 50
Re: [Request] Remove exception from SceneManager::_setSkyDom
Ah ok! Yes your right. I think I can look at this when I will switch to mercurial.
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: [Request] Remove exception from SceneManager::_setSkyDom
Perhaps I should create a patch for it and send it to them team?
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
- madmarx
- OGRE Expert User
- Posts: 1671
- Joined: Mon Jan 21, 2008 10:26 pm
- x 50
Re: [Request] Remove exception from SceneManager::_setSkyDom
Yes, using the traditional patching system. You can look at this :
http://www.ogre3d.org/developers/submit-patch
http://www.ogre3d.org/developers/submit-patch
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: [Request] Remove exception from SceneManager::_setSkyDom
Yes, I know this page (in fact I just reminded sinbad that the patch tracker link was wrong ).
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...