[osg-users] Buffer object pool and setUnrefImageDataAfterApply()

Jannik Heller scrawl at baseoftrash.de
Mon Feb 13 17:58:50 PST 2017


Hi,

I was considering to use the buffer/texture object pool for my program (see http://forum.openscenegraph.org/viewtopic.php?t=3844&view=previous )

What strikes me as odd, though, is how enabling texture buffer pools automatically disables the use of unrefImageDataAfterApply() for textures:

        /** Returns true if the associated Image should be released and it's safe to do so. */
        bool isSafeToUnrefImageData(const State& state) const {
            return (_unrefImageDataAfterApply && state.getMaxTexturePoolSize()==0 && areAllTextureObjectsLoaded());
        }

Why is that the case? Would there be a way to use texture buffer pools while keeping the memory usage benefits of unref-ing the image data after its applied?

Cheers,
Jannik

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70180#70180








More information about the osg-users mailing list