Hi Fabien, On Thu, Nov 4, 2010 at 4:40 PM, Fabien Lavignotte <[email protected]> wrote: > In fact, the main problem when using generateTextureObject() with an empty > profile is that you cannot reuse it. > The previous created texture objects have been moved to the correct set, and > so are not available for reuse by the "empty profile" TextureObjectSet where > the texture is generated.
Interesting problem, I had thought about the case of keeping on asking for TextureObjects with a empty profile. Here we should be looking for an object to reuse if the pool is full and force the reuse of one of the TextureObjects held in the the valid profile TextureObjectSets. Which ones to choose form though? If you don't know which one to choose then don't have any clear direction, so perhaps look for the biggest unused ones first? > During my investigation I have also found a small bug in moveToSet() and the > texture pool size. The texture pool size is not updated with the new profile, > so it keeps the previous size (0) for the texture object... I wasn't really > sure about a correct fix for the problem. Ah... another interesting issue ;-) If the size of the TextureObject changes then indeed the TextureObjectManager needs to be informed of the size change. > I don't have any sample code yet, but I will do something and keep you > informed. Thanks. Once you've got some sample code I'll come back to the issue and see if I can come up with a general solution. Your solution of making the generateTextureObjects profile specific is still something that would be appropriate to merge, but I'll hold this back till we've sorted out the other bugs. Cheers, Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
