Greetings all,
I just started using OGRE v1.0 [Azathoth] this past week and already I have a couple of questions:
First, I would like to iterate through all the ResourceDeclarations in a ResourceGroup to display them in a sort of resource browser. However I noticed that ResourceGroupManager::getResourceGroup is a protected function. Would it be possible to get public access to a (constant?) ResourceGroup reference? If not, is there another method to get at this resource information?
I already tried ResourceGroupManager::listResourceNames. However this does not provide me with the type of resource the name refers to, or the ResourceGroup it belongs to.
A related question, is there a plan to provide a list of created ResourceGroups that the ResourceGroupManager is aware of? I could keep track of these groups myself of course, but I wouldn't mind if Ogre provided the information it already knows about.
Thanks for your time,
and thank to the Ogre team for all their great work!
- pagan
Getting access to a list of ResourceGroups
-
- Gnoblar
- Posts: 4
- Joined: Mon Feb 28, 2005 3:49 pm
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
How's this?
I've committed it, anyway.
Update on the v1-0 branch to get the implementation.
Code: Select all
/** Get a list of the currently defined resource groups.
@note This method intentionally returns a copy rather than a reference in
order to avoid any contention issues in multithreaded applications.
@returns A copy of list of currently defined groups.
*/
StringVector getResourceGroups(void);
/** Get the list of resource declarations for the specified group name.
@note This method intentionally returns a copy rather than a reference in
order to avoid any contention issues in multithreaded applications.
@param groupName The name of the group
@returns A copy of list of currently defined resources.
*/
ResourceDeclarationList getResourceDeclarationList(const String& groupName);

-
- Gnoblar
- Posts: 4
- Joined: Mon Feb 28, 2005 3:49 pm