HI Laurent,

The ReaderWriter::Options is the wrong place to go look for forcing
texture compression, as this only affects the loaders, and none of
these are set up to doing anything when being passed these string you
are trying.  I don't understand where you got this idea from.

osgconv has support for doing texture compression. Try:

  osgconv mymodel.flt --compress-dxt3 mymodel.ive

Robert.

On Dec 7, 2007 4:09 PM, Laurent Di Cesare
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm encountering performance problems when loading lots of textures in
> my scene.
> I've been trying to set options like internalFormatMode to
> USE_S3TC_DXT5_COMPRESSION, but I can't see any effect, and wonder what
> syntax I should be using:
>
> If I call
>         osgDB::ReaderWriter::Options* pOptions = new
> osgDB::ReaderWriter::Options();
>         pOptions->setObjectCacheHint(
> osgDB::ReaderWriter::Options::CACHE_ALL );
>         pOptions->setOptionString(
> "internalFormatMode=USE_S3TC_DXT5_COMPRESSION;unRefImageDataAfterApply=TRUE;useHardwareMipMapGeneration=FALSE"
> );
> I can't see much of a result, and I've been crawling in the source code
> to try to find where this is parsed without success.
>
> I've delved a little into the code and found that only ive and osg
> plugins seem to handle these options. Would it be possible to parse
> these options at the osgdb level rather than the plugin level?
> Also, I am not sure whether it is possible to cache Texture objects in
> osgdb. Images are correctly cached, but operations like rescaling
> textures seem to be called several times for the same image. Is there a
> way for me to explicitly call a cache on the Texture objects to avoid
> such rescaling?
>
> Thanks in advance,
> Laurent Di Cesare.
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to