aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classes/share/javax/media/j3d/GeometryArrayRetained.java10
-rw-r--r--src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java2
-rw-r--r--src/classes/share/javax/media/j3d/JoglPipeline.java12
-rw-r--r--src/classes/share/javax/media/j3d/NoopPipeline.java5
-rw-r--r--src/classes/share/javax/media/j3d/Pipeline.java5
5 files changed, 18 insertions, 16 deletions
diff --git a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
index c2c9939..5480e42 100644
--- a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
@@ -256,7 +256,7 @@ ArrayList<GeometryAtom> gaList = new ArrayList<GeometryAtom>(1);
// used by interleaved NIO buffer
J3DBuffer interleavedVertexBuffer = null;
- FloatBufferWrapper interleavedFloatBufferImpl = null;
+ FloatBuffer interleavedFloatBufferImpl = null;
// pointers used, when transparency is turned on
// or when its an object such as C3F, P3F etc ..
@@ -555,7 +555,7 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
}
// Compute boundingbox for interleaved nio buffer
- void computeBoundingBox(int vIndex, FloatBufferWrapper vdata) {
+ void computeBoundingBox(int vIndex, FloatBuffer vdata) {
int i, offset;
double xmin, xmax, ymin, ymax, zmin, zmax;
@@ -2476,7 +2476,7 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
(texCoordSetMap == null) ? 0 : texCoordSetMap.length,
texCoordSetMapOffset,
cv.numActiveTexUnit,
- interleavedFloatBufferImpl.getBufferAsObject(), cdata,
+ interleavedFloatBufferImpl, cdata,
cdirty);
} // end of interleaved case
@@ -9654,14 +9654,14 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
// set the interleaved vertex with NIO buffer
void setInterleavedVertexBuffer(J3DBuffer vertexData) {
- FloatBufferWrapper bufferImpl = null;
+ FloatBuffer bufferImpl = null;
if (vertexData != null ){
if (vertexData.bufferType != J3DBuffer.Type.FLOAT)
throw new IllegalArgumentException(J3dI18N.getString("GeometryArray116"));
- bufferImpl = (FloatBufferWrapper)vertexData.getBufferImpl();
+ bufferImpl = (FloatBuffer)vertexData.getROBuffer();
assert bufferImpl.isDirect();
diff --git a/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java
index 4ff03c3..813f780 100644
--- a/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java
@@ -1408,7 +1408,7 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
(texCoordSetMap == null) ? 0 : texCoordSetMap.length,
texCoordSetMapOffset,
cv.numActiveTexUnit,
- interleavedFloatBufferImpl.getBufferAsObject(), cdata,
+ interleavedFloatBufferImpl, cdata,
cdirty, indexCoord);
} //end of interleaved
else {
diff --git a/src/classes/share/javax/media/j3d/JoglPipeline.java b/src/classes/share/javax/media/j3d/JoglPipeline.java
index 53a74c9..73ac238 100644
--- a/src/classes/share/javax/media/j3d/JoglPipeline.java
+++ b/src/classes/share/javax/media/j3d/JoglPipeline.java
@@ -356,7 +356,7 @@ class JoglPipeline extends Pipeline {
int texCoordSetMapLen,
int[] texUnitOffset,
int numActiveTexUnit,
- Object varray, float[] cdata, int cdirty) {
+ FloatBuffer varray, float[] cdata, int cdirty) {
if (VERBOSE) System.err.println("JoglPipeline.executeInterleavedBuffer()");
executeGeometryArray(ctx, geo, geo_type,
@@ -364,7 +364,7 @@ class JoglPipeline extends Pipeline {
startVIndex, vcount, vformat,
texCoordSetCount, texCoordSetMap, texCoordSetMapLen,
texUnitOffset, numActiveTexUnit, 0, null,
- null, (Buffer) varray, cdata, cdirty);
+ null, varray, cdata, cdirty);
}
void setVertexFormat(Context ctx, GeometryArrayRetained geo,
@@ -1172,7 +1172,7 @@ class JoglPipeline extends Pipeline {
int[] texCoordSetMapOffset,
int numActiveTexUnitState,
int vertexAttrCount, int[] vertexAttrSizes,
- float[] varray, Buffer varrayBuffer,
+ float[] varray, FloatBuffer varrayBuffer,
float[] carray, int cDirty) {
if (VERBOSE) System.err.println("JoglPipeline.executeGeometryArray()");
JoglContext ctx = (JoglContext) absCtx;
@@ -1263,7 +1263,7 @@ class JoglPipeline extends Pipeline {
if (varray != null) {
verts = getVertexArrayBuffer(varray);
} else if (varrayBuffer != null) {
- verts = (FloatBuffer) varrayBuffer;
+ verts = varrayBuffer;
} else {
// This should never happen
throw new AssertionError("Unable to get vertex pointer");
@@ -1714,7 +1714,7 @@ class JoglPipeline extends Pipeline {
int texCoordSetMapLen,
int[] texCoordSetOffset,
int numActiveTexUnitState,
- Object vdata, float[] carray,
+ FloatBuffer vdata, float[] carray,
int cDirty,
int[] indexCoord) {
if (VERBOSE) System.err.println("JoglPipeline.executeIndexedGeometryBuffer()");
@@ -1725,7 +1725,7 @@ class JoglPipeline extends Pipeline {
0, null,
texCoordSetCount, texCoordSetMap, texCoordSetMapLen, texCoordSetOffset,
numActiveTexUnitState,
- null, (FloatBuffer) vdata, carray,
+ null, vdata, carray,
cDirty, indexCoord);
}
diff --git a/src/classes/share/javax/media/j3d/NoopPipeline.java b/src/classes/share/javax/media/j3d/NoopPipeline.java
index d53a033..58dd538 100644
--- a/src/classes/share/javax/media/j3d/NoopPipeline.java
+++ b/src/classes/share/javax/media/j3d/NoopPipeline.java
@@ -30,6 +30,7 @@ import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.nio.Buffer;
+import java.nio.FloatBuffer;
/**
* Concrete implementation of Pipeline class for the noop rendering
@@ -126,7 +127,7 @@ class NoopPipeline extends Pipeline {
int texCoordSetMapLen,
int[] texCoordSetOffset,
int numActiveTexUnitState,
- Object varray, float[] cdata, int cdirty) {
+ FloatBuffer varray, float[] cdata, int cdirty) {
}
void setVertexFormat(Context ctx, GeometryArrayRetained geo,
@@ -211,7 +212,7 @@ class NoopPipeline extends Pipeline {
int texCoordSetMapLen,
int[] texCoordSetOffset,
int numActiveTexUnitState,
- Object varray, float[] cdata,
+ FloatBuffer varray, float[] cdata,
int cdirty,
int[] indexCoord) {
}
diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java
index 8d15f2c..82f7bb7 100644
--- a/src/classes/share/javax/media/j3d/Pipeline.java
+++ b/src/classes/share/javax/media/j3d/Pipeline.java
@@ -29,6 +29,7 @@ package javax.media.j3d;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.nio.Buffer;
+import java.nio.FloatBuffer;
/**
* Abstract pipeline class for rendering pipeline methods. All rendering
@@ -222,7 +223,7 @@ public Pipeline run() {
int texCoordSetMapLen,
int[] texCoordSetOffset,
int numActiveTexUnitState,
- Object varray, float[] cdata, int cdirty);
+ FloatBuffer varray, float[] cdata, int cdirty);
abstract void setVertexFormat(Context ctx, GeometryArrayRetained geo,
int vformat, boolean useAlpha, boolean ignoreVertexColors);
@@ -322,7 +323,7 @@ public Pipeline run() {
int texCoordSetMapLen,
int[] texCoordSetOffset,
int numActiveTexUnitState,
- Object varray, float[] cdata,
+ FloatBuffer varray, float[] cdata,
int cdirty,
int[] indexCoord);