问题
I have a strange effect that I would like to understand. Based on this https://stackoverflow.com/a/26384859 example code I changed only two lines:
// pAtt.setCullFace(PolygonAttributes.CULL_NONE); <-- old pAtt.setPolygonMode(PolygonAttributes.POLYGON_LINE); // <-- new
I was expecting to see a (colored) wire frame of the original 4 sided pyramid. But it paints a beautifully colored haze in the air while it is rotating.
Edit: this has been open as a simple question (is it a bug? / reproducible or not?) for a really long time, and now had a bounty, but still no answers.
I assume, that, java3D is really, really dead now.
I would like not only to know how this effect can be suppressed, but also if it is a bug or a reliably reproducible feature that can be put to use.
(I think of something like Speedy Gonzales leaving a color trail when running fast.)
回答1:
The face culling and the polygon mode are 2 distinct notions: glPolygonMode glCullFace
Java3D 1.6.0 uses JOGL 2. If you want to understand how Java3D works, you need to understand how computer graphics and OpenGL work. POLYGON_LINE shows only the outlined polygons, is it really what you want?
Please avoid claiming that there might be a bug before being sure that there isn't any misunderstanding of the API use.
来源:https://stackoverflow.com/questions/26802042/strange-effect-painting-beautiful-colored-haze-in-the-air-with-java3d