[osg-users] Image::readPixels and color matrix
Glenn Waldron
gwaldron at gmail.com
Fri Jul 20 11:22:24 PDT 2007
Robert et al.,
I am using an FBO to render to a texture. I've attached an osg::Image so it
will read back the image each frame via glReadPixels.
I ultimately require the image to be in YUV422 format, not RGB. Now from
what I've read, I can actually do the conversion on the card by first
applying a color matrix (glColorMatrix) to convert RGB to YUV, then calling
glReadPixels() with GL_422_EXT. This would be great since it would reduce
the number of readback pixels by 50% (since YUV422 stores 2 pixels in each
32 bit word).
SO, my question is: is there a way using OSG to apply that color matrix so
that osg::Image::readPixels will use it? If not, would you entertain the
idea of setting a "setReadPixelsColorMatrix()" or some such method to
osg::Image?
Thanks in advance. -gw
--
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070720/d2fbd9e3/attachment.htm
More information about the osg-users
mailing list