Hi Stephane,
Added complexity into the dds plugin just because you want a different
default setting that can already be done in your application at
runtime seems to add complexity rather than ease it. You should be
able to do just:
osgDB::Registry::instance()->setOptions(new osgDB::Options("dds_flip"));
Should be enough. As to what the default should be for dds... this
all depends upon where you data is coming from and whether your
geometry coords are set up in associated with coords, this is
something that will change with the data so isn't something that
should be a compile time option, but rather a runtime one.
Robert.
On Wed, Sep 23, 2009 at 8:33 AM, Stephane Lamoliatte
<[email protected]> wrote:
> Hi Robert,
>
> I think that the dds loading policy of OpenSceneGraph is very strange :
> When I replace a png or a jpg texture file by a dds on an object, the dds
> texture is flipped vertically.
> I know, there is a "dds_flip" option to put on the global options of the
> osgDB::Registry : but this is too much for my poor little head...
> And worst of it, we must think about it every time we open a file containing
> dds textures with one of our viewers...
> So, this behavior is strange, confuse and non intuitive - especially for new
> users.
>
> In the other hand, the dds plug'in exists since a long time, and lot of
> people already use dds files with the "dds_flip" Registry option or with
> flipped texture coordinates, so I understand that you can't modify the
> behavior of the plug'in for these people.
>
> So I suggest to add a simple CMake option (OSG_DDS_AUTOFLIP) wich modify the
> behavior of the plug'in when we put it to ON.
> I will be OFF by default, so it will not cause trouble in previously built
> application, but it will simplify the dds loading for new users and will
> cure my headache.
>
> Here is the patch to add this compile option.
>
> Cheers,
>
> --
> Lamoliatte Stephane
> R&D Engineer
>
> R.S.A. Cosmos
> Z.I. de la Vaure - B.P.40
> 42290 Sorbiers, France
> Tel : +33 (0)4 77 53 30 48
> Fax : +33 (0)4 77 53 38 61
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org