Hi Shane,

There are a couple of texture policy settings in the
osgDB::DatabasePager that can tweak things a bit, but not generally:

        /** Set whether newly loaded textures should have their
UnrefImageDataAfterApply set to a specified value.*/
        void setUnrefImageDataAfterApplyPolicy(bool changeAutoUnRef,
bool valueAutoUnRef) { _changeAutoUnRef = changeAutoUnRef;
_valueAutoUnRef = valueAutoUnRef; }

        /** Get whether newly loaded textures should have their
UnrefImageDataAfterApply set to a specified value.*/
        void getUnrefImageDataAfterApplyPolicy(bool& changeAutoUnRef,
bool& valueAutoUnRef) const { changeAutoUnRef = _changeAutoUnRef;
valueAutoUnRef = _valueAutoUnRef; }


        /** Set whether newly loaded textures should have their
MaxAnisotopy set to a specified value.*/
        void setMaxAnisotropyPolicy(bool changeAnisotropy, float
valueAnisotropy) { _changeAnisotropy = changeAnisotropy;
_valueAnisotropy = valueAnisotropy; }

        /** Set whether newly loaded textures should have their
MaxAnisotopy set to a specified value.*/
        void getMaxAnisotropyPolicy(bool& changeAnisotropy, float&
valueAnisotropy) const { changeAnisotropy = _changeAnisotropy;
valueAnisotropy = _valueAnisotropy; }



In the case osgTerrain::TerrainTile based paged database the above
settings won't work as it's osgTerrain that creates the osg::Texture
objects, so instead you'd need to modify the osgTerrain::ImageLayer
settings on the TerrainTiles.  A custom Registry::ReadFileCallback
could probably be implemented to do this for you.

Beyond this you could write a pre-processing tool to modify the .ive
files on disk.

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

Reply via email to