From 43e98e7988decbbeade957e4fdcc97e365667609 Mon Sep 17 00:00:00 2001 From: kcr Date: Wed, 6 Oct 2004 02:03:14 +0000 Subject: The fix for Issue 23 now prints a warning when a program erroneously issues a call to set/get{Color,Normal,TexCoord}Index in USE_COORD_INDED_ONLY mode. This checkin corrects two example programs that trigger this warning message. --- src/GeometryByReference/GeometryByReferenceNIOBuffer.java | 3 +++ src/GeometryByReference/InterleavedNIOBuffer.java | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src/GeometryByReference') diff --git a/src/GeometryByReference/GeometryByReferenceNIOBuffer.java b/src/GeometryByReference/GeometryByReferenceNIOBuffer.java index 183b7b1..0204b64 100644 --- a/src/GeometryByReference/GeometryByReferenceNIOBuffer.java +++ b/src/GeometryByReference/GeometryByReferenceNIOBuffer.java @@ -447,7 +447,10 @@ GeometryUpdater { tetra.setCoordRefBuffer(indexedFloatBufferCoord); tetra.setColorRefBuffer(indexedFloatBufferColor); ((IndexedTriangleStripArray)tetra).setCoordinateIndices(0, indices); + /* + // Do not set color indices in UCIO mode ((IndexedTriangleStripArray)tetra).setColorIndices(0, indices); + */ } if (tetra != null) diff --git a/src/GeometryByReference/InterleavedNIOBuffer.java b/src/GeometryByReference/InterleavedNIOBuffer.java index 9b6c721..168333e 100644 --- a/src/GeometryByReference/InterleavedNIOBuffer.java +++ b/src/GeometryByReference/InterleavedNIOBuffer.java @@ -495,11 +495,14 @@ public class InterleavedNIOBuffer extends JApplet implements ActionListener { 12); tetra.setInterleavedVertexBuffer(indexedInterleavedBuffer); ((IndexedTriangleArray)tetra).setCoordinateIndices(0, indices); + /* + // Do not set color or texcoord indices in UCIO mode ((IndexedTriangleArray)tetra).setColorIndices(0, indices); ((IndexedTriangleArray)tetra).setTextureCoordinateIndices( 0, 0, indices); ((IndexedTriangleArray)tetra).setTextureCoordinateIndices( 1, 0, indices); + */ } else if (type == 4) { // Indexed strip geometry tetra = new IndexedTriangleStripArray(4, -- cgit v1.2.3