HI Brett,
All you need to do is set the Registry's Options object for the default setting.
osgDB::ReaderWriter::Options* options = new
osgDB::ReaderWriter::Options;
options->setOptionString(str);
osgDB::Registry::instance()->setOptions(options);
Robert.
On Fri, Oct 17, 2008 at 1:25 AM, brettwiesner <[EMAIL PROTECTED]> wrote:
>
>> brettwiesner wrote:
>>>
>>> Hey,
>>>
>>> Since most DDS textures are going to come in flipped (ie: directX style
>>> and not openGL style) I would like my application to always pass the
>>> "dds_flip" option to the DDS loader. If I could extend the DDS loader I
>>> could do that. Just another case for including the loaders as actual
>>> libs and the plugins themselves as smaller projects that just use the
>>> loaders api.
>>>
>>
>> It's easy enough to hard code a ReaderWriter option:
>>
>> options = new osgDB::ReaderWriter::Options("dds_flip");
>> texImage = osgDB::readImageFile(filename, options);
>>
>>
>> You might want to use a ref_ptr for the options object, but basically, the
>> above should work.
>>
>> --"J"
>
> I think you're misunderstanding. I'm not loading the texture myself. Other
> loaders are... the flt loader, the 3ds loader, etc. Surely you don't mean to
> change all of them to pass that option? I'm actually trying to avoid
> changing OSG source (otherwise I could just have the DDS loader always use
> that option).
>
> I'm suggesting two things...
>
> 1) that the DDS loader be fixed (ie: DDS is a directX file format and it's
> coordinate system is directX. OSG should expect that DDS files come in that
> coordinate system and flip them automatically).
> 2) And that I should be able to derive MyDdsLoader from a osgDB::ddsLoader
> and register that with the osgDB_dds plugin so that my loader is used.
>
> Thanks,
> Brett
> _______________________________________________
> 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