I would welcome a cleaner dynamic resource strategy.
With dynamic resources I mean materials, meshes, animations...
How about:
FooPtr foo = Ogre::FooManager::getSingelton().getFoo("Name");
foo.edit();
foo.parameter1 = changedvalue;
foo.parameter2 = changedvalue2;
foo.update();
What do you think?
Ogre2 'Tindalos': Dynamic resources
-
Ayudo
- Halfling
- Posts: 88
- Joined: Fri Mar 18, 2005 12:25 am
- Location: munich, germany
- Contact:
- xavier
- OGRE Retired Moderator

- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
- Kencho
- OGRE Retired Moderator

- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
- xavier
- OGRE Retired Moderator

- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
I guess I am missing the need to "reload" them -- if a resource is already resident in memory, and you change its data, what needs to be updated? If it's a hardware buffer (i.e. pixel, vertex or index) then you have to lock it anyway to change it, which will cause a resend of the changed data when you unlock the buffer. Anything else that is CPU-side only, when you change the data, it changes immediately, so what's to update? "Script"-based data such as materials, when you change their properties, the data is changed immediately.
A specific example of what the OP has in mind is in order here, I think...
A specific example of what the OP has in mind is in order here, I think...
- Kencho
- OGRE Retired Moderator

- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
