[osg-users] [osgPlugins] DDS textures not loading on Mac OSX and the latest trunk(3.5.0)
Robert Osfield
robert.osfield at gmail.com
Tue Aug 25 00:09:14 PDT 2015
HI David,
On 25 August 2015 at 01:00, David Guthrie <dguthrie at alionscience.com> wrote:
> I had modified the code to just ignore all loaded mipmaps in a few of the
> plugins to fix it, but everything work in older versions of OSG. The code
> is so different now, it's hard to tell what change triggered the problem.
>
If you follow the thread you'll find an explanation for what has revealed
the problem with the OSX drivers - the DDS plugin previous ignored the
mipmap stored in the file, but this was fixed so that the it loaded an
osg::Image with all mipmaps correctly in place. Once an osg::Image has
mipmaps the .osgb and .ive plugins will write out then later reading in the
mipmaps.
The solution is *NOT* to modify the plugin, the plugins are *CORRECT*.
The workaround for the OSX driver bug is to traverse the loaded subgraphs
to find the osg::Image and disable the mipmaps. This workaround can be
done without any modifications to the OSG and done in a single place in
your own applications - a ReadFileCallback that the does the traversal
would problem this to automatically handle any loaded models - you'd just
attach it to the osgDB::Registry::instance() when you run your application
on OSX.
This suggest route also doesn't hamper other platforms where the GL drivers
are working correctly. Stored mipmaps are the most efficient way to get
fully mipmapped imagery to the GPU so is the recommended route. Under OSX
we'll just have to put up with the workaround and performance overhead
associated with the driver/GPU computing the mipmaps.
Longer term Apple will hopefully fix their GL drivers and you'll be able to
drop the workaround.
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150825/f5a2b24a/attachment-0003.htm>
More information about the osg-users
mailing list