Re: decolorize callback

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Mon, 6 Feb 95 11:52:13 PST


>
> I'm trying to write a pfuTraverser procedure to decolorize the current scene by
> finding the color of every vertex and and setting RG and B all to the same
> level. This level would be the luminance of that RGB triplet. Below is the
> traverser callback to do decolorization that I've written.
> It doesn't seem to work at all. I've run the debugger on it several
> times and for GeoSets made up of TRISTRIPS, it does nothing, although the
> values seem to change, they have no effect on the appearance.
> For FLAT_TRI_STRIPS, the calculation for the # of colors doesn't work
> and it seems to overwrite memory when it writes new values. Is the formula for
> the number of colors required for a PER_VERTEX color binding on FLAT_TRI_STRIPS
> # of colors = Sum(length[i]-2), i=0 to # of primitives? The man pages are a
> little sketchy on this.
>
> Thanks for the help.

        The code looks good to me and you're correctly computing FLAT
primitives so I suggest you use gldebug to find out what you're
sending to graphics. I assume you're not using
pfGSetDrawMode(PFGS_COMPILE_GL, 1) in which case your color changes
will be ignored.


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:56 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.