aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-04-19 17:35:54 +0000
committerKenneth Russel <[email protected]>2008-04-19 17:35:54 +0000
commit2a8dc85eff702dcf5273645b3829fe1f4576b571 (patch)
tree114551d38323bba4a9245fb1c3259832fbdce4b7 /make
parent63b7a79103b51207c9910b00bbec4670a5570f72 (diff)
Removed Import of java.nio.* and adjusted custom Java code after
fixing of GlueGen Issue 6 git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1605 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make')
-rw-r--r--make/cg-common.cfg4
-rw-r--r--make/gl-common.cfg1
-rw-r--r--make/gl-impl-CustomJavaCode.java8
-rw-r--r--make/glu-CustomJavaCode.java78
-rw-r--r--make/glu-common.cfg1
5 files changed, 43 insertions, 49 deletions
diff --git a/make/cg-common.cfg b/make/cg-common.cfg
index d0ae8303c..e4462e2a1 100644
--- a/make/cg-common.cfg
+++ b/make/cg-common.cfg
@@ -92,10 +92,6 @@ Ignore cgGetIntStateAssignmentValues
Ignore cgGetParameterValues
Ignore cgGetProgramOptions
-#
-# Need to import New IO for Buffer classes
-#
-Import java.nio.*
# And NativeLibLoader for help loading the native libraries
Import com.sun.opengl.impl.*
diff --git a/make/gl-common.cfg b/make/gl-common.cfg
index e33bba2e1..01afbd8b1 100644
--- a/make/gl-common.cfg
+++ b/make/gl-common.cfg
@@ -5,7 +5,6 @@
RuntimeExceptionType GLException
# Imports needed by all glue code
-Import java.nio.*
Import java.util.*
Import javax.media.opengl.*
Import com.sun.opengl.impl.*
diff --git a/make/gl-impl-CustomJavaCode.java b/make/gl-impl-CustomJavaCode.java
index 85e441069..1669f07bc 100644
--- a/make/gl-impl-CustomJavaCode.java
+++ b/make/gl-impl-CustomJavaCode.java
@@ -319,10 +319,10 @@ public java.nio.ByteBuffer glMapBuffer(int target, int access) {
return null;
}
ARBVBOKey key = new ARBVBOKey(addr, sz);
- ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
+ java.nio.ByteBuffer _res = (java.nio.ByteBuffer) arbVBOCache.get(key);
if (_res == null) {
_res = InternalBufferUtils.newDirectByteBuffer(addr, sz);
- _res.order(ByteOrder.nativeOrder());
+ _res.order(java.nio.ByteOrder.nativeOrder());
arbVBOCache.put(key, _res);
}
_res.position(0);
@@ -344,10 +344,10 @@ public java.nio.ByteBuffer glMapBufferARB(int target, int access) {
return null;
}
ARBVBOKey key = new ARBVBOKey(addr, sz);
- ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
+ java.nio.ByteBuffer _res = (java.nio.ByteBuffer) arbVBOCache.get(key);
if (_res == null) {
_res = InternalBufferUtils.newDirectByteBuffer(addr, sz);
- _res.order(ByteOrder.nativeOrder());
+ _res.order(java.nio.ByteOrder.nativeOrder());
arbVBOCache.put(key, _res);
}
_res.position(0);
diff --git a/make/glu-CustomJavaCode.java b/make/glu-CustomJavaCode.java
index fcf01871f..8df4324a4 100644
--- a/make/glu-CustomJavaCode.java
+++ b/make/glu-CustomJavaCode.java
@@ -1018,7 +1018,7 @@ public boolean gluProject(double objX, double objY, double objZ, double[] model,
/** Interface to C language function: <br> <code> GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ); </code>
* <P> Accepts the outgoing window coordinates as a single buffer.
*/
-public boolean gluProject(double objX, double objY, double objZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer winPos) {
+public boolean gluProject(double objX, double objY, double objZ, java.nio.DoubleBuffer model, java.nio.DoubleBuffer proj, java.nio.IntBuffer view, java.nio.DoubleBuffer winPos) {
return project.gluProject(objX, objY, objZ, model, proj, view, winPos);
}
@@ -1032,7 +1032,7 @@ public boolean gluUnProject(double winX, double winY, double winZ, double[] mode
/** Interface to C language function: <br> <code> GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ); </code>
* <P> Accepts the outgoing object coordinates (a 3-vector) as a single buffer.
*/
-public boolean gluUnProject(double winX, double winY, double winZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer objPos) {
+public boolean gluUnProject(double winX, double winY, double winZ, java.nio.DoubleBuffer model, java.nio.DoubleBuffer proj, java.nio.IntBuffer view, java.nio.DoubleBuffer objPos) {
return project.gluUnProject(winX, winY, winZ, model, proj, view, objPos);
}
@@ -1046,7 +1046,7 @@ public boolean gluUnProject4(double winX, double winY, double winZ, double clipW
/** Interface to C language function: <br> <code> GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW); </code>
* <P> Accepts the outgoing object coordinates (a 4-vector) as a single buffer.
*/
-public boolean gluUnProject4(double winX, double winY, double winZ, double clipW, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, double nearVal, double farVal, DoubleBuffer objPos) {
+public boolean gluUnProject4(double winX, double winY, double winZ, double clipW, java.nio.DoubleBuffer model, java.nio.DoubleBuffer proj, java.nio.IntBuffer view, double nearVal, double farVal, java.nio.DoubleBuffer objPos) {
return project.gluUnProject4(winX, winY, winZ, clipW, model, proj, view, nearVal, farVal, objPos);
}
@@ -1054,7 +1054,7 @@ public void gluPickMatrix(double x, double y, double delX, double delY, int[] vi
project.gluPickMatrix(getCurrentGL(), x, y, delX, delY, viewport, viewport_offset);
}
-public void gluPickMatrix(double x, double y, double delX, double delY, IntBuffer viewport) {
+public void gluPickMatrix(double x, double y, double delX, double delY, java.nio.IntBuffer viewport) {
project.gluPickMatrix(getCurrentGL(), x, y, delX, delY, viewport);
}
@@ -1254,36 +1254,36 @@ public static final int GLU_TESS_WINDING_NEGATIVE = 100133;
public static final int GLU_TESS_WINDING_ABS_GEQ_TWO = 100134;
public static final double GLU_TESS_MAX_COORD = 1.0e150;
-private ByteBuffer copyToByteBuffer(Buffer buf) {
- if (buf instanceof ByteBuffer) {
+private java.nio.ByteBuffer copyToByteBuffer(java.nio.Buffer buf) {
+ if (buf instanceof java.nio.ByteBuffer) {
if (buf.position() == 0) {
- return (ByteBuffer) buf;
+ return (java.nio.ByteBuffer) buf;
}
- return BufferUtil.copyByteBuffer((ByteBuffer) buf);
- } else if (buf instanceof ShortBuffer) {
- return BufferUtil.copyShortBufferAsByteBuffer((ShortBuffer) buf);
- } else if (buf instanceof IntBuffer) {
- return BufferUtil.copyIntBufferAsByteBuffer((IntBuffer) buf);
- } else if (buf instanceof FloatBuffer) {
- return BufferUtil.copyFloatBufferAsByteBuffer((FloatBuffer) buf);
+ return BufferUtil.copyByteBuffer((java.nio.ByteBuffer) buf);
+ } else if (buf instanceof java.nio.ShortBuffer) {
+ return BufferUtil.copyShortBufferAsByteBuffer((java.nio.ShortBuffer) buf);
+ } else if (buf instanceof java.nio.IntBuffer) {
+ return BufferUtil.copyIntBufferAsByteBuffer((java.nio.IntBuffer) buf);
+ } else if (buf instanceof java.nio.FloatBuffer) {
+ return BufferUtil.copyFloatBufferAsByteBuffer((java.nio.FloatBuffer) buf);
} else {
throw new IllegalArgumentException("Unsupported buffer type (must be one of byte, short, int, or float)");
}
}
private int gluScaleImageJava( int format, int widthin, int heightin,
- int typein, Buffer datain, int widthout, int heightout,
- int typeout, Buffer dataout ) {
- ByteBuffer in = null;
- ByteBuffer out = null;
+ int typein, java.nio.Buffer datain, int widthout, int heightout,
+ int typeout, java.nio.Buffer dataout ) {
+ java.nio.ByteBuffer in = null;
+ java.nio.ByteBuffer out = null;
in = copyToByteBuffer(datain);
- if( dataout instanceof ByteBuffer ) {
- out = (ByteBuffer)dataout;
- } else if( dataout instanceof ShortBuffer ) {
+ if( dataout instanceof java.nio.ByteBuffer ) {
+ out = (java.nio.ByteBuffer)dataout;
+ } else if( dataout instanceof java.nio.ShortBuffer ) {
out = BufferUtil.newByteBuffer(dataout.remaining() * BufferUtil.SIZEOF_SHORT);
- } else if ( dataout instanceof IntBuffer ) {
+ } else if ( dataout instanceof java.nio.IntBuffer ) {
out = BufferUtil.newByteBuffer(dataout.remaining() * BufferUtil.SIZEOF_INT);
- } else if ( dataout instanceof FloatBuffer ) {
+ } else if ( dataout instanceof java.nio.FloatBuffer ) {
out = BufferUtil.newByteBuffer(dataout.remaining() * BufferUtil.SIZEOF_FLOAT);
} else {
throw new IllegalArgumentException("Unsupported destination buffer type (must be byte, short, int, or float)");
@@ -1293,12 +1293,12 @@ private int gluScaleImageJava( int format, int widthin, int heightin,
if( errno == 0 ) {
out.rewind();
if (out != dataout) {
- if( dataout instanceof ShortBuffer ) {
- ((ShortBuffer) dataout).put(out.asShortBuffer());
- } else if( dataout instanceof IntBuffer ) {
- ((IntBuffer) dataout).put(out.asIntBuffer());
- } else if( dataout instanceof FloatBuffer ) {
- ((FloatBuffer) dataout).put(out.asFloatBuffer());
+ if( dataout instanceof java.nio.ShortBuffer ) {
+ ((java.nio.ShortBuffer) dataout).put(out.asShortBuffer());
+ } else if( dataout instanceof java.nio.IntBuffer ) {
+ ((java.nio.IntBuffer) dataout).put(out.asIntBuffer());
+ } else if( dataout instanceof java.nio.FloatBuffer ) {
+ ((java.nio.FloatBuffer) dataout).put(out.asFloatBuffer());
} else {
throw new RuntimeException("Should not reach here");
}
@@ -1310,16 +1310,16 @@ private int gluScaleImageJava( int format, int widthin, int heightin,
private int gluBuild1DMipmapLevelsJava( int target, int internalFormat, int width,
int format, int type, int userLevel, int baseLevel, int maxLevel,
- Buffer data ) {
- ByteBuffer buffer = copyToByteBuffer(data);
+ java.nio.Buffer data ) {
+ java.nio.ByteBuffer buffer = copyToByteBuffer(data);
return( Mipmap.gluBuild1DMipmapLevels( getCurrentGL(), target, internalFormat, width,
format, type, userLevel, baseLevel, maxLevel, buffer ) );
}
private int gluBuild1DMipmapsJava( int target, int internalFormat, int width,
- int format, int type, Buffer data ) {
- ByteBuffer buffer = copyToByteBuffer(data);
+ int format, int type, java.nio.Buffer data ) {
+ java.nio.ByteBuffer buffer = copyToByteBuffer(data);
return( Mipmap.gluBuild1DMipmaps( getCurrentGL(), target, internalFormat, width, format,
type, buffer ) );
}
@@ -1327,7 +1327,7 @@ private int gluBuild1DMipmapsJava( int target, int internalFormat, int width,
private int gluBuild2DMipmapLevelsJava( int target, int internalFormat, int width,
int height, int format, int type, int userLevel, int baseLevel,
- int maxLevel, Buffer data ) {
+ int maxLevel, java.nio.Buffer data ) {
// While the code below handles other data types, it doesn't handle non-ByteBuffers
data = copyToByteBuffer(data);
return( Mipmap.gluBuild2DMipmapLevels( getCurrentGL(), target, internalFormat, width,
@@ -1335,7 +1335,7 @@ private int gluBuild2DMipmapLevelsJava( int target, int internalFormat, int widt
}
private int gluBuild2DMipmapsJava( int target, int internalFormat, int width,
- int height, int format, int type, Buffer data ) {
+ int height, int format, int type, java.nio.Buffer data ) {
// While the code below handles other data types, it doesn't handle non-ByteBuffers
data = copyToByteBuffer(data);
return( Mipmap.gluBuild2DMipmaps( getCurrentGL(), target, internalFormat, width, height,
@@ -1344,15 +1344,15 @@ private int gluBuild2DMipmapsJava( int target, int internalFormat, int width,
private int gluBuild3DMipmapLevelsJava( int target, int internalFormat, int width,
int height, int depth, int format, int type, int userLevel, int baseLevel,
- int maxLevel, Buffer data) {
- ByteBuffer buffer = copyToByteBuffer(data);
+ int maxLevel, java.nio.Buffer data) {
+ java.nio.ByteBuffer buffer = copyToByteBuffer(data);
return( Mipmap.gluBuild3DMipmapLevels( getCurrentGL(), target, internalFormat, width,
height, depth, format, type, userLevel, baseLevel, maxLevel, buffer) );
}
private int gluBuild3DMipmapsJava( int target, int internalFormat, int width,
- int height, int depth, int format, int type, Buffer data ) {
- ByteBuffer buffer = copyToByteBuffer(data);
+ int height, int depth, int format, int type, java.nio.Buffer data ) {
+ java.nio.ByteBuffer buffer = copyToByteBuffer(data);
return( Mipmap.gluBuild3DMipmaps( getCurrentGL(), target, internalFormat, width, height,
depth, format, type, buffer ) );
}
diff --git a/make/glu-common.cfg b/make/glu-common.cfg
index 679e4aef4..dbf8bb115 100644
--- a/make/glu-common.cfg
+++ b/make/glu-common.cfg
@@ -18,7 +18,6 @@ TagNativeBinding true
#
# Imports needed by all glue code
#
-Import java.nio.*
Import javax.media.opengl.*
Import javax.media.opengl.glu.*
Import com.sun.opengl.impl.*