Hi Weng, glColorMask/osg::Camera::setColorMask is not the appropriate tool to use to make a grayscale image, it just enable/disables the writing to the different colour changes. For greyscale you'll need to use a ColorMatrix, however, this uses part of the OpenGL pipeline that isn't generally implemented in all modes/hardware/drivers, you'll need to read up on OpenGL specs to learn these caveates.
The other way to do is would be to write a shader that applies a convert to greyscale in the fragment program, or to do a multipass approach where you render to FBO, then have a second pass that does the conversion. Robert. On Tue, May 6, 2008 at 8:17 PM, Weng Heng Sze Tho <[EMAIL PROTECTED]> wrote: > I would like to know how to implement color transformations (e.g. change to > grayscale view). > > I tried using osg::Camera::setColorMask(true, true, true, true) function but > that doesn't seem to work. > So I'm wondering if I am using the function correctly....or is this the > correct function to call? > > Thanks in advance > > > > ________________________________ > > Real people. Real questions. Real answers. Share what you know. > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org