summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-03-17 12:34:53 -0700
committerHarvey Harrison <[email protected]>2013-03-17 12:34:53 -0700
commit73ae278ca2de35b3d786f0d84c09bd334bb6c9cb (patch)
treeb6579110ac3f62d9c2d1f7bc771de46bf2b90b23 /src
parent5dd7de74110d4974fbc295f281c4aa2a28ad595e (diff)
j3dcore: use nio buffers directly for colors, remove use of BufferWrappers
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/classes/share/javax/media/j3d/GeometryArrayRetained.java17
-rw-r--r--src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java7
-rw-r--r--src/classes/share/javax/media/j3d/JoglPipeline.java4
-rw-r--r--src/classes/share/javax/media/j3d/NoopPipeline.java4
-rw-r--r--src/classes/share/javax/media/j3d/Pipeline.java4
5 files changed, 18 insertions, 18 deletions
diff --git a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
index fa9293d..c2c9939 100644
--- a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
@@ -50,9 +50,7 @@ import javax.vecmath.TexCoord4f;
import javax.vecmath.Vector3d;
import javax.vecmath.Vector3f;
-import com.sun.j3d.internal.ByteBufferWrapper;
import com.sun.j3d.internal.Distance;
-import com.sun.j3d.internal.DoubleBufferWrapper;
import com.sun.j3d.internal.FloatBufferWrapper;
@@ -176,8 +174,8 @@ ArrayList<GeometryAtom> gaList = new ArrayList<GeometryAtom>(1);
// Used for NIO buffer colors
J3DBuffer colorRefBuffer = null;
- FloatBufferWrapper floatBufferRefColors = null;
- ByteBufferWrapper byteBufferRefColors = null;
+ FloatBuffer floatBufferRefColors = null;
+ ByteBuffer byteBufferRefColors = null;
// flag to indicate if the "by reference" component is already set
int vertexType = 0;
@@ -2555,7 +2553,8 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
}
Buffer vcoord = null;
- Object cdataBuffer=null, normal=null;
+ Buffer cdataBuffer = null;
+ Object normal=null;
int vdefined = 0;
if((vertexType & PF) != 0) {
@@ -2568,10 +2567,10 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
if((vertexType & CF ) != 0) {
vdefined |= COLOR_FLOAT;
- cdataBuffer = floatBufferRefColors.getBufferAsObject();
+ cdataBuffer = floatBufferRefColors;
} else if((vertexType & CUB) != 0) {
vdefined |= COLOR_BYTE;
- cdataBuffer = byteBufferRefColors.getBufferAsObject();
+ cdataBuffer = byteBufferRefColors;
}
if((vertexType & NORMAL_DEFINED) != 0) {
@@ -8752,12 +8751,12 @@ ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
} else {
switch (colors.bufferType) {
case FLOAT:
- floatBufferRefColors = (FloatBufferWrapper)colors.getBufferImpl();
+ floatBufferRefColors = (FloatBuffer)colors.getROBuffer();
byteBufferRefColors = null;
break;
case BYTE:
- byteBufferRefColors = (ByteBufferWrapper)colors.getBufferImpl();
+ byteBufferRefColors = (ByteBuffer)colors.getROBuffer();
floatBufferRefColors = null;
break;
default:
diff --git a/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java
index ecae885..4ff03c3 100644
--- a/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java
@@ -1479,7 +1479,8 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
Buffer vcoord = null;
- Object cdataBuffer=null, normal=null;
+ Buffer cdataBuffer = null;
+ Object normal=null;
int vdefined = 0;
if((vertexType & PF) != 0) {
@@ -1491,10 +1492,10 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained {
}
if((vertexType & CF ) != 0) {
vdefined |= COLOR_FLOAT;
- cdataBuffer = floatBufferRefColors.getBufferAsObject();
+ cdataBuffer = floatBufferRefColors;
} else if((vertexType & CUB) != 0) {
vdefined |= COLOR_BYTE;
- cdataBuffer = byteBufferRefColors.getBufferAsObject();
+ cdataBuffer = byteBufferRefColors;
}
if((vertexType & NORMAL_DEFINED) != 0) {
diff --git a/src/classes/share/javax/media/j3d/JoglPipeline.java b/src/classes/share/javax/media/j3d/JoglPipeline.java
index 977c650..53a74c9 100644
--- a/src/classes/share/javax/media/j3d/JoglPipeline.java
+++ b/src/classes/share/javax/media/j3d/JoglPipeline.java
@@ -250,7 +250,7 @@ class JoglPipeline extends Pipeline {
int initialCoordIndex,
Buffer vcoords,
int initialColorIndex,
- Object cdataBuffer,
+ Buffer cdataBuffer,
float[] cfdata, byte[] cbdata,
int initialNormalIndex, Object ndata,
int vertexAttrCount, int[] vertexAttrSizes,
@@ -1832,7 +1832,7 @@ class JoglPipeline extends Pipeline {
int vformat,
int vdefined,
Buffer vcoords,
- Object cdataBuffer,
+ Buffer cdataBuffer,
float[] cfdata, byte[] cbdata,
Object ndata,
int vertexAttrCount, int[] vertexAttrSizes,
diff --git a/src/classes/share/javax/media/j3d/NoopPipeline.java b/src/classes/share/javax/media/j3d/NoopPipeline.java
index 2800308..d53a033 100644
--- a/src/classes/share/javax/media/j3d/NoopPipeline.java
+++ b/src/classes/share/javax/media/j3d/NoopPipeline.java
@@ -103,7 +103,7 @@ class NoopPipeline extends Pipeline {
int coordIndex,
Buffer vcoords,
int colorIndex,
- Object cdataBuffer,
+ Buffer cdataBuffer,
float[] cfdata, byte[] cbdata,
int normalIndex, Object ndata,
int vertexAttrCount, int[] vertexAttrSizes,
@@ -250,7 +250,7 @@ class NoopPipeline extends Pipeline {
int vformat,
int vdefined,
Buffer vcoords,
- Object cdataBuffer,
+ Buffer cdataBuffer,
float[] cfdata, byte[] cbdata,
Object normal,
int vertexAttrCount, int[] vertexAttrSizes,
diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java
index 63961a0..8d15f2c 100644
--- a/src/classes/share/javax/media/j3d/Pipeline.java
+++ b/src/classes/share/javax/media/j3d/Pipeline.java
@@ -200,7 +200,7 @@ public Pipeline run() {
int coordIndex,
Buffer vcoords,
int colorIndex,
- Object cdataBuffer,
+ Buffer cdataBuffer,
float[] cfdata, byte[] cbdata,
int normalIndex, Object ndata,
int vertexAttrCount, int[] vertexAttrSizes,
@@ -359,7 +359,7 @@ public Pipeline run() {
int vformat,
int vdefined,
Buffer vcoords,
- Object cdataBuffer,
+ Buffer cdataBuffer,
float[] cfdata, byte[] cbdata,
Object normal,
int vertexAttrCount, int[] vertexAttrSizes,