diff options
author | Kenneth Russel <[email protected]> | 2009-03-19 06:39:36 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2009-03-19 06:39:36 +0000 |
commit | 45eac4e00b9b9dd935265c2ab25a61a2cf3cbf63 (patch) | |
tree | 3f1b3f3c0bee714b01acccdff54c29b378b0eb45 /src/jogl/classes/com/sun/opengl/impl/glu | |
parent | 0da2cacaab3c6862df6ca05abdbf0a7d9e9e5451 (diff) |
Moved remaining portions of fixed function emulation out of core JOGL
public and implementation packages and into
com.sun.opengl.util.glsl.fixed.* and other subpackages of
com.sun.opengl.util. Renamed javax.media.opengl.sub.GLObject to
javax.media.opengl.GLBase. Moved interfaces in
javax.media.opengl.sub.fixed to javax.media.opengl.fixedfunc and
changed naming convention. Moved all classes in
javax.media.opengl.util to com.sun.opengl.util. Moved
com.sun.opengl.impl.packrect to com.sun.opengl.util.packrect. Renamed
InternalBufferUtils to InternalBufferUtil to match naming convention
and copied in needed routines for GLU and other classes. Fixed build
breakage when specifying rootrel.build property; reintroduced
build-temp directory. Updated demos.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1886 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/glu')
4 files changed, 21 insertions, 22 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/glu/GLUquadricImpl.java b/src/jogl/classes/com/sun/opengl/impl/glu/GLUquadricImpl.java index 2d6e41126..bb1decf42 100644 --- a/src/jogl/classes/com/sun/opengl/impl/glu/GLUquadricImpl.java +++ b/src/jogl/classes/com/sun/opengl/impl/glu/GLUquadricImpl.java @@ -116,7 +116,6 @@ package com.sun.opengl.impl.glu; import javax.media.opengl.*; -import javax.media.opengl.sub.*; import javax.media.opengl.glu.*; import com.sun.opengl.util.ImmModeSink; import java.nio.*; diff --git a/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/BuildMipmap.java b/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/BuildMipmap.java index c30f83d20..f77f76fc8 100644 --- a/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/BuildMipmap.java +++ b/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/BuildMipmap.java @@ -47,8 +47,8 @@ package com.sun.opengl.impl.glu.mipmap; import javax.media.opengl.GL; import javax.media.opengl.GL2; import javax.media.opengl.glu.GLU; -import javax.media.opengl.util.BufferUtil; import com.sun.opengl.impl.Debug; +import com.sun.opengl.impl.InternalBufferUtil; import java.nio.*; import java.io.*; @@ -89,7 +89,7 @@ public class BuildMipmap { Mipmap.retrieveStoreModes( gl, psm ); try { - newImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.image_size( width, 1, format, + newImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.image_size( width, 1, format, GL2.GL_UNSIGNED_SHORT ) )).asShortBuffer(); } catch( OutOfMemoryError ome ) { return( GLU.GLU_OUT_OF_MEMORY ); @@ -117,7 +117,7 @@ public class BuildMipmap { if( otherImage == null ) { memReq = Mipmap.image_size( newwidth, 1, format, GL2.GL_UNSIGNED_SHORT ); try { - otherImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )).asShortBuffer(); + otherImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )).asShortBuffer(); } catch( OutOfMemoryError ome ) { gl.glPixelStorei( GL2.GL_UNPACK_ALIGNMENT, psm.getUnpackAlignment() ); gl.glPixelStorei( GL2.GL_UNPACK_SKIP_ROWS, psm.getUnpackSkipRows() ); @@ -178,7 +178,7 @@ public class BuildMipmap { } try { - newImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.image_size( width, height, + newImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.image_size( width, height, format, GL2.GL_UNSIGNED_SHORT ) )).asShortBuffer(); } catch( OutOfMemoryError ome ) { return( GLU.GLU_OUT_OF_MEMORY ); @@ -206,7 +206,7 @@ public class BuildMipmap { if( otherImage == null ) { memReq = Mipmap.image_size( newwidth[0], newheight[0], format, GL2.GL_UNSIGNED_SHORT ); try { - otherImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )).asShortBuffer(); + otherImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )).asShortBuffer(); } catch( OutOfMemoryError ome ) { gl.glPixelStorei( GL2.GL_UNPACK_ALIGNMENT, psm.getUnpackAlignment() ); gl.glPixelStorei( GL2.GL_UNPACK_SKIP_ROWS, psm.getUnpackSkipRows() ); @@ -364,7 +364,7 @@ public class BuildMipmap { case( GL2.GL_UNSIGNED_INT_8_8_8_8_REV ): case( GL2.GL_UNSIGNED_INT_10_10_10_2 ): case( GL2.GL_UNSIGNED_INT_2_10_10_10_REV ): - dstImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); + dstImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); break; default: return( GLU.GLU_INVALID_ENUM ); @@ -481,7 +481,7 @@ public class BuildMipmap { case( GL2.GL_UNSIGNED_INT_8_8_8_8_REV ): case( GL2.GL_UNSIGNED_INT_10_10_10_2 ): case( GL2.GL_UNSIGNED_INT_2_10_10_10_REV ): - dstImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); + dstImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); break; default: return( GLU.GLU_INVALID_ENUM ); @@ -519,7 +519,7 @@ public class BuildMipmap { case( GL2.GL_UNSIGNED_INT_8_8_8_8_REV ): case( GL2.GL_UNSIGNED_INT_10_10_10_2 ): case( GL2.GL_UNSIGNED_INT_2_10_10_10_REV ): - dstImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); + dstImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); break; default: return( GLU.GLU_INVALID_ENUM ); @@ -653,7 +653,7 @@ public class BuildMipmap { case( GL2.GL_UNSIGNED_INT_8_8_8_8_REV ): case( GL2.GL_UNSIGNED_INT_10_10_10_2 ): case( GL2.GL_UNSIGNED_INT_2_10_10_10_REV ): - dstImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); + dstImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); break; default: return( GLU.GLU_INVALID_ENUM ); @@ -880,7 +880,7 @@ public class BuildMipmap { int i, j; try { - newImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.image_size( + newImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.image_size( width, height, format, GL2.GL_UNSIGNED_BYTE ) )); } catch( OutOfMemoryError err ) { return( GLU.GLU_OUT_OF_MEMORY ); @@ -924,7 +924,7 @@ public class BuildMipmap { if( otherImage == null ) { memReq = Mipmap.image_size( newwidth[0], newheight[0], format, GL2.GL_UNSIGNED_BYTE ); try { - otherImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); + otherImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); } catch( OutOfMemoryError err ) { gl.glPixelStorei( GL2.GL_UNPACK_ALIGNMENT, psm.getUnpackAlignment() ); gl.glPixelStorei( GL2.GL_UNPACK_SKIP_ROWS, psm.getUnpackSkipRows() ); @@ -1102,7 +1102,7 @@ public class BuildMipmap { case( GL2.GL_UNSIGNED_INT_8_8_8_8_REV ): case( GL2.GL_UNSIGNED_INT_10_10_10_2 ): case( GL2.GL_UNSIGNED_INT_2_10_10_10_REV ): - dstImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); + dstImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); break; default: return( GLU.GLU_INVALID_ENUM ); @@ -1288,7 +1288,7 @@ public class BuildMipmap { case( GL2.GL_UNSIGNED_INT_8_8_8_8_REV ): case( GL2.GL_UNSIGNED_INT_10_10_10_2 ): case( GL2.GL_UNSIGNED_INT_2_10_10_10_REV ): - dstImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); + dstImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); break; default: return( GLU.GLU_INVALID_ENUM ); @@ -1329,7 +1329,7 @@ public class BuildMipmap { case( GL2.GL_UNSIGNED_INT_8_8_8_8_REV ): case( GL2.GL_UNSIGNED_INT_10_10_10_2 ): case( GL2.GL_UNSIGNED_INT_2_10_10_10_REV ): - dstImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); + dstImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); break; default: return( GLU.GLU_INVALID_ENUM ); @@ -1391,7 +1391,7 @@ public class BuildMipmap { case( GL2.GL_UNSIGNED_INT_8_8_8_8_REV ): case( GL2.GL_UNSIGNED_INT_10_10_10_2 ): case( GL2.GL_UNSIGNED_INT_2_10_10_10_REV ): - dstImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); + dstImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( memReq )); break; default: return( GLU.GLU_INVALID_ENUM ); diff --git a/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/Mipmap.java b/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/Mipmap.java index b048bf1f5..aa33550ca 100644 --- a/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/Mipmap.java +++ b/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/Mipmap.java @@ -47,9 +47,9 @@ package com.sun.opengl.impl.glu.mipmap; import javax.media.opengl.GL; import javax.media.opengl.GL2; import javax.media.opengl.glu.GLU; -import javax.media.opengl.util.BufferUtil; import javax.media.opengl.GLException; import java.nio.*; +import com.sun.opengl.impl.InternalBufferUtil; /** * @@ -574,8 +574,8 @@ public class Mipmap { if( !isLegalFormatForPackedPixelType( format, typeout ) ) { return( GLU.GLU_INVALID_OPERATION ); } - beforeimage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( image_size( widthin, heightin, format, GL2.GL_UNSIGNED_SHORT ) )); - afterimage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( image_size( widthout, heightout, format, GL2.GL_UNSIGNED_SHORT ) )); + beforeimage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( image_size( widthin, heightin, format, GL2.GL_UNSIGNED_SHORT ) )); + afterimage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( image_size( widthout, heightout, format, GL2.GL_UNSIGNED_SHORT ) )); if( beforeimage == null || afterimage == null ) { return( GLU.GLU_OUT_OF_MEMORY ); } diff --git a/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/ScaleInternal.java b/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/ScaleInternal.java index 70ddab880..f51c72ea6 100644 --- a/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/ScaleInternal.java +++ b/src/jogl/classes/com/sun/opengl/impl/glu/mipmap/ScaleInternal.java @@ -47,8 +47,8 @@ package com.sun.opengl.impl.glu.mipmap; import javax.media.opengl.GL; import javax.media.opengl.GL2; import javax.media.opengl.glu.GLU; -import javax.media.opengl.util.BufferUtil; import java.nio.*; +import com.sun.opengl.impl.InternalBufferUtil; /** * @@ -2425,9 +2425,9 @@ public class ScaleInternal { } try { - beforeImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.imageSize3D( widthIn, + beforeImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.imageSize3D( widthIn, heightIn, depthIn, format, GL2.GL_UNSIGNED_SHORT ) )).asShortBuffer(); - afterImage = BufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.imageSize3D( widthIn, + afterImage = InternalBufferUtil.nativeOrder(ByteBuffer.allocateDirect( Mipmap.imageSize3D( widthIn, heightIn, depthIn, format, GL2.GL_UNSIGNED_SHORT ) )).asShortBuffer(); } catch( OutOfMemoryError err ) { return( GLU.GLU_OUT_OF_MEMORY ); |