Re: The random colour changing bug

Hi Curtis,

> I tried it on my machine (Linux running Java 1.4.2_09 and Java3D 1.3.1
> with an nVidia graphics card), and saw the bug. The yellow box gets
> slightly darker once the middle button is pressed and the cursor is
> moved at all.
> I tried a few other tests. The problem occurs regardless of texture
> mapping on or off. It does not occur with Java2D, or with a color
> mapping to RGB instead of ConstantMaps to Red, Green and Blue. I've
> included a modified version of the test program that uses a mapping to
> Display.RGB to avoid the problem.

Thanks for these experiments. It sounds like a
Java3DD problem, but one that we may be able to
avoid by some small change.

> Bill, any ideas how I could continue investigating this issue? I can
> just dig into the ConstantMap logic, since that seems likely. The fact
> that you aren't seeing the problem on your machine suggests that it's
> either specific to newer versions of Java3D, or dependent on graphics
> card hardware.

You might try my Bounds suggestion, but I doubt
that will fix the problem. I used your modified
version of Andrew's test program to see if there
were any differences in the calls to staticMakeAppearance()
in visad/java3d/ between the
ConstantMap to color and the ScalarMap to RGB.
But as far as I could tell, in both cases the
ColoringAttributes argument was null, the
TransparencyAttributes argument was generated
from alpha = 0.0, and no_material was false. I
guess the thing to do is to determine what could
be different between the ConstantMap case and the
ScalarMap to RGB case, in either the GeometryArray
or the Appearance.