Request Feature: ResourceGroup


23-03-2010 03:06:04

Hello stickymango, I would like to request feature: User code can define the resource group in creating sound. Because my application has thousands of resource available, and if the resource group is defined in run time, the performance loss is very big. So if the resource group is defined then OgreOgg not looking for it anyomre, but if it doesn't then OgreOgg will try to look for it.

In my local version, I have changed the code to match that problem, but OgreOgg is still updating, so I would love to have that feature in official version too :)

Thank you for your help!


23-03-2010 10:35:21

Hi There,

Are you asking for a resource group name to be set which OgreOggSound will only look to when searching for sounds? I know when you create a sound it asks OGRE's ResourceGroupManager for the ResourceGroup containing the sound file, is this a bottleneck in your app?

If so, I don't see why not :wink:


25-03-2010 15:09:39

Yup that is exactly what I needed. The bottle neck is at the looking for resource group. Thank you very much sticky mango for your help.


31-03-2010 22:32:06

I've committed a fix for this, can you test it out to see if sorts out the problem?

use OgreOggSoundManager::setResourceGroupName() / OgreOggSoundManager::getResourceGroupName() to modify the value.


05-04-2010 14:50:03

It's called setResourceGroupName for the getter function. typo.

I can't call setResourceGroupName, because my app just crashes on that one.
Without it everything works fine. I'm at a loss. It's a simple variable assignment, and yet it crashes. Linux here.

GDB output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f546edc67e0 (LWP 26093)]
0x00007f546d71d7d6 in std::string::assign () from /usr/lib64/
(gdb) bt
#0 0x00007f546d71d7d6 in std::string::assign ()
from /usr/lib64/
#1 0x0000000000448074 in OgreOggSound::OgreOggSoundManager::setResourceGroupName (this=0x7f5466d82068, group=@0x7fff2aa6bf50)

Looks like it fails to assign a string. LOL. I reaaaly wonder what it is.


06-04-2010 10:34:44

Ah yes, thanks for spotting the typo, I assume you changed that but still get the error?


06-04-2010 13:01:09

Yeah. Google told me such errors appeared when plugins were compiled for one Ogre version, and Ogre itself was another one. But that's not the case for me.
I had thought about the function being inline, but moving that to the .cpp didn't help.


06-04-2010 13:57:37

Yeah, I would have said it was a mis-match somewhere but I don't know where, it works fine on my windows machines.. :?


06-04-2010 14:10:22

I'm recompiling Ogre. And will also try to build it under MinGW and check OgreOggSound there too.


10-04-2010 09:12:18

Unfortunately, I cannot compile it under MinGW, because default CMakeLists.txt depends on pkg-config not available on MinGW. :)


10-04-2010 21:16:08

Lol, the CMakeLists.txt is for building on linux only.

I'll try and make time to read up on CMake and get some multiplatform scripts available.