[Request] Remove exception from SceneManager::_setSkyDome(.)

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

[Request] Remove exception from SceneManager::_setSkyDome(.)

Post by spacegaier » Sun Apr 18, 2010 11:12 pm

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
Last edited by spacegaier on Mon Apr 26, 2010 12:21 pm, edited 1 time in total.
0 x
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...

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: Remove exception from SceneManager::_setSkyDome(...)

Post by spacegaier » Wed Apr 21, 2010 2:04 pm

Any comments / opinions?
0 x
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...

User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1669
Joined: Mon Jan 21, 2008 10:26 pm

Re: Remove exception from SceneManager::_setSkyDome(...)

Post by madmarx » Mon Apr 26, 2010 11:59 am

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 ?
0 x
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: Remove exception from SceneManager::_setSkyDome(...)

Post by spacegaier » Mon Apr 26, 2010 12:20 pm

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.
0 x
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...

User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1669
Joined: Mon Jan 21, 2008 10:26 pm

Re: [Request] Remove exception from SceneManager::_setSkyDom

Post by madmarx » Tue Apr 27, 2010 9:45 pm

Ah ok! Yes your right. I think I can look at this when I will switch to mercurial.
0 x
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: [Request] Remove exception from SceneManager::_setSkyDom

Post by spacegaier » Wed Apr 28, 2010 11:12 am

Perhaps I should create a patch for it and send it to them team?
0 x
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...

User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1669
Joined: Mon Jan 21, 2008 10:26 pm

Re: [Request] Remove exception from SceneManager::_setSkyDom

Post by madmarx » Wed Apr 28, 2010 11:51 am

Yes, using the traditional patching system. You can look at this :
http://www.ogre3d.org/developers/submit-patch
0 x
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: [Request] Remove exception from SceneManager::_setSkyDom

Post by spacegaier » Wed Apr 28, 2010 1:15 pm

Yes, I know this page (in fact I just reminded sinbad that the patch tracker link was wrong ;) ).
0 x
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...

Post Reply