From: Marcin Romaszewicz (marcin++at++asmodean.engr.sgi.com)
Date: 06/29/2000 22:33:01
The color matrix is not applied to the colors that are written to the
framebuffer, but during pixel transfer operations such as downloading
texture (which you will have to do to make your textures greyscale) or
during glCopyPixels.
This brings up another way of making your scene grayscale, but it will run
a bit slowly. You can set up a color matrix which maps all colors to
greyscale and use glCopyPixels (or pfTexture::subload) and then copy the
framebuffer to itself in place. All the pixels in the framebuffer will go
through the color matrix and will be converted to greyscale.
-- Marcin
On Fri, 30 Jun 2000, Eric Heft wrote:
> Hi,
>
> >From the OpenGL superbible I ran across a reference to the "Color Matrix". Its
> supportted un the OpenGL 1.2 spec so it probably will not work. But I found a
> reference to http://reality.sgi.com/graphics. The command is glPixelMap
>
> -- Eric
>
> Marcin Romaszewicz wrote:
>
> > No, there is no call that does this, but you could traverse the
> > scenegraph, extract all colors from the materials, and replace the
> > material colors with shades of grey.
> >
> > It gets a little more interesting if you have lighting disabled in
> > particular geostates and specify colors per-vertex. In this case, you have
> > to go through the color array on the geosets with those geostates and
> > modify all colors to be greyscale as well.
> >
> > Take a look at the documentation for indexed pfGeoStates (man pfGeoState
> > and pfChannel). This mechanism allows you to easily swith between your
> > color and greyscale geostates on the fly.
> >
> > -- Marcin
> >
> > On Thu, 29 Jun 2000, Martin, Tammy wrote:
> >
> > > Hi,
> > > If I import an OpenFlight database that has color imagery, is there a
> > > call in Performer I can use to render only in grayscale?
> > > Thanks,
> > > Tammy
> > > -----------------------------------------------------------------------
> > > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > > Submissions: info-performer++at++sgi.com
> > > Admin. requests: info-performer-request++at++sgi.com
> > >
> >
> > -----------------------------------------------------------------------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
>
This archive was generated by hypermail 2b29 : Thu Jun 29 2000 - 22:33:03 PDT