HI Mikhail,

On Wed, Oct 6, 2010 at 12:28 PM, Mikhail I. Izmestev
<[email protected]> wrote:
> Why not to move generating TextureObject to SubloadCallback::load? It would
> be helpful to reuse already allocated TextureObjects.

I don't think moving texture object selection into
SubloadCallback::load would be a good idea as it'd break backwards
compatibility - i.e. existing apps will assume that the texture object
has been created for it prior to load() being called.

Two solutions to allow the SubloadCallback to tack responsibility for
texture object assignment would be to:

  A)  Have a virtual SubloadCallback::createTextureObject() method with
       a default implementation that matches the current implementation.
       The Texture2D implementation would then in turn would call
       createTextureObject() then the load() callback methods.

  B) Have a virtual SubloadCallback::createTextureObjectAndLoad()
      method that does texture object create and then calls load().

My currently inclination is for solution A being the cleanest.

Thoughts?
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to