Hello guys, from some old posts I learned that setValidVertexCount()
in IndexedGeometryArray will actually apply to the index arrays. But for
some reason it just won't work here in my program. Here's what my example
code looks like:

IndexedQuadArray ga = new IndexedQuadArray(100,
              GeometryArray.COORDINATES | GeometryArray.BY_REFERENCE,
       200);
ga.setCapability(GeometryArray.ALLOW_COUNT_WRITE);

float[] mfCoordinates = new float[100*3];
int[] miCoordIndices = new int[200];
....
ga.setCoordRefFloat(mfCoordinates);
ga.setCoordinateIndices(0, miCoordIndices);

now if I setValidVertexCount(200), it'll have an exception like
"initialVertexIndex + validVertexCount > vertexCount". (InitialIndex is 0).
It seemed to apply to the vertex array. Even if I setValidVertexCount(80),
it still doesn't look right. The whole geometry array is rendered but not
the first 80 indices.

Can anyone give an example codes that works?

thanks in advance.

-Ruopeng

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to