[comp.sys.sgi] Color mapping problems on the 4D/25TG

roger@tachyon.UUCP (Roger Cordes) (12/18/90)

    We have a color-map-related problem when our code is executed on the
4D/25TG: in color map mode, a line drawn using a single color index will
exhibit a rainbow effect, as though indices in the color map outside the range
of those we use are being accessed. Obvious possible causes have been
investigated (bit shift w.r.t current writemask, drawmodes, single/double
buffer state, onemap vs. multimap, argument/value type checking and
consistency) and eliminated. The code executes as expected on non-Turbo
workstations:
	color(col);
	move(x1,y1,z1);
	draw(x2,y2,z2);
    This line is supposed to be a single color, and shows up as an
interpolation between entries in another part of the color map.
    Unfortunately, we are mystified and wonder whether or not anyone else has
encountered similar behavior and might be able to help isolate what it is we
are doing wrong.
    We recognize that the brief description above does not provide enough
information for those who have never seen something like this, but we figured
it might ring a bell with someone who has.
      | Roger L. Cordes, Jr.        |  Stephen Dedalus Incorporated    |
      | ...!mcnc!rti!tachyon!roger  |  1150 SE Maynard Road, Suite 100 |
      | (919) 467-7072              |  Cary, North Carolina  27511     |

bennett@sgi.com (Jim Bennett) (01/03/91)

In article <136@tachyon.UUCP> roger@tachyon.UUCP (Roger Cordes) writes:
>
>    We have a color-map-related problem when our code is executed on the
>4D/25TG: in color map mode, a line drawn using a single color index will
>exhibit a rainbow effect, as though indices in the color map outside the range
>of those we use are being accessed. Obvious possible causes have been
>investigated (bit shift w.r.t current writemask, drawmodes, single/double
>buffer state, onemap vs. multimap, argument/value type checking and
>consistency) and eliminated. The code executes as expected on non-Turbo
>workstations:
>	color(col);
>	move(x1,y1,z1);
>	draw(x2,y2,z2);
>    This line is supposed to be a single color, and shows up as an
>interpolation between entries in another part of the color map.

You need a shademodel(FLAT) on the 4D/25TG to disable color interpolation.

>      | Roger L. Cordes, Jr.        |  Stephen Dedalus Incorporated    |
>      | ...!mcnc!rti!tachyon!roger  |  1150 SE Maynard Road, Suite 100 |
>      | (919) 467-7072              |  Cary, North Carolina  27511     |

Jim Bennett			(bennett@esd.sgi.com)