[osg-submissions] DDS Writer Correction
David Spilling
david.spilling at gmail.com
Sun Sep 16 01:34:55 PDT 2007
The reading code is in line XXX.
A set of legitimate, "easy" cases is set up in the rgbFormats structure
(line 319 onwards). The incoming format is checked against this for a match
in line 358; the relevant bitmasks are read out here.
The read for GL_RGBA is the A8B8G8R8 format in line 344.
Hope that helps.
David
On 15/09/2007, Robert Osfield <robert.osfield at gmail.com> wrote:
>
> Hi David,
>
> I have merged your changes, but... its rather a shot in the dark based
> on the assumption that you've done more homework than me... I looked
> at the code and couldn't spot any code properly handling the masks
> during reading so it must be making assumptions, in fact the whole
> things leaves me rather perplexed - I'm not familiar with the dds
> format which doesn't help.
>
> The changes are now merged and submitted to SVN. There would a couple
> of warning fixes that had mad it in since 2.1.1 but no changes that
> would affect yours.
>
> Cheers,
> Robert.
>
> On 9/14/07, David Spilling <david.spilling at gmail.com> wrote:
> > Dear Robert,
> >
> > Given no replies to my recent "does anybody use the DDS writer" query,
> I
> > was emboldened to submit this very small patch. The bitmasks for RGBA
> and
> > RGB have been modified in the writer portion of the code (line 765
> onwards).
> > This is now consistent with what the DDS plugin reads. In terms of
> testing,
> > note that many 3rd party applications erroneously ignore the bitmasks in
> the
> > file, and assume a BGRA order.
> >
> > This is based on the 2.1.1 release, although I don't think it's changed
> > since then.
> >
> > Hope that helps,
> >
> > David
> >
> > _______________________________________________
> > osg-submissions mailing list
> > osg-submissions at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> >
> >
> >
> _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20070916/817b57c7/attachment.html
More information about the osg-submissions
mailing list