On Fri, Sep 17, 2010 at 4:03 AM, Robert Osfield <[email protected]>wrote:
> Hi Glenn, > > On Thu, Sep 16, 2010 at 7:53 PM, Glenn Waldron <[email protected]> wrote: > > Hi folks, > > Tthe methods Vec4f::asABGR() and asRGBA() appear to be reversed. (That > is, > > asABGR() returns RGBA and vice-versa.) Can someone lay another pair of > eyes > > on them and confirm this? > > They "appear" reversed to you, but as far as I'm aware I haven't seen > any bugs reported with the work of them. The intention is that these > mappings are passed directly to OpenGL and so far seem to be working > fine. > > Have you seen a problem with mapping Vec4's to RGBAs to ABGR's to OpenGL? > No problem, just investigating. One of my customers stores color data in 32-bit ABGR. He is porting code to OSG, came across these methods, and was confused since they appear to be swapped (based on the method names). I'd never seen them before and upon inspection they looked backwards to me as well, so I agreed to look into it. A quick search shows that they are only used in 2 places in the OSG: in osgSim::LightPointDrawable, and in the DXFWriterNodeVisitor (in which the code calls asABGR() to get an RGB value ... another tip-off that the methods might be reversed). > > Robert. > _______________________________________________ > 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

