diff options
author | Sven Gothel <[email protected]> | 2008-07-18 12:24:17 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-07-18 12:24:17 +0000 |
commit | e1c716511d4c36b3a6ae82eceeb74147a3001dfe (patch) | |
tree | 4357912fc5ee44428476ada1d16d5f265363a1b2 | |
parent | db5aca42f5678f4f44750e8297464ca7bbbbc944 (diff) |
- Using new config feature: 'IgnoreExtendedInterfaceSymbols <java class source file>'
and get rid of manual 'Ignore' configs for common stuff in the base interfaces.
- Add: GLUnsupportedException:
- Using new config feature 'UnsupportedExceptionType GLUnsupportedException'
- GLUnsupportedException is used for anything 'UnsupportedOperationException'
- GLU:
- GLU itself is no more abstract
- GLU contains the tesselator implementation
- name, return type, modifiers and arguments
- createGLU(..)
- operated by profile name now.
- GLU itself will be used for GLES2
- Cleanup:
- gluegen/GL configs ..
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1725 232f8b59-042b-4e1e-8c03-345bb8c30851
44 files changed, 1254 insertions, 1965 deletions
diff --git a/make/build.xml b/make/build.xml index 78c9894c2..3fe86b8c0 100644 --- a/make/build.xml +++ b/make/build.xml @@ -169,7 +169,7 @@ value="javax/media/opengl/TraceGLES2.*, javax/media/opengl/DebugGLES2.*"/> <property name="java.part.awt" - value="javax/media/opengl/awt/**, javax/media/opengl/util/awt/**, com/sun/opengl/impl/awt/**, com/sun/opengl/impl/egl/awt/*"/> + value="javax/media/opengl/awt/**, javax/media/opengl/util/awt/**, com/sun/opengl/impl/awt/**, com/sun/opengl/impl/egl/awt/*, com/sun/opengl/impl/packrect/*"/> <property name="java.part.util" value="com/sun/opengl/util/io/**, com/sun/opengl/util/texture/**"/> diff --git a/make/cgl-macosx.cfg b/make/cgl-macosx.cfg index 96387826a..6270d06b7 100644 --- a/make/cgl-macosx.cfg +++ b/make/cgl-macosx.cfg @@ -22,3 +22,19 @@ CustomCCode #include "macosx-window-system.h" # Implement the first argument to getProcAddress as String instead # of byte[] ArgumentIsString getProcAddress 0 + +DropUniqVendorExtensions AMD +# We need GL_APPLE_float_pixels for our pbuffer implementation +# DropUniqVendorExtensions APPLE +DropUniqVendorExtensions ATI +DropUniqVendorExtensions HP +DropUniqVendorExtensions IBM +DropUniqVendorExtensions MESA +DropUniqVendorExtensions MESAX +DropUniqVendorExtensions NV +DropUniqVendorExtensions SGI +DropUniqVendorExtensions SGIS +DropUniqVendorExtensions SGIX +DropUniqVendorExtensions SUN +DropUniqVendorExtensions WIN + diff --git a/make/egl.cfg b/make/egl.cfg index 7e9f3db4f..5e2e108fe 100755 --- a/make/egl.cfg +++ b/make/egl.cfg @@ -10,6 +10,7 @@ Style allstatic HierarchicalNativeOutput false Include gl-common.cfg +Include gl-common-extensions.cfg # There are a few routines we don't handle yet Ignore glGetBufferPointerv diff --git a/make/gl-common-extensions.cfg b/make/gl-common-extensions.cfg index 21ed7ad2c..2adf4cc42 100644 --- a/make/gl-common-extensions.cfg +++ b/make/gl-common-extensions.cfg @@ -1,6 +1,50 @@ -# There are a few routines we don't handle yet -Ignore glGetBufferPointerivNV -Ignore glGetBufferPointerv + +DropUniqVendorExtensions AMD +# We need GL_APPLE_float_pixels for our pbuffer implementation +# DropUniqVendorExtensions APPLE +DropUniqVendorExtensions ATI +DropUniqVendorExtensions HP +DropUniqVendorExtensions IBM +DropUniqVendorExtensions MESA +DropUniqVendorExtensions MESAX +DropUniqVendorExtensions NV +DropUniqVendorExtensions SGI +DropUniqVendorExtensions SGIS +DropUniqVendorExtensions SGIX +DropUniqVendorExtensions SUN +DropUniqVendorExtensions WIN + + +# Enums handled by base GL class +Ignore GL_FRAMEBUFFER_EXT +Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT +Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT +Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT +Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT +Ignore GL_FRAMEBUFFER_COMPLETE_EXT +Ignore GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT +Ignore GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT +Ignore GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT +Ignore GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT +Ignore GL_FRAMEBUFFER_UNSUPPORTED_EXT +Ignore GL_FRAMEBUFFER_BINDING_EXT +Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT +Ignore GL_INVALID_FRAMEBUFFER_OPERATION_EXT +Ignore GL_COLOR_ATTACHMENT0_EXT +Ignore GL_DEPTH_ATTACHMENT_EXT +Ignore GL_STENCIL_ATTACHMENT_EXT +Ignore GL_RENDERBUFFER_EXT +Ignore GL_RENDERBUFFER_ALPHA_SIZE_EXT +Ignore GL_RENDERBUFFER_BINDING_EXT +Ignore GL_RENDERBUFFER_BLUE_SIZE_EXT +Ignore GL_RENDERBUFFER_DEPTH_SIZE_EXT +Ignore GL_RENDERBUFFER_GREEN_SIZE_EXT +Ignore GL_RENDERBUFFER_HEIGHT_EXT +Ignore GL_RENDERBUFFER_INTERNAL_FORMAT_EXT +Ignore GL_RENDERBUFFER_RED_SIZE_EXT +Ignore GL_RENDERBUFFER_STENCIL_SIZE_EXT +Ignore GL_RENDERBUFFER_WIDTH_EXT +Ignore GL_MAX_RENDERBUFFER_SIZE_EXT # normalise extensions RenameJavaMethod glBindFramebufferEXT glBindFramebuffer diff --git a/make/gl-common.cfg b/make/gl-common.cfg index 6a190d688..b400b7a49 100644 --- a/make/gl-common.cfg +++ b/make/gl-common.cfg @@ -1,13 +1,9 @@ # This .cfg file provides common options used among all glue code # generated for Jogl on all platforms. -Include gl-common-extensions.cfg - -# There are a few routines we don't handle yet -Ignore glGetBufferPointerivNV -Ignore glGetBufferPointerv # Raise GLException instead of RuntimeException in glue code RuntimeExceptionType GLException +UnsupportedExceptionType GLUnsupportedException # Imports needed by all glue code Import java.nio.* @@ -23,6 +19,34 @@ Import com.sun.opengl.impl.* # because we don't need them java-side. Ignore GL_VERSION_.+ +# There are a few routines we don't handle yet +Ignore glGetBufferPointerivNV +Ignore glGetBufferPointerv + +# Ignore GL functions that deal with explicit pointer values in such a +# way that we cannot implement the functionality in Java +Ignore glGetBufferPointerv +Ignore glGetPointerv +Ignore glGetPointervEXT +Ignore glGetTexParameterPointervAPPLE +Ignore glGetVertexAttribPointerv +Ignore glGetVertexAttribPointervNV +Ignore glTracePointerRangeMESA + +# Manually implement glMapBuffer as the size of the returned buffer +# can only be computed by calling another routine +ManuallyImplement glMapBuffer +ManuallyImplement glMapBufferOES + +# Ignore the ATI_map_object_buffer extension for now unless someone +# claims they need it, as it will undoubtedly require a similar +# construct to glMapBuffer +Ignore glMapObjectBufferATI +Ignore glUnmapObjectBufferATI + +# Ignore some GL functions that have outgoing void** parameters; we cannot yet deal with them +Ignore glGetVariantPointervEXT + # Don't output #defines of GL name strings as constants, because we # don't need them java-side. # Format of name strings is found at: @@ -52,30 +76,6 @@ Ignore (GL|GLU|GLX|WGL|AGL|CGL)_I3D_.+ Ignore (GL|GLU|GLX|WGL|AGL|CGL)_S3_.+ Ignore GL_KTX_buffer_region -# Ignore GL functions that deal with explicit pointer values in such a -# way that we cannot implement the functionality in Java -Ignore glGetBufferPointerv -Ignore glGetPointerv -Ignore glGetPointervEXT -Ignore glGetTexParameterPointervAPPLE -Ignore glGetVertexAttribPointerv -Ignore glGetVertexAttribPointervNV -Ignore glTracePointerRangeMESA - -# Manually implement glMapBuffer as the size of the returned buffer -# can only be computed by calling another routine -ManuallyImplement glMapBuffer -ManuallyImplement glMapBufferOES - -# Ignore the ATI_map_object_buffer extension for now unless someone -# claims they need it, as it will undoubtedly require a similar -# construct to glMapBuffer -Ignore glMapObjectBufferATI -Ignore glUnmapObjectBufferATI - -# Ignore some GL functions that have outgoing void** parameters; we cannot yet deal with them -Ignore glGetVariantPointervEXT - # FIXME: these extensions require either a handle to a device context # or take void** parameters or both. Until we think through the # semantics of each of these individually we need to disable them. diff --git a/make/gl-es1.cfg b/make/gl-es1.cfg index db32adba6..db236180c 100755 --- a/make/gl-es1.cfg +++ b/make/gl-es1.cfg @@ -2,6 +2,9 @@ JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl/es1 +IgnoreExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL.java +IgnoreExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL2ES1.java + # There are a few routines we don't handle yet Ignore glGetBufferPointervOES Package javax.media.opengl @@ -15,8 +18,7 @@ Implements GLES1Impl GL Implements GLES1Impl GL2ES1 HierarchicalNativeOutput false Include gl-common.cfg -Include gl-ignore-gl2_es-enums.cfg -Include gl-ignore-gl2_es1-enums.cfg +Include gl-common-extensions.cfg EmitProcAddressTable true ProcAddressTableClassName GLES1ProcAddressTable diff --git a/make/gl-es2.cfg b/make/gl-es2.cfg index e69a5d348..9c7605ba6 100755 --- a/make/gl-es2.cfg +++ b/make/gl-es2.cfg @@ -2,6 +2,9 @@ JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl/es2 +IgnoreExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL.java +IgnoreExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL2ES2.java + Package javax.media.opengl Style InterfaceAndImpl JavaClass GLES2 @@ -13,8 +16,7 @@ Implements GLES2Impl GL Implements GLES2Impl GL2ES2 HierarchicalNativeOutput false Include gl-common.cfg -Include gl-ignore-gl2_es-enums.cfg -Include gl-ignore-gl2_es2-enums.cfg +Include gl-common-extensions.cfg EmitProcAddressTable true ProcAddressTableClassName GLES2ProcAddressTable @@ -57,6 +59,7 @@ Include intptr.cfg IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-common.java IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-gles2.java +IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-gl2_es2.java IncludeAs CustomCCode gl-impl-CustomCCode.c Import javax.media.opengl.GLES1 diff --git a/make/gl-gl2.cfg b/make/gl-gl2.cfg index 7df686dd5..bb60938f3 100644 --- a/make/gl-gl2.cfg +++ b/make/gl-gl2.cfg @@ -2,6 +2,10 @@ JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl/gl2 +IgnoreExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL.java +IgnoreExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL2ES1.java +IgnoreExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL2ES2.java + Package javax.media.opengl Style InterfaceAndImpl JavaClass GL2 @@ -14,29 +18,13 @@ Implements GL2Impl GL Implements GL2Impl GL2ES1 Implements GL2Impl GL2ES2 Include gl-common-gl2.cfg +Include gl-common-extensions.cfg Include gl-desktop.cfg -Include gl-ignore-gl2_es-enums.cfg -Include gl-ignore-gl2_es1-enums.cfg -Include gl-ignore-gl2_es2-enums.cfg EmitProcAddressTable true ProcAddressTableClassName GL2ProcAddressTable GetProcAddressTableExpr ((GL2ProcAddressTable)_context.getGLProcAddressTable()) -DropUniqVendorExtensions AMD -# We need GL_APPLE_float_pixels for our pbuffer implementation -# DropUniqVendorExtensions APPLE -DropUniqVendorExtensions ATI -DropUniqVendorExtensions HP -DropUniqVendorExtensions IBM -DropUniqVendorExtensions MESA -DropUniqVendorExtensions NV -DropUniqVendorExtensions SGI -DropUniqVendorExtensions SGIS -DropUniqVendorExtensions SGIX -DropUniqVendorExtensions SUN -DropUniqVendorExtensions WIN - Ignore GL_STENCIL_INDEX1_EXT Ignore GL_STENCIL_INDEX4_EXT Ignore GL_STENCIL_INDEX8_EXT @@ -68,8 +56,10 @@ Include intptr.cfg IncludeAs CustomJavaCode GL2Impl gl-impl-CustomJavaCode-common.java IncludeAs CustomJavaCode GL2Impl gl-impl-CustomJavaCode-gl2.java +IncludeAs CustomJavaCode GL2Impl gl-impl-CustomJavaCode-gl2_es2.java IncludeAs CustomCCode gl-impl-CustomCCode.c Import javax.media.opengl.GLES1 Import javax.media.opengl.GLES2 Import javax.media.opengl.GL2 +Import javax.media.opengl.util.BufferUtil diff --git a/make/gl-if-gl.cfg b/make/gl-if-gl.cfg index 91231fde9..14fab64f9 100755 --- a/make/gl-if-gl.cfg +++ b/make/gl-if-gl.cfg @@ -5,6 +5,7 @@ JavaClass GL HierarchicalNativeOutput false Include gl-common.cfg +Include gl-common-extensions.cfg Include gl-ignore-gl2_es12-special.cfg JavaOutputDir ../build/gensrc/classes diff --git a/make/gl-if-gl2_es1.cfg b/make/gl-if-gl2_es1.cfg index 0d3e6a453..4135ffa0c 100755 --- a/make/gl-if-gl2_es1.cfg +++ b/make/gl-if-gl2_es1.cfg @@ -4,9 +4,11 @@ Style InterfaceOnly JavaClass GL2ES1 Extends GL2ES1 GL +IgnoreExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL.java + HierarchicalNativeOutput false Include gl-common.cfg -Include gl-ignore-gl2_es-enums.cfg +Include gl-common-extensions.cfg JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl diff --git a/make/gl-if-gl2_es2.cfg b/make/gl-if-gl2_es2.cfg index c96c3739f..549cfcdc8 100755 --- a/make/gl-if-gl2_es2.cfg +++ b/make/gl-if-gl2_es2.cfg @@ -4,22 +4,22 @@ Style InterfaceOnly JavaClass GL2ES2 Extends GL2ES2 GL +IgnoreExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL.java + HierarchicalNativeOutput false Include gl-common.cfg -Include gl-ignore-gl2_es-enums.cfg +Include gl-common-extensions.cfg JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl # Ignore all ES 2.X only stuff .. # Ignore ^gl.*x(v)?(OES)? -Ignore glShaderBinary -Ignore glReleaseShaderCompiler Ignore glGetShaderPrecisionFormat Ignore glEGL.* -Ignore glFramebufferVertexAttribArrayNV -Ignore glCoverageOperationNV -Ignore glCoverageMaskNV +#Ignore glFramebufferVertexAttribArrayNV +#Ignore glCoverageOperationNV +#Ignore glCoverageMaskNV CustomJavaCode GL2ES2 public void glClearDepth( double depth ); CustomJavaCode GL2ES2 public void glDepthRange(double zNear, double zFar); diff --git a/make/gl-ignore-gl2_es-enums.cfg b/make/gl-ignore-gl2_es-enums.cfg deleted file mode 100644 index 5bb6b1920..000000000 --- a/make/gl-ignore-gl2_es-enums.cfg +++ /dev/null @@ -1,230 +0,0 @@ -Ignore GL_NONE -Ignore GL_RGB565 -Ignore GL_RGB5_A1 -Ignore GL_RGBA4 -Ignore GL_ACTIVE_TEXTURE -Ignore GL_ALIASED_LINE_WIDTH_RANGE -Ignore GL_ALIASED_POINT_SIZE_RANGE -Ignore GL_ALPHA -Ignore GL_ALPHA_BITS -Ignore GL_ALWAYS -Ignore GL_ARRAY_BUFFER -Ignore GL_ARRAY_BUFFER_BINDING -Ignore GL_BACK -Ignore GL_BLEND -Ignore GL_BLUE_BITS -Ignore GL_BUFFER_MAPPED_OES -Ignore GL_BUFFER_MAP_POINTER_OES -Ignore GL_BUFFER_SIZE -Ignore GL_BUFFER_USAGE -Ignore GL_BYTE -Ignore GL_CCW -Ignore GL_CLAMP_TO_EDGE -Ignore GL_COLOR_BUFFER_BIT -Ignore GL_COLOR_CLEAR_VALUE -Ignore GL_COLOR_WRITEMASK -Ignore GL_COMPRESSED_RGBA_S3TC_DXT1_EXT -Ignore GL_COMPRESSED_RGBA_S3TC_DXT3_EXT -Ignore GL_COMPRESSED_RGBA_S3TC_DXT5_EXT -Ignore GL_COMPRESSED_RGB_S3TC_DXT1_EXT -Ignore GL_COMPRESSED_TEXTURE_FORMATS -Ignore GL_CULL_FACE -Ignore GL_CULL_FACE_MODE -Ignore GL_CW -Ignore GL_DECR -Ignore GL_DEPTH_BITS -Ignore GL_DEPTH_BUFFER_BIT -Ignore GL_DEPTH_COMPONENT16 -Ignore GL_DEPTH_CLEAR_VALUE -Ignore GL_DEPTH_FUNC -Ignore GL_DEPTH_RANGE -Ignore GL_DEPTH_TEST -Ignore GL_DEPTH_WRITEMASK -Ignore GL_DITHER -Ignore GL_DONT_CARE -Ignore GL_DST_ALPHA -Ignore GL_DST_COLOR -Ignore GL_DYNAMIC_DRAW -Ignore GL_ELEMENT_ARRAY_BUFFER -Ignore GL_ELEMENT_ARRAY_BUFFER_BINDING -Ignore GL_EQUAL -Ignore GL_EXTENSIONS -Ignore GL_FALSE -Ignore GL_FASTEST -Ignore GL_FLOAT -Ignore GL_FRONT -Ignore GL_FRONT_AND_BACK -Ignore GL_FRONT_FACE -Ignore GL_GENERATE_MIPMAP_HINT -Ignore GL_GEQUAL -Ignore GL_GREATER -Ignore GL_GREEN_BITS -Ignore GL_HALF_FLOAT_OES -Ignore GL_INCR -Ignore GL_INVALID_ENUM -Ignore GL_INVALID_OPERATION -Ignore GL_INVALID_VALUE -Ignore GL_INVERT -Ignore GL_KEEP -Ignore GL_LEQUAL -Ignore GL_LESS -Ignore GL_LINEAR -Ignore GL_LINEAR_MIPMAP_LINEAR -Ignore GL_LINEAR_MIPMAP_NEAREST -Ignore GL_LINE_LOOP -Ignore GL_LINES -Ignore GL_LINE_STRIP -Ignore GL_LINE_WIDTH -Ignore GL_LUMINANCE -Ignore GL_LUMINANCE_ALPHA -Ignore GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT -Ignore GL_MAX_TEXTURE_SIZE -Ignore GL_MAX_VIEWPORT_DIMS -Ignore GL_NEAREST -Ignore GL_NEAREST_MIPMAP_LINEAR -Ignore GL_NEAREST_MIPMAP_NEAREST -Ignore GL_NEVER -Ignore GL_NICEST -Ignore GL_NO_ERROR -Ignore GL_NOTEQUAL -Ignore GL_NUM_COMPRESSED_TEXTURE_FORMATS -Ignore GL_OES_EGL_image -Ignore GL_OES_mapbuffer -Ignore GL_OES_rgb8_rgba8 -Ignore GL_ONE -Ignore GL_ONE_MINUS_DST_ALPHA -Ignore GL_ONE_MINUS_DST_COLOR -Ignore GL_ONE_MINUS_SRC_ALPHA -Ignore GL_ONE_MINUS_SRC_COLOR -Ignore GL_OUT_OF_MEMORY -Ignore GL_PACK_ALIGNMENT -Ignore GL_POINTS -Ignore GL_POLYGON_OFFSET_FACTOR -Ignore GL_POLYGON_OFFSET_FILL -Ignore GL_POLYGON_OFFSET_UNITS -Ignore GL_RED_BITS -Ignore GL_RENDERER -Ignore GL_REPEAT -Ignore GL_REPLACE -Ignore GL_RGB -Ignore GL_RGB8_OES -Ignore GL_RGBA -Ignore GL_RGBA8_OES -Ignore GL_SAMPLE_ALPHA_TO_COVERAGE -Ignore GL_SAMPLE_BUFFERS -Ignore GL_SAMPLE_COVERAGE -Ignore GL_SAMPLE_COVERAGE_INVERT -Ignore GL_SAMPLE_COVERAGE_VALUE -Ignore GL_SAMPLES -Ignore GL_SCISSOR_BOX -Ignore GL_SCISSOR_TEST -Ignore GL_SHORT -Ignore GL_SRC_ALPHA -Ignore GL_SRC_ALPHA_SATURATE -Ignore GL_SRC_COLOR -Ignore GL_STATIC_DRAW -Ignore GL_STENCIL_BITS -Ignore GL_STENCIL_BUFFER_BIT -Ignore GL_STENCIL_CLEAR_VALUE -Ignore GL_STENCIL_FAIL -Ignore GL_STENCIL_FUNC -Ignore GL_STENCIL_PASS_DEPTH_FAIL -Ignore GL_STENCIL_PASS_DEPTH_PASS -Ignore GL_STENCIL_REF -Ignore GL_STENCIL_TEST -Ignore GL_STENCIL_VALUE_MASK -Ignore GL_STENCIL_WRITEMASK -Ignore GL_SUBPIXEL_BITS -Ignore GL_TEXTURE0 -Ignore GL_TEXTURE -Ignore GL_TEXTURE10 -Ignore GL_TEXTURE1 -Ignore GL_TEXTURE11 -Ignore GL_TEXTURE12 -Ignore GL_TEXTURE13 -Ignore GL_TEXTURE14 -Ignore GL_TEXTURE15 -Ignore GL_TEXTURE16 -Ignore GL_TEXTURE17 -Ignore GL_TEXTURE18 -Ignore GL_TEXTURE19 -Ignore GL_TEXTURE20 -Ignore GL_TEXTURE2 -Ignore GL_TEXTURE21 -Ignore GL_TEXTURE22 -Ignore GL_TEXTURE23 -Ignore GL_TEXTURE24 -Ignore GL_TEXTURE25 -Ignore GL_TEXTURE26 -Ignore GL_TEXTURE27 -Ignore GL_TEXTURE28 -Ignore GL_TEXTURE29 -Ignore GL_TEXTURE_2D -Ignore GL_TEXTURE30 -Ignore GL_TEXTURE3 -Ignore GL_TEXTURE31 -Ignore GL_TEXTURE4 -Ignore GL_TEXTURE5 -Ignore GL_TEXTURE6 -Ignore GL_TEXTURE7 -Ignore GL_TEXTURE8 -Ignore GL_TEXTURE9 -Ignore GL_TEXTURE_BINDING_2D -Ignore GL_TEXTURE_MAG_FILTER -Ignore GL_TEXTURE_MAX_ANISOTROPY_EXT -Ignore GL_TEXTURE_MIN_FILTER -Ignore GL_TEXTURE_WRAP_S -Ignore GL_TEXTURE_WRAP_T -Ignore GL_TRIANGLE_FAN -Ignore GL_TRIANGLES -Ignore GL_TRIANGLE_STRIP -Ignore GL_TRUE -Ignore GL_UNPACK_ALIGNMENT -Ignore GL_UNSIGNED_BYTE -Ignore GL_UNSIGNED_SHORT -Ignore GL_UNSIGNED_SHORT_4_4_4_4 -Ignore GL_UNSIGNED_SHORT_5_5_5_1 -Ignore GL_UNSIGNED_SHORT_5_6_5 -Ignore GL_VENDOR -Ignore GL_VERSION -Ignore GL_VIEWPORT -Ignore GL_ZERO -Ignore GL_TEXTURE_CUBE_MAP.* -Ignore GL_TEXTURE_BINDING_CUBE_MAP.* -Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_X.* -Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_X.* -Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Y.* -Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Y.* -Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Z.* -Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.* -Ignore GL_MAX_CUBE_MAP_TEXTURE_SIZE.* -Ignore GL_STENCIL_INDEX8.* -Ignore GL_FRAMEBUFFER.* -Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.* -Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.* -Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE.* -Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL.* -Ignore GL_FRAMEBUFFER_BINDING.* -Ignore GL_FRAMEBUFFER_COMPLETE.* -Ignore GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT.* -Ignore GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS.* -Ignore GL_FRAMEBUFFER_INCOMPLETE_FORMATS.* -Ignore GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT.* -Ignore GL_FRAMEBUFFER_UNSUPPORTED.* -Ignore GL_INVALID_FRAMEBUFFER_OPERATION.* -Ignore GL_COLOR_ATTACHMENT0.* -Ignore GL_DEPTH_ATTACHMENT.* -Ignore GL_STENCIL_ATTACHMENT.* -Ignore GL_RENDERBUFFER.* -Ignore GL_RENDERBUFFER_ALPHA_SIZE.* -Ignore GL_RENDERBUFFER_BINDING.* -Ignore GL_RENDERBUFFER_BLUE_SIZE.* -Ignore GL_RENDERBUFFER_DEPTH_SIZE.* -Ignore GL_RENDERBUFFER_GREEN_SIZE.* -Ignore GL_RENDERBUFFER_HEIGHT.* -Ignore GL_RENDERBUFFER_INTERNAL_FORMAT.* -Ignore GL_RENDERBUFFER_RED_SIZE.* -Ignore GL_RENDERBUFFER_STENCIL_SIZE.* -Ignore GL_RENDERBUFFER_WIDTH.* -Ignore GL_MAX_RENDERBUFFER_SIZE - diff --git a/make/gl-ignore-gl2_es1-enums.cfg b/make/gl-ignore-gl2_es1-enums.cfg deleted file mode 100644 index a248ecb89..000000000 --- a/make/gl-ignore-gl2_es1-enums.cfg +++ /dev/null @@ -1,451 +0,0 @@ -Ignore ^GL_DEPTH_BUFFER_BIT -Ignore ^GL_STENCIL_BUFFER_BIT -Ignore ^GL_COLOR_BUFFER_BIT -Ignore ^GL_FALSE -Ignore ^GL_TRUE -Ignore ^GL_POINTS -Ignore ^GL_LINES -Ignore ^GL_LINE_LOOP -Ignore ^GL_LINE_STRIP -Ignore ^GL_TRIANGLES -Ignore ^GL_TRIANGLE_STRIP -Ignore ^GL_TRIANGLE_FAN -Ignore ^GL_NEVER -Ignore ^GL_LESS -Ignore ^GL_EQUAL -Ignore ^GL_LEQUAL -Ignore ^GL_GREATER -Ignore ^GL_NOTEQUAL -Ignore ^GL_GEQUAL -Ignore ^GL_ALWAYS -Ignore ^GL_ZERO -Ignore ^GL_ONE -Ignore ^GL_SRC_COLOR -Ignore ^GL_ONE_MINUS_SRC_COLOR -Ignore ^GL_SRC_ALPHA -Ignore ^GL_ONE_MINUS_SRC_ALPHA -Ignore ^GL_DST_ALPHA -Ignore ^GL_ONE_MINUS_DST_ALPHA -Ignore ^GL_DST_COLOR -Ignore ^GL_ONE_MINUS_DST_COLOR -Ignore ^GL_SRC_ALPHA_SATURATE -Ignore ^GL_CLIP_PLANE0 -Ignore ^GL_CLIP_PLANE1 -Ignore ^GL_CLIP_PLANE2 -Ignore ^GL_CLIP_PLANE3 -Ignore ^GL_CLIP_PLANE4 -Ignore ^GL_CLIP_PLANE5 -Ignore ^GL_FRONT -Ignore ^GL_BACK -Ignore ^GL_FRONT_AND_BACK -Ignore ^GL_FOG -Ignore ^GL_LIGHTING -Ignore ^GL_TEXTURE_2D -Ignore ^GL_CULL_FACE -Ignore ^GL_ALPHA_TEST -Ignore ^GL_BLEND -Ignore ^GL_COLOR_LOGIC_OP -Ignore ^GL_DITHER -Ignore ^GL_STENCIL_TEST -Ignore ^GL_DEPTH_TEST -Ignore ^GL_POINT_SMOOTH -Ignore ^GL_LINE_SMOOTH -Ignore ^GL_SCISSOR_TEST -Ignore ^GL_COLOR_MATERIAL -Ignore ^GL_NORMALIZE -Ignore ^GL_RESCALE_NORMAL -Ignore ^GL_POLYGON_OFFSET_FILL -Ignore ^GL_VERTEX_ARRAY -Ignore ^GL_NORMAL_ARRAY -Ignore ^GL_COLOR_ARRAY -Ignore ^GL_TEXTURE_COORD_ARRAY -Ignore ^GL_MULTISAMPLE -Ignore ^GL_SAMPLE_ALPHA_TO_COVERAGE -Ignore ^GL_SAMPLE_ALPHA_TO_ONE -Ignore ^GL_SAMPLE_COVERAGE -Ignore ^GL_NO_ERROR -Ignore ^GL_INVALID_ENUM -Ignore ^GL_INVALID_VALUE -Ignore ^GL_INVALID_OPERATION -Ignore ^GL_STACK_OVERFLOW -Ignore ^GL_STACK_UNDERFLOW -Ignore ^GL_OUT_OF_MEMORY -Ignore ^GL_EXP -Ignore ^GL_EXP2 -Ignore ^GL_FOG_DENSITY -Ignore ^GL_FOG_START -Ignore ^GL_FOG_END -Ignore ^GL_FOG_MODE -Ignore ^GL_FOG_COLOR -Ignore ^GL_CW -Ignore ^GL_CCW -Ignore ^GL_CURRENT_COLOR -Ignore ^GL_CURRENT_NORMAL -Ignore ^GL_CURRENT_TEXTURE_COORDS -Ignore ^GL_POINT_SIZE -Ignore ^GL_POINT_SIZE_MIN -Ignore ^GL_POINT_SIZE_MAX -Ignore ^GL_POINT_FADE_THRESHOLD_SIZE -Ignore ^GL_POINT_DISTANCE_ATTENUATION -Ignore ^GL_SMOOTH_POINT_SIZE_RANGE -Ignore ^GL_LINE_WIDTH -Ignore ^GL_SMOOTH_LINE_WIDTH_RANGE -Ignore ^GL_ALIASED_POINT_SIZE_RANGE -Ignore ^GL_ALIASED_LINE_WIDTH_RANGE -Ignore ^GL_CULL_FACE_MODE -Ignore ^GL_FRONT_FACE -Ignore ^GL_SHADE_MODEL -Ignore ^GL_DEPTH_RANGE -Ignore ^GL_DEPTH_WRITEMASK -Ignore ^GL_DEPTH_CLEAR_VALUE -Ignore ^GL_DEPTH_FUNC -Ignore ^GL_STENCIL_CLEAR_VALUE -Ignore ^GL_STENCIL_FUNC -Ignore ^GL_STENCIL_VALUE_MASK -Ignore ^GL_STENCIL_FAIL -Ignore ^GL_STENCIL_PASS_DEPTH_FAIL -Ignore ^GL_STENCIL_PASS_DEPTH_PASS -Ignore ^GL_STENCIL_REF -Ignore ^GL_STENCIL_WRITEMASK -Ignore ^GL_MATRIX_MODE -Ignore ^GL_VIEWPORT -Ignore ^GL_MODELVIEW_STACK_DEPTH -Ignore ^GL_PROJECTION_STACK_DEPTH -Ignore ^GL_TEXTURE_STACK_DEPTH -Ignore ^GL_MODELVIEW_MATRIX -Ignore ^GL_PROJECTION_MATRIX -Ignore ^GL_TEXTURE_MATRIX -Ignore ^GL_ALPHA_TEST_FUNC -Ignore ^GL_ALPHA_TEST_REF -Ignore ^GL_BLEND_DST -Ignore ^GL_BLEND_SRC -Ignore ^GL_LOGIC_OP_MODE -Ignore ^GL_SCISSOR_BOX -Ignore ^GL_COLOR_CLEAR_VALUE -Ignore ^GL_COLOR_WRITEMASK -Ignore ^GL_UNPACK_ALIGNMENT -Ignore ^GL_PACK_ALIGNMENT -Ignore ^GL_MAX_LIGHTS -Ignore ^GL_MAX_CLIP_PLANES -Ignore ^GL_MAX_TEXTURE_SIZE -Ignore ^GL_MAX_MODELVIEW_STACK_DEPTH -Ignore ^GL_MAX_PROJECTION_STACK_DEPTH -Ignore ^GL_MAX_TEXTURE_STACK_DEPTH -Ignore ^GL_MAX_VIEWPORT_DIMS -Ignore ^GL_MAX_TEXTURE_UNITS -Ignore ^GL_SUBPIXEL_BITS -Ignore ^GL_RED_BITS -Ignore ^GL_GREEN_BITS -Ignore ^GL_BLUE_BITS -Ignore ^GL_ALPHA_BITS -Ignore ^GL_DEPTH_BITS -Ignore ^GL_STENCIL_BITS -Ignore ^GL_POLYGON_OFFSET_UNITS -Ignore ^GL_POLYGON_OFFSET_FACTOR -Ignore ^GL_TEXTURE_BINDING_2D -Ignore ^GL_VERTEX_ARRAY_SIZE -Ignore ^GL_VERTEX_ARRAY_TYPE -Ignore ^GL_VERTEX_ARRAY_STRIDE -Ignore ^GL_NORMAL_ARRAY_TYPE -Ignore ^GL_NORMAL_ARRAY_STRIDE -Ignore ^GL_COLOR_ARRAY_SIZE -Ignore ^GL_COLOR_ARRAY_TYPE -Ignore ^GL_COLOR_ARRAY_STRIDE -Ignore ^GL_TEXTURE_COORD_ARRAY_SIZE -Ignore ^GL_TEXTURE_COORD_ARRAY_TYPE -Ignore ^GL_TEXTURE_COORD_ARRAY_STRIDE -Ignore ^GL_VERTEX_ARRAY_POINTER -Ignore ^GL_NORMAL_ARRAY_POINTER -Ignore ^GL_COLOR_ARRAY_POINTER -Ignore ^GL_TEXTURE_COORD_ARRAY_POINTER -Ignore ^GL_SAMPLE_BUFFERS -Ignore ^GL_SAMPLES -Ignore ^GL_SAMPLE_COVERAGE_VALUE -Ignore ^GL_SAMPLE_COVERAGE_INVERT -Ignore ^GL_NUM_COMPRESSED_TEXTURE_FORMATS -Ignore ^GL_COMPRESSED_TEXTURE_FORMATS -Ignore ^GL_DONT_CARE -Ignore ^GL_FASTEST -Ignore ^GL_NICEST -Ignore ^GL_PERSPECTIVE_CORRECTION_HINT -Ignore ^GL_POINT_SMOOTH_HINT -Ignore ^GL_LINE_SMOOTH_HINT -Ignore ^GL_FOG_HINT -Ignore ^GL_GENERATE_MIPMAP_HINT -Ignore ^GL_LIGHT_MODEL_AMBIENT -Ignore ^GL_LIGHT_MODEL_TWO_SIDE -Ignore ^GL_AMBIENT -Ignore ^GL_DIFFUSE -Ignore ^GL_SPECULAR -Ignore ^GL_POSITION -Ignore ^GL_SPOT_DIRECTION -Ignore ^GL_SPOT_EXPONENT -Ignore ^GL_SPOT_CUTOFF -Ignore ^GL_CONSTANT_ATTENUATION -Ignore ^GL_LINEAR_ATTENUATION -Ignore ^GL_QUADRATIC_ATTENUATION -Ignore ^GL_BYTE -Ignore ^GL_UNSIGNED_BYTE -Ignore ^GL_SHORT -Ignore ^GL_UNSIGNED_SHORT -Ignore ^GL_FLOAT -Ignore ^GL_CLEAR -Ignore ^GL_AND -Ignore ^GL_AND_REVERSE -Ignore ^GL_COPY -Ignore ^GL_AND_INVERTED -Ignore ^GL_NOOP -Ignore ^GL_XOR -Ignore ^GL_OR -Ignore ^GL_NOR -Ignore ^GL_EQUIV -Ignore ^GL_INVERT -Ignore ^GL_OR_REVERSE -Ignore ^GL_COPY_INVERTED -Ignore ^GL_OR_INVERTED -Ignore ^GL_NAND -Ignore ^GL_SET -Ignore ^GL_EMISSION -Ignore ^GL_SHININESS -Ignore ^GL_AMBIENT_AND_DIFFUSE -Ignore ^GL_MODELVIEW -Ignore ^GL_PROJECTION -Ignore ^GL_TEXTURE -Ignore ^GL_ALPHA -Ignore ^GL_RGB -Ignore ^GL_RGBA -Ignore ^GL_LUMINANCE -Ignore ^GL_LUMINANCE_ALPHA -Ignore ^GL_UNSIGNED_SHORT_4_4_4_4 -Ignore ^GL_UNSIGNED_SHORT_5_5_5_1 -Ignore ^GL_UNSIGNED_SHORT_5_6_5 -Ignore ^GL_FLAT -Ignore ^GL_SMOOTH -Ignore ^GL_KEEP -Ignore ^GL_REPLACE -Ignore ^GL_INCR -Ignore ^GL_DECR -Ignore ^GL_VENDOR -Ignore ^GL_RENDERER -Ignore ^GL_VERSION -Ignore ^GL_EXTENSIONS -Ignore ^GL_MODULATE -Ignore ^GL_DECAL -Ignore ^GL_ADD -Ignore ^GL_TEXTURE_ENV_MODE -Ignore ^GL_TEXTURE_ENV_COLOR -Ignore ^GL_TEXTURE_ENV -Ignore ^GL_NEAREST -Ignore ^GL_LINEAR -Ignore ^GL_NEAREST_MIPMAP_NEAREST -Ignore ^GL_LINEAR_MIPMAP_NEAREST -Ignore ^GL_NEAREST_MIPMAP_LINEAR -Ignore ^GL_LINEAR_MIPMAP_LINEAR -Ignore ^GL_TEXTURE_MAG_FILTER -Ignore ^GL_TEXTURE_MIN_FILTER -Ignore ^GL_TEXTURE_WRAP_S -Ignore ^GL_TEXTURE_WRAP_T -Ignore ^GL_GENERATE_MIPMAP -Ignore ^GL_TEXTURE0 -Ignore ^GL_TEXTURE1 -Ignore ^GL_TEXTURE2 -Ignore ^GL_TEXTURE3 -Ignore ^GL_TEXTURE4 -Ignore ^GL_TEXTURE5 -Ignore ^GL_TEXTURE6 -Ignore ^GL_TEXTURE7 -Ignore ^GL_TEXTURE8 -Ignore ^GL_TEXTURE9 -Ignore ^GL_TEXTURE10 -Ignore ^GL_TEXTURE11 -Ignore ^GL_TEXTURE12 -Ignore ^GL_TEXTURE13 -Ignore ^GL_TEXTURE14 -Ignore ^GL_TEXTURE15 -Ignore ^GL_TEXTURE16 -Ignore ^GL_TEXTURE17 -Ignore ^GL_TEXTURE18 -Ignore ^GL_TEXTURE19 -Ignore ^GL_TEXTURE20 -Ignore ^GL_TEXTURE21 -Ignore ^GL_TEXTURE22 -Ignore ^GL_TEXTURE23 -Ignore ^GL_TEXTURE24 -Ignore ^GL_TEXTURE25 -Ignore ^GL_TEXTURE26 -Ignore ^GL_TEXTURE27 -Ignore ^GL_TEXTURE28 -Ignore ^GL_TEXTURE29 -Ignore ^GL_TEXTURE30 -Ignore ^GL_TEXTURE31 -Ignore ^GL_ACTIVE_TEXTURE -Ignore ^GL_CLIENT_ACTIVE_TEXTURE -Ignore ^GL_REPEAT -Ignore ^GL_CLAMP_TO_EDGE -Ignore ^GL_LIGHT0 -Ignore ^GL_LIGHT1 -Ignore ^GL_LIGHT2 -Ignore ^GL_LIGHT3 -Ignore ^GL_LIGHT4 -Ignore ^GL_LIGHT5 -Ignore ^GL_LIGHT6 -Ignore ^GL_LIGHT7 -Ignore ^GL_ARRAY_BUFFER -Ignore ^GL_ELEMENT_ARRAY_BUFFER -Ignore ^GL_ARRAY_BUFFER_BINDING -Ignore ^GL_ELEMENT_ARRAY_BUFFER_BINDING -Ignore ^GL_VERTEX_ARRAY_BUFFER_BINDING -Ignore ^GL_NORMAL_ARRAY_BUFFER_BINDING -Ignore ^GL_COLOR_ARRAY_BUFFER_BINDING -Ignore ^GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING -Ignore ^GL_STATIC_DRAW -Ignore ^GL_DYNAMIC_DRAW -Ignore ^GL_BUFFER_SIZE -Ignore ^GL_BUFFER_USAGE -Ignore ^GL_SUBTRACT -Ignore ^GL_COMBINE -Ignore ^GL_COMBINE_RGB -Ignore ^GL_COMBINE_ALPHA -Ignore ^GL_RGB_SCALE -Ignore ^GL_ADD_SIGNED -Ignore ^GL_INTERPOLATE -Ignore ^GL_CONSTANT -Ignore ^GL_PRIMARY_COLOR -Ignore ^GL_PREVIOUS -Ignore ^GL_OPERAND0_RGB -Ignore ^GL_OPERAND1_RGB -Ignore ^GL_OPERAND2_RGB -Ignore ^GL_OPERAND0_ALPHA -Ignore ^GL_OPERAND1_ALPHA -Ignore ^GL_OPERAND2_ALPHA -Ignore ^GL_ALPHA_SCALE -Ignore ^GL_SRC0_RGB -Ignore ^GL_SRC1_RGB -Ignore ^GL_SRC2_RGB -Ignore ^GL_SRC0_ALPHA -Ignore ^GL_SRC1_ALPHA -Ignore ^GL_SRC2_ALPHA -Ignore ^GL_DOT3_RGB -Ignore ^GL_DOT3_RGBA -Ignore ^GL_IMPLEMENTATION_COLOR_READ_TYPE_OES -Ignore ^GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES -Ignore ^GL_PALETTE4_RGB8_OES -Ignore ^GL_PALETTE4_RGBA8_OES -Ignore ^GL_PALETTE4_R5_G6_B5_OES -Ignore ^GL_PALETTE4_RGBA4_OES -Ignore ^GL_PALETTE4_RGB5_A1_OES -Ignore ^GL_PALETTE8_RGB8_OES -Ignore ^GL_PALETTE8_RGBA8_OES -Ignore ^GL_PALETTE8_R5_G6_B5_OES -Ignore ^GL_PALETTE8_RGBA4_OES -Ignore ^GL_PALETTE8_RGB5_A1_OES -Ignore ^GL_POINT_SIZE_ARRAY_OES -Ignore ^GL_POINT_SIZE_ARRAY_TYPE_OES -Ignore ^GL_POINT_SIZE_ARRAY_STRIDE_OES -Ignore ^GL_POINT_SIZE_ARRAY_POINTER_OES -Ignore ^GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES -Ignore ^GL_POINT_SPRITE_OES -Ignore ^GL_COORD_REPLACE_OES -Ignore ^GL_OES_read_format -Ignore ^GL_OES_compressed_paletted_texture -Ignore ^GL_OES_point_size_array -Ignore ^GL_OES_point_sprite -Ignore ^GL_BLEND_EQUATION_RGB_OES -Ignore ^GL_BLEND_EQUATION_ALPHA_OES -Ignore ^GL_BLEND_DST_RGB_OES -Ignore ^GL_BLEND_SRC_RGB_OES -Ignore ^GL_BLEND_DST_ALPHA_OES -Ignore ^GL_BLEND_SRC_ALPHA_OES -Ignore ^GL_BLEND_EQUATION_OES -Ignore ^GL_FUNC_ADD_OES -Ignore ^GL_FUNC_SUBTRACT_OES -Ignore ^GL_FUNC_REVERSE_SUBTRACT_OES -Ignore ^GL_ETC1_RGB8_OES -Ignore ^GL_TEXTURE_CROP_RECT_OES -Ignore ^GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES -Ignore ^GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES -Ignore ^GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES -Ignore ^GL_MAX_VERTEX_UNITS_OES -Ignore ^GL_MAX_PALETTE_MATRICES_OES -Ignore ^GL_MATRIX_PALETTE_OES -Ignore ^GL_MATRIX_INDEX_ARRAY_OES -Ignore ^GL_WEIGHT_ARRAY_OES -Ignore ^GL_CURRENT_PALETTE_MATRIX_OES -Ignore ^GL_MATRIX_INDEX_ARRAY_SIZE_OES -Ignore ^GL_MATRIX_INDEX_ARRAY_TYPE_OES -Ignore ^GL_MATRIX_INDEX_ARRAY_STRIDE_OES -Ignore ^GL_MATRIX_INDEX_ARRAY_POINTER_OES -Ignore ^GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES -Ignore ^GL_WEIGHT_ARRAY_SIZE_OES -Ignore ^GL_WEIGHT_ARRAY_TYPE_OES -Ignore ^GL_WEIGHT_ARRAY_STRIDE_OES -Ignore ^GL_WEIGHT_ARRAY_POINTER_OES -Ignore ^GL_WEIGHT_ARRAY_BUFFER_BINDING_OES -Ignore ^GL_INCR_WRAP_OES -Ignore ^GL_DECR_WRAP_OES -Ignore ^GL_NORMAL_MAP_OES -Ignore ^GL_REFLECTION_MAP_OES -Ignore ^GL_TEXTURE_CUBE_MAP_OES -Ignore ^GL_TEXTURE_BINDING_CUBE_MAP_OES -Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES -Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES -Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES -Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES -Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES -Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES -Ignore ^GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES -Ignore ^GL_TEXTURE_GEN_MODE_OES -Ignore ^GL_TEXTURE_GEN_STR_OES -Ignore ^GL_MIRRORED_REPEAT_OES -Ignore ^GL_DEPTH_COMPONENT24_OES -Ignore ^GL_DEPTH_COMPONENT32_OES -Ignore ^GL_WRITE_ONLY_OES -Ignore ^GL_BUFFER_ACCESS_OES -Ignore ^GL_BUFFER_MAPPED_OES -Ignore ^GL_BUFFER_MAP_POINTER_OES -Ignore ^GL_RGB8_OES -Ignore ^GL_RGBA8_OES -Ignore ^GL_STENCIL_INDEX1_OES -Ignore ^GL_STENCIL_INDEX4_OES -Ignore ^GL_HALF_FLOAT_OES -Ignore ^GL_3DC_X_AMD -Ignore ^GL_3DC_XY_AMD -Ignore ^GL_ATC_RGB_AMD -Ignore ^GL_ATC_RGBA_EXPLICIT_ALPHA_AMD -Ignore ^GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD -Ignore ^GL_TEXTURE_MAX_ANISOTROPY_EXT -Ignore ^GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT -Ignore ^GL_COMPRESSED_RGB_S3TC_DXT1_EXT -Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT1_EXT -Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT3_EXT -Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT5_EXT -Ignore ^GL_OES_blend_equation_separate -Ignore ^GL_OES_blend_func_separate -Ignore ^GL_OES_blend_subtract -Ignore ^GL_OES_byte_coordinates -Ignore ^GL_OES_compressed_ETC1_RGB8_texture -Ignore ^GL_OES_draw_texture -Ignore ^GL_OES_extended_matrix_palette -Ignore ^GL_OES_fixed_point -Ignore ^GL_OES_framebuffer_object -Ignore ^GL_OES_matrix_get -Ignore ^GL_OES_matrix_palette -Ignore ^GL_OES_query_matrix -Ignore ^GL_OES_single_precision -Ignore ^GL_OES_stencil_wrap -Ignore ^GL_OES_texture_cube_map -Ignore ^GL_OES_texture_env_crossbar -Ignore ^GL_OES_texture_mirrored_repeat -Ignore ^GL_OES_EGL_image -Ignore ^GL_OES_depth24 -Ignore ^GL_OES_depth32 -Ignore ^GL_OES_element_index_uint -Ignore ^GL_OES_fbo_render_mipmap -Ignore ^GL_OES_mapbuffer -Ignore ^GL_OES_rgb8_rgba8 -Ignore ^GL_OES_stencil1 -Ignore ^GL_OES_stencil4 -Ignore ^GL_OES_stencil8 -Ignore ^GL_OES_vertex_half_float -Ignore ^GL_AMD_compressed_3DC_texture -Ignore ^GL_AMD_compressed_ATC_texture diff --git a/make/gl-ignore-gl2_es12-special.cfg b/make/gl-ignore-gl2_es12-special.cfg index 199b91756..5c1370977 100644 --- a/make/gl-ignore-gl2_es12-special.cfg +++ b/make/gl-ignore-gl2_es12-special.cfg @@ -102,6 +102,7 @@ Ignore GL_FOG_END Ignore GL_FOG_HINT Ignore GL_FOG_MODE Ignore GL_FOG_START +Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT Ignore GL_FRAGMENT_SHADER Ignore GL_FRAGMENT_SHADER_DERIVATIVE_HINT Ignore GL_FUNC_ADD diff --git a/make/gl-ignore-gl2_es2-enums.cfg b/make/gl-ignore-gl2_es2-enums.cfg deleted file mode 100644 index 01ee6b62b..000000000 --- a/make/gl-ignore-gl2_es2-enums.cfg +++ /dev/null @@ -1,330 +0,0 @@ -Ignore ^GL_ES_VERSION_2_0 -Ignore ^GL_DEPTH_BUFFER_BIT -Ignore ^GL_STENCIL_BUFFER_BIT -Ignore ^GL_COLOR_BUFFER_BIT -Ignore ^GL_FALSE -Ignore ^GL_FIXED -Ignore ^GL_TRUE -Ignore ^GL_POINTS -Ignore ^GL_LINES -Ignore ^GL_LINE_LOOP -Ignore ^GL_LINE_STRIP -Ignore ^GL_TRIANGLES -Ignore ^GL_TRIANGLE_STRIP -Ignore ^GL_TRIANGLE_FAN -Ignore ^GL_ZERO -Ignore ^GL_ONE -Ignore ^GL_SRC_COLOR -Ignore ^GL_ONE_MINUS_SRC_COLOR -Ignore ^GL_SRC_ALPHA -Ignore ^GL_ONE_MINUS_SRC_ALPHA -Ignore ^GL_DST_ALPHA -Ignore ^GL_ONE_MINUS_DST_ALPHA -Ignore ^GL_DST_COLOR -Ignore ^GL_ONE_MINUS_DST_COLOR -Ignore ^GL_SRC_ALPHA_SATURATE -Ignore ^GL_FUNC_ADD -Ignore ^GL_BLEND_EQUATION -Ignore ^GL_BLEND_EQUATION_RGB -Ignore ^GL_BLEND_EQUATION_ALPHA -Ignore ^GL_FUNC_SUBTRACT -Ignore ^GL_FUNC_REVERSE_SUBTRACT -Ignore ^GL_BLEND_DST_RGB -Ignore ^GL_BLEND_SRC_RGB -Ignore ^GL_BLEND_DST_ALPHA -Ignore ^GL_BLEND_SRC_ALPHA -Ignore ^GL_CONSTANT_COLOR -Ignore ^GL_ONE_MINUS_CONSTANT_COLOR -Ignore ^GL_CONSTANT_ALPHA -Ignore ^GL_ONE_MINUS_CONSTANT_ALPHA -Ignore ^GL_BLEND_COLOR -Ignore ^GL_ARRAY_BUFFER -Ignore ^GL_ELEMENT_ARRAY_BUFFER -Ignore ^GL_ARRAY_BUFFER_BINDING -Ignore ^GL_ELEMENT_ARRAY_BUFFER_BINDING -Ignore ^GL_STREAM_DRAW -Ignore ^GL_STATIC_DRAW -Ignore ^GL_DYNAMIC_DRAW -Ignore ^GL_BUFFER_SIZE -Ignore ^GL_BUFFER_USAGE -Ignore ^GL_CURRENT_VERTEX_ATTRIB -Ignore ^GL_FRONT -Ignore ^GL_BACK -Ignore ^GL_FRONT_AND_BACK -Ignore ^GL_TEXTURE_2D -Ignore ^GL_CULL_FACE -Ignore ^GL_BLEND -Ignore ^GL_DITHER -Ignore ^GL_STENCIL_TEST -Ignore ^GL_DEPTH_TEST -Ignore ^GL_SCISSOR_TEST -Ignore ^GL_POLYGON_OFFSET_FILL -Ignore ^GL_SAMPLE_ALPHA_TO_COVERAGE -Ignore ^GL_SAMPLE_COVERAGE -Ignore ^GL_NO_ERROR -Ignore ^GL_INVALID_ENUM -Ignore ^GL_INVALID_VALUE -Ignore ^GL_INVALID_OPERATION -Ignore ^GL_OUT_OF_MEMORY -Ignore ^GL_CW -Ignore ^GL_CCW -Ignore ^GL_LINE_WIDTH -Ignore ^GL_ALIASED_POINT_SIZE_RANGE -Ignore ^GL_ALIASED_LINE_WIDTH_RANGE -Ignore ^GL_CULL_FACE_MODE -Ignore ^GL_FRONT_FACE -Ignore ^GL_DEPTH_RANGE -Ignore ^GL_DEPTH_WRITEMASK -Ignore ^GL_DEPTH_CLEAR_VALUE -Ignore ^GL_DEPTH_FUNC -Ignore ^GL_STENCIL_CLEAR_VALUE -Ignore ^GL_STENCIL_FUNC -Ignore ^GL_STENCIL_FAIL -Ignore ^GL_STENCIL_PASS_DEPTH_FAIL -Ignore ^GL_STENCIL_PASS_DEPTH_PASS -Ignore ^GL_STENCIL_REF -Ignore ^GL_STENCIL_VALUE_MASK -Ignore ^GL_STENCIL_WRITEMASK -Ignore ^GL_STENCIL_BACK_FUNC -Ignore ^GL_STENCIL_BACK_FAIL -Ignore ^GL_STENCIL_BACK_PASS_DEPTH_FAIL -Ignore ^GL_STENCIL_BACK_PASS_DEPTH_PASS -Ignore ^GL_STENCIL_BACK_REF -Ignore ^GL_STENCIL_BACK_VALUE_MASK -Ignore ^GL_STENCIL_BACK_WRITEMASK -Ignore ^GL_VIEWPORT -Ignore ^GL_SCISSOR_BOX -Ignore ^GL_COLOR_CLEAR_VALUE -Ignore ^GL_COLOR_WRITEMASK -Ignore ^GL_UNPACK_ALIGNMENT -Ignore ^GL_PACK_ALIGNMENT -Ignore ^GL_MAX_TEXTURE_SIZE -Ignore ^GL_MAX_VIEWPORT_DIMS -Ignore ^GL_SUBPIXEL_BITS -Ignore ^GL_RED_BITS -Ignore ^GL_GREEN_BITS -Ignore ^GL_BLUE_BITS -Ignore ^GL_ALPHA_BITS -Ignore ^GL_DEPTH_BITS -Ignore ^GL_STENCIL_BITS -Ignore ^GL_POLYGON_OFFSET_UNITS -Ignore ^GL_POLYGON_OFFSET_FACTOR -Ignore ^GL_TEXTURE_BINDING_2D -Ignore ^GL_SAMPLE_BUFFERS -Ignore ^GL_SAMPLES -Ignore ^GL_SAMPLE_COVERAGE_VALUE -Ignore ^GL_SAMPLE_COVERAGE_INVERT -Ignore ^GL_NUM_COMPRESSED_TEXTURE_FORMATS -Ignore ^GL_COMPRESSED_TEXTURE_FORMATS -Ignore ^GL_DONT_CARE -Ignore ^GL_FASTEST -Ignore ^GL_NICEST -Ignore ^GL_GENERATE_MIPMAP_HINT -Ignore ^GL_FRAGMENT_SHADER_DERIVATIVE_HINT -Ignore ^GL_BYTE -Ignore ^GL_UNSIGNED_BYTE -Ignore ^GL_SHORT -Ignore ^GL_UNSIGNED_SHORT -Ignore ^GL_INT -Ignore ^GL_UNSIGNED_INT -Ignore ^GL_FLOAT -Ignore ^GL_DEPTH_COMPONENT -Ignore ^GL_ALPHA -Ignore ^GL_RGB -Ignore ^GL_RGBA -Ignore ^GL_LUMINANCE -Ignore ^GL_LUMINANCE_ALPHA -Ignore ^GL_UNSIGNED_SHORT_4_4_4_4 -Ignore ^GL_UNSIGNED_SHORT_5_5_5_1 -Ignore ^GL_UNSIGNED_SHORT_5_6_5 -Ignore ^GL_FRAGMENT_SHADER -Ignore ^GL_VERTEX_SHADER -Ignore ^GL_MAX_VERTEX_ATTRIBS -Ignore ^GL_MAX_VERTEX_UNIFORM_VECTORS -Ignore ^GL_MAX_VARYING_VECTORS -Ignore ^GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS -Ignore ^GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS -Ignore ^GL_MAX_TEXTURE_IMAGE_UNITS -Ignore ^GL_MAX_FRAGMENT_UNIFORM_VECTORS -Ignore ^GL_SHADER_TYPE -Ignore ^GL_DELETE_STATUS -Ignore ^GL_LINK_STATUS -Ignore ^GL_VALIDATE_STATUS -Ignore ^GL_ATTACHED_SHADERS -Ignore ^GL_ACTIVE_UNIFORMS -Ignore ^GL_ACTIVE_UNIFORM_MAX_LENGTH -Ignore ^GL_ACTIVE_ATTRIBUTES -Ignore ^GL_ACTIVE_ATTRIBUTE_MAX_LENGTH -Ignore ^GL_SHADING_LANGUAGE_VERSION -Ignore ^GL_CURRENT_PROGRAM -Ignore ^GL_NEVER -Ignore ^GL_LESS -Ignore ^GL_EQUAL -Ignore ^GL_LEQUAL -Ignore ^GL_GREATER -Ignore ^GL_NOTEQUAL -Ignore ^GL_GEQUAL -Ignore ^GL_ALWAYS -Ignore ^GL_KEEP -Ignore ^GL_REPLACE -Ignore ^GL_INCR -Ignore ^GL_DECR -Ignore ^GL_INVERT -Ignore ^GL_INCR_WRAP -Ignore ^GL_DECR_WRAP -Ignore ^GL_VENDOR -Ignore ^GL_RENDERER -Ignore ^GL_VERSION -Ignore ^GL_EXTENSIONS -Ignore ^GL_NEAREST -Ignore ^GL_LINEAR -Ignore ^GL_NEAREST_MIPMAP_NEAREST -Ignore ^GL_LINEAR_MIPMAP_NEAREST -Ignore ^GL_NEAREST_MIPMAP_LINEAR -Ignore ^GL_LINEAR_MIPMAP_LINEAR -Ignore ^GL_TEXTURE_MAG_FILTER -Ignore ^GL_TEXTURE_MIN_FILTER -Ignore ^GL_TEXTURE_WRAP_S -Ignore ^GL_TEXTURE_WRAP_T -Ignore ^GL_TEXTURE -Ignore ^GL_TEXTURE_CUBE_MAP -Ignore ^GL_TEXTURE_BINDING_CUBE_MAP -Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_X -Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_X -Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Y -Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Y -Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Z -Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Z -Ignore ^GL_MAX_CUBE_MAP_TEXTURE_SIZE -Ignore ^GL_TEXTURE0 -Ignore ^GL_TEXTURE1 -Ignore ^GL_TEXTURE2 -Ignore ^GL_TEXTURE3 -Ignore ^GL_TEXTURE4 -Ignore ^GL_TEXTURE5 -Ignore ^GL_TEXTURE6 -Ignore ^GL_TEXTURE7 -Ignore ^GL_TEXTURE8 -Ignore ^GL_TEXTURE9 -Ignore ^GL_TEXTURE10 -Ignore ^GL_TEXTURE11 -Ignore ^GL_TEXTURE12 -Ignore ^GL_TEXTURE13 -Ignore ^GL_TEXTURE14 -Ignore ^GL_TEXTURE15 -Ignore ^GL_TEXTURE16 -Ignore ^GL_TEXTURE17 -Ignore ^GL_TEXTURE18 -Ignore ^GL_TEXTURE19 -Ignore ^GL_TEXTURE20 -Ignore ^GL_TEXTURE21 -Ignore ^GL_TEXTURE22 -Ignore ^GL_TEXTURE23 -Ignore ^GL_TEXTURE24 -Ignore ^GL_TEXTURE25 -Ignore ^GL_TEXTURE26 -Ignore ^GL_TEXTURE27 -Ignore ^GL_TEXTURE28 -Ignore ^GL_TEXTURE29 -Ignore ^GL_TEXTURE30 -Ignore ^GL_TEXTURE31 -Ignore ^GL_ACTIVE_TEXTURE -Ignore ^GL_REPEAT -Ignore ^GL_CLAMP_TO_EDGE -Ignore ^GL_MIRRORED_REPEAT -Ignore ^GL_FLOAT_VEC2 -Ignore ^GL_FLOAT_VEC3 -Ignore ^GL_FLOAT_VEC4 -Ignore ^GL_INT_VEC2 -Ignore ^GL_INT_VEC3 -Ignore ^GL_INT_VEC4 -Ignore ^GL_BOOL -Ignore ^GL_BOOL_VEC2 -Ignore ^GL_BOOL_VEC3 -Ignore ^GL_BOOL_VEC4 -Ignore ^GL_FLOAT_MAT2 -Ignore ^GL_FLOAT_MAT3 -Ignore ^GL_FLOAT_MAT4 -Ignore ^GL_SAMPLER_2D -Ignore ^GL_SAMPLER_CUBE -Ignore ^GL_VERTEX_ATTRIB_ARRAY_ENABLED -Ignore ^GL_VERTEX_ATTRIB_ARRAY_SIZE -Ignore ^GL_VERTEX_ATTRIB_ARRAY_STRIDE -Ignore ^GL_VERTEX_ATTRIB_ARRAY_TYPE -Ignore ^GL_VERTEX_ATTRIB_ARRAY_NORMALIZED -Ignore ^GL_VERTEX_ATTRIB_ARRAY_POINTER -Ignore ^GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING -Ignore ^GL_IMPLEMENTATION_COLOR_READ_TYPE -Ignore ^GL_IMPLEMENTATION_COLOR_READ_FORMAT -Ignore ^GL_COMPILE_STATUS -Ignore ^GL_INFO_LOG_LENGTH -Ignore ^GL_SHADER_SOURCE_LENGTH -Ignore ^GL_SHADER_COMPILER -Ignore ^GL_PLATFORM_BINARY -Ignore ^GL_SHADER_BINARY_FORMATS -Ignore ^GL_NUM_SHADER_BINARY_FORMATS -Ignore ^GL_LOW_FLOAT -Ignore ^GL_MEDIUM_FLOAT -Ignore ^GL_HIGH_FLOAT -Ignore ^GL_LOW_INT -Ignore ^GL_MEDIUM_INT -Ignore ^GL_HIGH_INT -Ignore ^GL_STENCIL_INDEX -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE -Ignore ^GL_COLOR_ATTACHMENT0 -Ignore ^GL_DEPTH_ATTACHMENT -Ignore ^GL_STENCIL_ATTACHMENT -Ignore ^GL_NVIDIA_PLATFORM_BINARY_NV -Ignore ^GL_OES_EGL_image -Ignore ^GL_TEXTURE_2D_OES -Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES -Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES -Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES -Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES -Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES -Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES -Ignore ^GL_TEXTURE_RECTANGLE_NV_OES -Ignore ^GL_OES_texture_half_float -Ignore ^GL_HALF_FLOAT_OES -Ignore ^GL_BUFFER_MAPPED_OES -Ignore ^GL_BUFFER_MAP_POINTER_OES -Ignore ^GL_RGB8_OES -Ignore ^GL_RGBA8_OES -Ignore ^GL_OES_mapbuffer -Ignore ^GL_OES_rgb8_rgba8 -Ignore ^GL_R11F_G11F_B10F_EXT -Ignore ^GL_UNSIGNED_INT_10F_11F_11F_REV_EXT -Ignore ^GL_RGBA_SIGNED_COMPONENTS_EXT -Ignore ^GL_TEXTURE_2D_ARRAY_EXT -Ignore ^GL_SAMPLER_2D_ARRAY_EXT -Ignore ^GL_TEXTURE_BINDING_2D_ARRAY_EXT -Ignore ^GL_MAX_ARRAY_TEXTURE_LAYERS_EXT -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT -Ignore ^GL_COMPRESSED_RGB_S3TC_DXT1_EXT -Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT1_EXT -Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT3_EXT -Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT5_EXT -Ignore ^GL_TEXTURE_MAX_ANISOTROPY_EXT -Ignore ^GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT -Ignore ^GL_TEXTURE_MAX_LEVEL_NV -Ignore ^GL_COVERAGE_COMPONENT_NV -Ignore ^GL_COVERAGE_COMPONENT4_NV -Ignore ^GL_COVERAGE_ATTACHMENT_NV -Ignore ^GL_COVERAGE_BUFFER_BIT_NV -Ignore ^GL_COVERAGE_BUFFERS_NV -Ignore ^GL_COVERAGE_SAMPLES_NV -Ignore ^GL_COVERAGE_ALL_FRAGMENTS_NV -Ignore ^GL_COVERAGE_EDGE_FRAGMENTS_NV -Ignore ^GL_COVERAGE_AUTOMATIC_NV -Ignore ^GL_FRAMEBUFFER_ATTACHABLE_NV -Ignore ^GL_VERTEX_ATTRIB_ARRAY_NV -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_SIZE_NV -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_TYPE_NV -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_NORMALIZED_NV -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_OFFSET_NV -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_WIDTH_NV -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_STRIDE_NV -Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_HEIGHT_NV diff --git a/make/gl-impl-CustomJavaCode-gl2.java b/make/gl-impl-CustomJavaCode-gl2.java index cf163ca0d..43faac362 100644 --- a/make/gl-impl-CustomJavaCode-gl2.java +++ b/make/gl-impl-CustomJavaCode-gl2.java @@ -188,7 +188,7 @@ private void checkBufferObject(boolean extension1, if (!avail) { if (!enabled) return; - throw new GLException("Required extensions not available to call this function"); + throw new GLUnsupportedException("Required extensions not available to call this function"); } int buffer = bufferStateTracker.getBoundBufferObject(state, this); if (enabled) { @@ -313,7 +313,7 @@ private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap(); public java.nio.ByteBuffer glMapBuffer(int target, int access) { final long __addr_ = ((GL2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer; if (__addr_ == 0) { - throw new GLException("Method \"glMapBuffer\" not available"); + throw new GLUnsupportedException("Method \"glMapBuffer\" not available"); } int sz = bufferSizeTracker.getBufferSize(bufferStateTracker, target, @@ -337,3 +337,18 @@ public java.nio.ByteBuffer glMapBuffer(int target, int access) { /** Encapsulates function pointer for OpenGL function <br>: <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code> */ native private long dispatch_glMapBuffer(int target, int access, long glProcAddress); + /** Dummy implementation for the ES 2.0 function: <br> <code> void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length); </code> <br> Always throws a GLException! */ + public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) { + throw new GLUnsupportedException("Method \"glShaderBinary\" not available"); + } + + /** Dummy implementation for the ES 2.0 function: <br> <code> void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length); </code> <br> Always throws a GLException! */ + public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) { + throw new GLUnsupportedException("Method \"glShaderBinary\" not available"); + } + + public void glReleaseShaderCompiler() { + // nothing to do + } + + diff --git a/make/gl-impl-CustomJavaCode-gl2_es2.java b/make/gl-impl-CustomJavaCode-gl2_es2.java new file mode 100644 index 000000000..dcc86eb20 --- /dev/null +++ b/make/gl-impl-CustomJavaCode-gl2_es2.java @@ -0,0 +1,74 @@ + + + public void glShaderSource(int shader, java.lang.String[] source) + { + int count = (null!=source)?source.length:0; + if(count<=0) { + throw new GLException("Method \"glShaderSource\" called with invalid length of source: "+count); + } + int[] length = new int[count]; + for(int i=0; i<count; i++) { + length[i]=source[i].length(); + } + glShaderSource(shader, count, source, length, 0); + } + + public void glShaderSource(IntBuffer shaders, java.lang.String[][] sources) + { + int sourceNum = (null!=sources)?sources.length:0; + int shaderNum = (null!=shaders)?shaders.limit():0; + if(shaderNum<=0 || sourceNum<=0 || shaderNum!=sourceNum) { + throw new GLException("Method \"glShaderSource\" called with invalid number of shaders and/or sources: shaders="+ + shaderNum+", sources="+sourceNum); + } + for(int i=0; i<sourceNum; i++) { + glShaderSource(shaders.get(i), sources[i]); + } + } + + public void glShaderBinary(IntBuffer shaders, int binFormat, java.nio.Buffer bin) + { + int shaderNum = shaders.limit(); + if(shaderNum<=0) { + throw new GLException("Method \"glShaderBinary\" called with shaders number <= 0"); + } + if(null==bin) { + throw new GLException("Method \"glShaderBinary\" without binary (null)"); + } + int binLength = bin.limit(); + if(0>=binLength) { + throw new GLException("Method \"glShaderBinary\" without binary (limit == 0)"); + } + try { + glShaderBinary(shaderNum, shaders, binFormat, bin, binLength); + } catch (Exception e) { } + } + + /** + * Wrapper for glShaderBinary and glShaderSource. + * Tries binary first, if not null, then the source code, if not null. + * The binary trial will fail in case no binary interface exist (GL2 profile), + * hence the fallback to the source code. + */ + public void glShaderBinaryOrSource(IntBuffer shaders, + int binFormat, java.nio.Buffer bin, + java.lang.String[][] sources) + { + int shaderNum = shaders.limit(); + if(shaderNum<=0) { + throw new GLException("Method \"glShaderBinaryOrSource\" called with shaders number <= 0"); + } + if(null!=bin) { + try { + glShaderBinary(shaders, binFormat, bin); + return; // done + } catch (Exception e) { } + } + if(null!=sources) { + glShaderSource(shaders, sources); + return; // done + } + throw new GLException("Method \"glShaderBinaryOrSource\" without binary nor source"); + } + + diff --git a/make/gl-impl-CustomJavaCode-gles1.java b/make/gl-impl-CustomJavaCode-gles1.java index 7ec61c634..b29393e17 100755 --- a/make/gl-impl-CustomJavaCode-gles1.java +++ b/make/gl-impl-CustomJavaCode-gles1.java @@ -121,7 +121,7 @@ private void checkBufferObject(boolean avail, if (!avail) { if (!enabled) return; - throw new GLException("Required extensions not available to call this function"); + throw new GLUnsupportedException("Required extensions not available to call this function"); } int buffer = bufferStateTracker.getBoundBufferObject(state, this); if (enabled) { @@ -230,7 +230,7 @@ private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap(); public java.nio.ByteBuffer glMapBuffer(int target, int access) { final long __addr_ = ((GLES1ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer; if (__addr_ == 0) { - throw new GLException("Method \"glMapBuffer\" not available"); + throw new GLUnsupportedException("Method \"glMapBuffer\" not available"); } int sz = bufferSizeTracker.getBufferSize(bufferStateTracker, target, diff --git a/make/gl-impl-CustomJavaCode-gles2.java b/make/gl-impl-CustomJavaCode-gles2.java index e3f63f879..24618485b 100755 --- a/make/gl-impl-CustomJavaCode-gles2.java +++ b/make/gl-impl-CustomJavaCode-gles2.java @@ -131,7 +131,7 @@ private void checkBufferObject(boolean avail, if (!avail) { if (!enabled) return; - throw new GLException("Required extensions not available to call this function"); + throw new GLUnsupportedException("Required extensions not available to call this function"); } int buffer = bufferStateTracker.getBoundBufferObject(state, this); if (enabled) { @@ -240,7 +240,7 @@ private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap(); public java.nio.ByteBuffer glMapBuffer(int target, int access) { final long __addr_ = ((GLES2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer; if (__addr_ == 0) { - throw new GLException("Method \"glMapBuffer\" not available"); + throw new GLUnsupportedException("Method \"glMapBuffer\" not available"); } int sz = bufferSizeTracker.getBufferSize(bufferStateTracker, target, diff --git a/make/glu-CustomJavaCode-gl2.java b/make/glu-CustomJavaCode-gl2.java index d6f18a7db..5aef1a7ac 100644 --- a/make/glu-CustomJavaCode-gl2.java +++ b/make/glu-CustomJavaCode-gl2.java @@ -139,799 +139,6 @@ public final boolean isFunctionAvailable(String gluFunctionName) } //---------------------------------------------------------------------- -// Tessellation routines -// - -/***************************************************************************** - * <b>gluNewTess</b> creates and returns a new tessellation object. This - * object must be referred to when calling tesselation methods. A return - * value of null means that there was not enough memeory to allocate the - * object. - * - * @return A new tessellation object. - * - * @see #gluTessBeginPolygon gluTessBeginPolygon - * @see #gluDeleteTess gluDeleteTess - * @see #gluTessCallback gluTessCallback - ****************************************************************************/ -public final GLUtessellator gluNewTess() { - return GLUtessellatorImpl.gluNewTess(); -} - -/***************************************************************************** - * <b>gluDeleteTess</b> destroys the indicated tessellation object (which was - * created with {@link #gluNewTess gluNewTess}). - * - * @param tessellator - * Specifies the tessellation object to destroy. - * - * @see #gluBeginPolygon gluBeginPolygon - * @see #gluNewTess gluNewTess - * @see #gluTessCallback gluTessCallback - ****************************************************************************/ -public final void gluDeleteTess(GLUtessellator tessellator) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluDeleteTess(); -} - -/***************************************************************************** - * <b>gluTessProperty</b> is used to control properites stored in a - * tessellation object. These properties affect the way that the polygons are - * interpreted and rendered. The legal value for <i>which</i> are as - * follows:<P> - * - * <b>GLU_TESS_WINDING_RULE</b> - * <UL> - * Determines which parts of the polygon are on the "interior". - * <em>value</em> may be set to one of - * <BR><b>GLU_TESS_WINDING_ODD</b>, - * <BR><b>GLU_TESS_WINDING_NONZERO</b>, - * <BR><b>GLU_TESS_WINDING_POSITIVE</b>, or - * <BR><b>GLU_TESS_WINDING_NEGATIVE</b>, or - * <BR><b>GLU_TESS_WINDING_ABS_GEQ_TWO</b>.<P> - * - * To understand how the winding rule works, consider that the input - * contours partition the plane into regions. The winding rule determines - * which of these regions are inside the polygon.<P> - * - * For a single contour C, the winding number of a point x is simply the - * signed number of revolutions we make around x as we travel once around C - * (where CCW is positive). When there are several contours, the individual - * winding numbers are summed. This procedure associates a signed integer - * value with each point x in the plane. Note that the winding number is - * the same for all points in a single region.<P> - * - * The winding rule classifies a region as "inside" if its winding number - * belongs to the chosen category (odd, nonzero, positive, negative, or - * absolute value of at least two). The previous GLU tessellator (prior to - * GLU 1.2) used the "odd" rule. The "nonzero" rule is another common way - * to define the interior. The other three rules are useful for polygon CSG - * operations. - * </UL> - * <BR><b>GLU_TESS_BOUNDARY_ONLY</b> - * <UL> - * Is a boolean value ("value" should be set to GL_TRUE or GL_FALSE). When - * set to GL_TRUE, a set of closed contours separating the polygon interior - * and exterior are returned instead of a tessellation. Exterior contours - * are oriented CCW with respect to the normal; interior contours are - * oriented CW. The <b>GLU_TESS_BEGIN</b> and <b>GLU_TESS_BEGIN_DATA</b> - * callbacks use the type GL_LINE_LOOP for each contour. - * </UL> - * <BR><b>GLU_TESS_TOLERANCE</b> - * <UL> - * Specifies a tolerance for merging features to reduce the size of the - * output. For example, two vertices that are very close to each other - * might be replaced by a single vertex. The tolerance is multiplied by the - * largest coordinate magnitude of any input vertex; this specifies the - * maximum distance that any feature can move as the result of a single - * merge operation. If a single feature takes part in several merge - * operations, the toal distance moved could be larger.<P> - * - * Feature merging is completely optional; the tolerance is only a hint. - * The implementation is free to merge in some cases and not in others, or - * to never merge features at all. The initial tolerance is 0.<P> - * - * The current implementation merges vertices only if they are exactly - * coincident, regardless of the current tolerance. A vertex is spliced - * into an edge only if the implementation is unable to distinguish which - * side of the edge the vertex lies on. Two edges are merged only when both - * endpoints are identical. - * </UL> - * - * @param tessellator - * Specifies the tessellation object created with - * {@link #gluNewTess gluNewTess} - * @param which - * Specifies the property to be set. Valid values are - * <b>GLU_TESS_WINDING_RULE</b>, <b>GLU_TESS_BOUNDARDY_ONLY</b>, - * <b>GLU_TESS_TOLERANCE</b>. - * @param value - * Specifices the value of the indicated property. - * - * @see #gluGetTessProperty gluGetTessProperty - * @see #gluNewTess gluNewTess - ****************************************************************************/ -public final void gluTessProperty(GLUtessellator tessellator, int which, double value) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluTessProperty(which, value); -} - -/***************************************************************************** - * <b>gluGetTessProperty</b> retrieves properties stored in a tessellation - * object. These properties affect the way that tessellation objects are - * interpreted and rendered. See the - * {@link #gluTessProperty gluTessProperty} reference - * page for information about the properties and what they do. - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * @param which - * Specifies the property whose value is to be fetched. Valid values - * are <b>GLU_TESS_WINDING_RULE</b>, <b>GLU_TESS_BOUNDARY_ONLY</b>, - * and <b>GLU_TESS_TOLERANCES</b>. - * @param value - * Specifices an array into which the value of the named property is - * written. - * - * @see #gluNewTess gluNewTess - * @see #gluTessProperty gluTessProperty - ****************************************************************************/ -public final void gluGetTessProperty(GLUtessellator tessellator, int which, double[] value, int value_offset) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluGetTessProperty(which, value, value_offset); -} - -/***************************************************************************** - * <b>gluTessNormal</b> describes a normal for a polygon that the program is - * defining. All input data will be projected onto a plane perpendicular to - * the one of the three coordinate axes before tessellation and all output - * triangles will be oriented CCW with repsect to the normal (CW orientation - * can be obtained by reversing the sign of the supplied normal). For - * example, if you know that all polygons lie in the x-y plane, call - * <b>gluTessNormal</b>(tess, 0.0, 0.0, 0.0) before rendering any polygons.<P> - * - * If the supplied normal is (0.0, 0.0, 0.0)(the initial value), the normal - * is determined as follows. The direction of the normal, up to its sign, is - * found by fitting a plane to the vertices, without regard to how the - * vertices are connected. It is expected that the input data lies - * approximately in the plane; otherwise, projection perpendicular to one of - * the three coordinate axes may substantially change the geometry. The sign - * of the normal is chosen so that the sum of the signed areas of all input - * contours is nonnegative (where a CCW contour has positive area).<P> - * - * The supplied normal persists until it is changed by another call to - * <b>gluTessNormal</b>. - * - * @param tessellator - * Specifies the tessellation object (created by - * {@link #gluNewTess gluNewTess}). - * @param x - * Specifies the first component of the normal. - * @param y - * Specifies the second component of the normal. - * @param z - * Specifies the third component of the normal. - * - * @see #gluTessBeginPolygon gluTessBeginPolygon - * @see #gluTessEndPolygon gluTessEndPolygon - ****************************************************************************/ -public final void gluTessNormal(GLUtessellator tessellator, double x, double y, double z) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluTessNormal(x, y, z); -} - -/***************************************************************************** - * <b>gluTessCallback</b> is used to indicate a callback to be used by a - * tessellation object. If the specified callback is already defined, then it - * is replaced. If <i>aCallback</i> is null, then the existing callback - * becomes undefined.<P> - * - * These callbacks are used by the tessellation object to describe how a - * polygon specified by the user is broken into triangles. Note that there are - * two versions of each callback: one with user-specified polygon data and one - * without. If both versions of a particular callback are specified, then the - * callback with user-specified polygon data will be used. Note that the - * polygonData parameter used by some of the methods is a copy of the - * reference that was specified when - * {@link #gluTessBeginPolygon gluTessBeginPolygon} - * was called. The legal callbacks are as follows:<P> - * - * <b>GLU_TESS_BEGIN</b> - * <UL> - * The begin callback is invoked like {@link javax.media.opengl.GL#glBegin - * glBegin} to indicate the start of a (triangle) primitive. The method - * takes a single argument of type int. If the - * <b>GLU_TESS_BOUNDARY_ONLY</b> property is set to <b>GL_FALSE</b>, then - * the argument is set to either <b>GL_TRIANGLE_FAN</b>, - * <b>GL_TRIANGLE_STRIP</b>, or <b>GL_TRIANGLES</b>. If the - * <b>GLU_TESS_BOUNDARY_ONLY</b> property is set to <b>GL_TRUE</b>, then the - * argument will be set to <b>GL_LINE_LOOP</b>. The method prototype for - * this callback is: - * </UL> - * - * <PRE> - * void begin(int type);</PRE><P> - * - * <b>GLU_TESS_BEGIN_DATA</b> - * <UL> - * The same as the <b>GLU_TESS_BEGIN</b> callback except - * that it takes an additional reference argument. This reference is - * identical to the opaque reference provided when - * {@link #gluTessBeginPolygon gluTessBeginPolygon} - * was called. The method prototype for this callback is: - * </UL> - * - * <PRE> - * void beginData(int type, Object polygonData);</PRE> - * - * <b>GLU_TESS_EDGE_FLAG</b> - * <UL> - * The edge flag callback is similar to - * {@link javax.media.opengl.GL#glEdgeFlag glEdgeFlag}. The method takes - * a single boolean boundaryEdge that indicates which edges lie on the - * polygon boundary. If the boundaryEdge is <b>GL_TRUE</b>, then each vertex - * that follows begins an edge that lies on the polygon boundary, that is, - * an edge that separates an interior region from an exterior one. If the - * boundaryEdge is <b>GL_FALSE</b>, then each vertex that follows begins an - * edge that lies in the polygon interior. The edge flag callback (if - * defined) is invoked before the first vertex callback.<P> - * - * Since triangle fans and triangle strips do not support edge flags, the - * begin callback is not called with <b>GL_TRIANGLE_FAN</b> or - * <b>GL_TRIANGLE_STRIP</b> if a non-null edge flag callback is provided. - * (If the callback is initialized to null, there is no impact on - * performance). Instead, the fans and strips are converted to independent - * triangles. The method prototype for this callback is: - * </UL> - * - * <PRE> - * void edgeFlag(boolean boundaryEdge);</PRE> - * - * <b>GLU_TESS_EDGE_FLAG_DATA</b> - * <UL> - * The same as the <b>GLU_TESS_EDGE_FLAG</b> callback except that it takes - * an additional reference argument. This reference is identical to the - * opaque reference provided when - * {@link #gluTessBeginPolygon gluTessBeginPolygon} - * was called. The method prototype for this callback is: - * </UL> - * - * <PRE> - * void edgeFlagData(boolean boundaryEdge, Object polygonData);</PRE> - * - * <b>GLU_TESS_VERTEX</b> - * <UL> - * The vertex callback is invoked between the begin and end callbacks. It is - * similar to {@link javax.media.opengl.GL#glVertex3f glVertex3f}, and it - * defines the vertices of the triangles created by the tessellation - * process. The method takes a reference as its only argument. This - * reference is identical to the opaque reference provided by the user when - * the vertex was described (see - * {@link #gluTessVertex gluTessVertex}). The method - * prototype for this callback is: - * </UL> - * - * <PRE> - * void vertex(Object vertexData);</PRE> - * - * <b>GLU_TESS_VERTEX_DATA</b> - * <UL> - * The same as the <b>GLU_TESS_VERTEX</b> callback except that it takes an - * additional reference argument. This reference is identical to the opaque - * reference provided when - * {@link #gluTessBeginPolygon gluTessBeginPolygon} - * was called. The method prototype for this callback is: - * </UL> - * - * <PRE> - * void vertexData(Object vertexData, Object polygonData);</PRE> - * - * <b>GLU_TESS_END</b> - * <UL> - * The end callback serves the same purpose as - * {@link javax.media.opengl.GL#glEnd glEnd}. It indicates the end of a - * primitive and it takes no arguments. The method prototype for this - * callback is: - * </UL> - * - * <PRE> - * void end();</PRE> - * - * <b>GLU_TESS_END_DATA</b> - * <UL> - * The same as the <b>GLU_TESS_END</b> callback except that it takes an - * additional reference argument. This reference is identical to the opaque - * reference provided when - * {@link #gluTessBeginPolygon gluTessBeginPolygon} - * was called. The method prototype for this callback is: - * </UL> - * - * <PRE> - * void endData(Object polygonData);</PRE> - * - * <b>GLU_TESS_COMBINE</b> - * <UL> - * The combine callback is called to create a new vertex when the - * tessellation detects an intersection, or wishes to merge features. The - * method takes four arguments: an array of three elements each of type - * double, an array of four references, an array of four elements each of - * type float, and a reference to a reference. The prototype is: - * </UL> - * - * <PRE> - * void combine(double[] coords, Object[] data, - * float[] weight, Object[] outData);</PRE> - * - * <UL> - * The vertex is defined as a linear combination of up to four existing - * vertices, stored in <i>data</i>. The coefficients of the linear - * combination are given by <i>weight</i>; these weights always add up to 1. - * All vertex pointers are valid even when some of the weights are 0. - * <i>coords</i> gives the location of the new vertex.<P> - * - * The user must allocate another vertex, interpolate parameters using - * <i>data</i> and <i>weight</i>, and return the new vertex pointer - * in <i>outData</i>. This handle is supplied during rendering callbacks. - * The user is responsible for freeing the memory some time after - * {@link #gluTessEndPolygon gluTessEndPolygon} is - * called.<P> - * - * For example, if the polygon lies in an arbitrary plane in 3-space, and a - * color is associated with each vertex, the <b>GLU_TESS_COMBINE</b> - * callback might look like this: - * </UL> - * <PRE> - * void myCombine(double[] coords, Object[] data, - * float[] weight, Object[] outData) - * { - * MyVertex newVertex = new MyVertex(); - * - * newVertex.x = coords[0]; - * newVertex.y = coords[1]; - * newVertex.z = coords[2]; - * newVertex.r = weight[0]*data[0].r + - * weight[1]*data[1].r + - * weight[2]*data[2].r + - * weight[3]*data[3].r; - * newVertex.g = weight[0]*data[0].g + - * weight[1]*data[1].g + - * weight[2]*data[2].g + - * weight[3]*data[3].g; - * newVertex.b = weight[0]*data[0].b + - * weight[1]*data[1].b + - * weight[2]*data[2].b + - * weight[3]*data[3].b; - * newVertex.a = weight[0]*data[0].a + - * weight[1]*data[1].a + - * weight[2]*data[2].a + - * weight[3]*data[3].a; - * outData = newVertex; - * }</PRE> - * - * <UL> - * If the tessellation detects an intersection, then the - * <b>GLU_TESS_COMBINE</b> or <b>GLU_TESS_COMBINE_DATA</b> callback (see - * below) must be defined, and it must write a non-null reference into - * <i>outData</i>. Otherwise the <b>GLU_TESS_NEED_COMBINE_CALLBACK</b> error - * occurs, and no output is generated. - * </UL> - * - * <b>GLU_TESS_COMBINE_DATA</b> - * <UL> - * The same as the <b>GLU_TESS_COMBINE</b> callback except that it takes an - * additional reference argument. This reference is identical to the opaque - * reference provided when - * {@link #gluTessBeginPolygon gluTessBeginPolygon} - * was called. The method prototype for this callback is: - * </UL> - * - * <PRE> - * void combineData(double[] coords, Object[] data, - float[] weight, Object[] outData, - Object polygonData);</PRE> - * - * <b>GLU_TESS_ERROR</b> - * <UL> - * The error callback is called when an error is encountered. The one - * argument is of type int; it indicates the specific error that occurred - * and will be set to one of <b>GLU_TESS_MISSING_BEGIN_POLYGON</b>, - * <b>GLU_TESS_MISSING_END_POLYGON</b>, - * <b>GLU_TESS_MISSING_BEGIN_CONTOUR</b>, - * <b>GLU_TESS_MISSING_END_CONTOUR</b>, <b>GLU_TESS_COORD_TOO_LARGE</b>, - * <b>GLU_TESS_NEED_COMBINE_CALLBACK</b> or <b>GLU_OUT_OF_MEMORY</b>. - * Character strings describing these errors can be retrieved with the - * {@link #gluErrorString gluErrorString} call. The - * method prototype for this callback is: - * </UL> - * - * <PRE> - * void error(int errnum);</PRE> - * - * <UL> - * The GLU library will recover from the first four errors by inserting the - * missing call(s). <b>GLU_TESS_COORD_TOO_LARGE</b> indicates that some - * vertex coordinate exceeded the predefined constant - * <b>GLU_TESS_MAX_COORD</b> in absolute value, and that the value has been - * clamped. (Coordinate values must be small enough so that two can be - * multiplied together without overflow.) - * <b>GLU_TESS_NEED_COMBINE_CALLBACK</b> indicates that the tessellation - * detected an intersection between two edges in the input data, and the - * <b>GLU_TESS_COMBINE</b> or <b>GLU_TESS_COMBINE_DATA</b> callback was not - * provided. No output is generated. <b>GLU_OUT_OF_MEMORY</b> indicates that - * there is not enough memory so no output is generated. - * </UL> - * - * <b>GLU_TESS_ERROR_DATA</b> - * <UL> - * The same as the GLU_TESS_ERROR callback except that it takes an - * additional reference argument. This reference is identical to the opaque - * reference provided when - * {@link #gluTessBeginPolygon gluTessBeginPolygon} - * was called. The method prototype for this callback is: - * </UL> - * - * <PRE> - * void errorData(int errnum, Object polygonData);</PRE> - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * @param which - * Specifies the callback being defined. The following values are - * valid: <b>GLU_TESS_BEGIN</b>, <b>GLU_TESS_BEGIN_DATA</b>, - * <b>GLU_TESS_EDGE_FLAG</b>, <b>GLU_TESS_EDGE_FLAG_DATA</b>, - * <b>GLU_TESS_VERTEX</b>, <b>GLU_TESS_VERTEX_DATA</b>, - * <b>GLU_TESS_END</b>, <b>GLU_TESS_END_DATA</b>, - * <b>GLU_TESS_COMBINE</b>, <b>GLU_TESS_COMBINE_DATA</b>, - * <b>GLU_TESS_ERROR</b>, and <b>GLU_TESS_ERROR_DATA</b>. - * @param aCallback - * Specifies the callback object to be called. - * - * @see javax.media.opengl.GL#glBegin glBegin - * @see javax.media.opengl.GL#glEdgeFlag glEdgeFlag - * @see javax.media.opengl.GL#glVertex3f glVertex3f - * @see #gluNewTess gluNewTess - * @see #gluErrorString gluErrorString - * @see #gluTessVertex gluTessVertex - * @see #gluTessBeginPolygon gluTessBeginPolygon - * @see #gluTessBeginContour gluTessBeginContour - * @see #gluTessProperty gluTessProperty - * @see #gluTessNormal gluTessNormal - ****************************************************************************/ -public final void gluTessCallback(GLUtessellator tessellator, int which, GLUtessellatorCallback aCallback) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluTessCallback(which, aCallback); -} - -/***************************************************************************** - * <b>gluTessVertex</b> describes a vertex on a polygon that the program - * defines. Successive <b>gluTessVertex</b> calls describe a closed contour. - * For example, to describe a quadrilateral <b>gluTessVertex</b> should be - * called four times. <b>gluTessVertex</b> can only be called between - * {@link #gluTessBeginContour gluTessBeginContour} and - * {@link #gluTessBeginContour gluTessEndContour}.<P> - * - * <b>data</b> normally references to a structure containing the vertex - * location, as well as other per-vertex attributes such as color and normal. - * This reference is passed back to the user through the - * <b>GLU_TESS_VERTEX</b> or <b>GLU_TESS_VERTEX_DATA</b> callback after - * tessellation (see the {@link #gluTessCallback - * gluTessCallback} reference page). - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * @param coords - * Specifies the coordinates of the vertex. - * @param data - * Specifies an opaque reference passed back to the program with the - * vertex callback (as specified by - * {@link #gluTessCallback gluTessCallback}). - * - * @see #gluTessBeginPolygon gluTessBeginPolygon - * @see #gluNewTess gluNewTess - * @see #gluTessBeginContour gluTessBeginContour - * @see #gluTessCallback gluTessCallback - * @see #gluTessProperty gluTessProperty - * @see #gluTessNormal gluTessNormal - * @see #gluTessEndPolygon gluTessEndPolygon - ****************************************************************************/ -public final void gluTessVertex(GLUtessellator tessellator, double[] coords, int coords_offset, Object data) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluTessVertex(coords, coords_offset, data); -} - -/***************************************************************************** - * <b>gluTessBeginPolygon</b> and - * {@link #gluTessEndPolygon gluTessEndPolygon} delimit - * the definition of a convex, concave or self-intersecting polygon. Within - * each <b>gluTessBeginPolygon</b>/ - * {@link #gluTessEndPolygon gluTessEndPolygon} pair, - * there must be one or more calls to - * {@link #gluTessBeginContour gluTessBeginContour}/ - * {@link #gluTessEndContour gluTessEndContour}. Within - * each contour, there are zero or more calls to - * {@link #gluTessVertex gluTessVertex}. The vertices - * specify a closed contour (the last vertex of each contour is automatically - * linked to the first). See the {@link #gluTessVertex - * gluTessVertex}, {@link #gluTessBeginContour - * gluTessBeginContour}, and {@link #gluTessEndContour - * gluTessEndContour} reference pages for more details.<P> - * - * <b>data</b> is a reference to a user-defined data structure. If the - * appropriate callback(s) are specified (see - * {@link #gluTessCallback gluTessCallback}), then this - * reference is returned to the callback method(s). Thus, it is a convenient - * way to store per-polygon information.<P> - * - * Once {@link #gluTessEndPolygon gluTessEndPolygon} is - * called, the polygon is tessellated, and the resulting triangles are - * described through callbacks. See - * {@link #gluTessCallback gluTessCallback} for - * descriptions of the callback methods. - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * @param data - * Specifies a reference to user polygon data. - * - * @see #gluNewTess gluNewTess - * @see #gluTessBeginContour gluTessBeginContour - * @see #gluTessVertex gluTessVertex - * @see #gluTessCallback gluTessCallback - * @see #gluTessProperty gluTessProperty - * @see #gluTessNormal gluTessNormal - * @see #gluTessEndPolygon gluTessEndPolygon - ****************************************************************************/ -public final void gluTessBeginPolygon(GLUtessellator tessellator, Object data) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluTessBeginPolygon(data); -} - -/***************************************************************************** - * <b>gluTessBeginContour</b> and - * {@link #gluTessEndContour gluTessEndContour} delimit - * the definition of a polygon contour. Within each - * <b>gluTessBeginContour</b>/ - * {@link #gluTessEndContour gluTessEndContour} pair, - * there can be zero or more calls to - * {@link #gluTessVertex gluTessVertex}. The vertices - * specify a closed contour (the last vertex of each contour is automatically - * linked to the first). See the {@link #gluTessVertex - * gluTessVertex} reference page for more details. <b>gluTessBeginContour</b> - * can only be called between - * {@link #gluTessBeginPolygon gluTessBeginPolygon} and - * {@link #gluTessEndPolygon gluTessEndPolygon}. - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * - * @see #gluNewTess gluNewTess - * @see #gluTessBeginPolygon gluTessBeginPolygon - * @see #gluTessVertex gluTessVertex - * @see #gluTessCallback gluTessCallback - * @see #gluTessProperty gluTessProperty - * @see #gluTessNormal gluTessNormal - * @see #gluTessEndPolygon gluTessEndPolygon - ****************************************************************************/ -public final void gluTessBeginContour(GLUtessellator tessellator) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluTessBeginContour(); -} - -/***************************************************************************** - * <b>gluTessEndContour</b> and - * {@link #gluTessBeginContour gluTessBeginContour} - * delimit the definition of a polygon contour. Within each - * {@link #gluTessBeginContour gluTessBeginContour}/ - * <b>gluTessEndContour</b> pair, there can be zero or more calls to - * {@link #gluTessVertex gluTessVertex}. The vertices - * specify a closed contour (the last vertex of each contour is automatically - * linked to the first). See the {@link #gluTessVertex - * gluTessVertex} reference page for more details. - * {@link #gluTessBeginContour gluTessBeginContour} can - * only be called between {@link #gluTessBeginPolygon - * gluTessBeginPolygon} and - * {@link #gluTessEndPolygon gluTessEndPolygon}. - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * - * @see #gluNewTess gluNewTess - * @see #gluTessBeginPolygon gluTessBeginPolygon - * @see #gluTessVertex gluTessVertex - * @see #gluTessCallback gluTessCallback - * @see #gluTessProperty gluTessProperty - * @see #gluTessNormal gluTessNormal - * @see #gluTessEndPolygon gluTessEndPolygon - ****************************************************************************/ -public final void gluTessEndContour(GLUtessellator tessellator) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluTessEndContour(); -} - -/***************************************************************************** - * <b>gluTessEndPolygon</b> and - * {@link #gluTessBeginPolygon gluTessBeginPolygon} - * delimit the definition of a convex, concave or self-intersecting polygon. - * Within each {@link #gluTessBeginPolygon - * gluTessBeginPolygon}/<b>gluTessEndPolygon</b> pair, there must be one or - * more calls to {@link #gluTessBeginContour - * gluTessBeginContour}/{@link #gluTessEndContour - * gluTessEndContour}. Within each contour, there are zero or more calls to - * {@link #gluTessVertex gluTessVertex}. The vertices - * specify a closed contour (the last vertex of each contour is automatically - * linked to the first). See the {@link #gluTessVertex - * gluTessVertex}, {@link #gluTessBeginContour - * gluTessBeginContour} and {@link #gluTessEndContour - * gluTessEndContour} reference pages for more details.<P> - * - * Once <b>gluTessEndPolygon</b> is called, the polygon is tessellated, and - * the resulting triangles are described through callbacks. See - * {@link #gluTessCallback gluTessCallback} for - * descriptions of the callback functions. - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * - * @see #gluNewTess gluNewTess - * @see #gluTessBeginContour gluTessBeginContour - * @see #gluTessVertex gluTessVertex - * @see #gluTessCallback gluTessCallback - * @see #gluTessProperty gluTessProperty - * @see #gluTessNormal gluTessNormal - * @see #gluTessBeginPolygon gluTessBeginPolygon - ****************************************************************************/ -public final void gluTessEndPolygon(GLUtessellator tessellator) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluTessEndPolygon(); -} - -/***************************************************************************** - - * <b>gluBeginPolygon</b> and {@link #gluEndPolygon gluEndPolygon} - * delimit the definition of a nonconvex polygon. To define such a - * polygon, first call <b>gluBeginPolygon</b>. Then define the - * contours of the polygon by calling {@link #gluTessVertex - * gluTessVertex} for each vertex and {@link #gluNextContour - * gluNextContour} to start each new contour. Finally, call {@link - * #gluEndPolygon gluEndPolygon} to signal the end of the - * definition. See the {@link #gluTessVertex gluTessVertex} and {@link - * #gluNextContour gluNextContour} reference pages for more - * details.<P> - - * - * Once {@link #gluEndPolygon gluEndPolygon} is called, - * the polygon is tessellated, and the resulting triangles are described - * through callbacks. See {@link #gluTessCallback - * gluTessCallback} for descriptions of the callback methods. - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * - * @see #gluNewTess gluNewTess - * @see #gluNextContour gluNextContour - * @see #gluTessCallback gluTessCallback - * @see #gluTessVertex gluTessVertex - * @see #gluTessBeginPolygon gluTessBeginPolygon - * @see #gluTessBeginContour gluTessBeginContour - ****************************************************************************/ -public final void gluBeginPolygon(GLUtessellator tessellator) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluBeginPolygon(); -} - -/***************************************************************************** - * <b>gluNextContour</b> is used to describe polygons with multiple - * contours. After you describe the first contour through a series of - * {@link #gluTessVertex gluTessVertex} calls, a - * <b>gluNextContour</b> call indicates that the previous contour is complete - * and that the next contour is about to begin. Perform another series of - * {@link #gluTessVertex gluTessVertex} calls to - * describe the new contour. Repeat this process until all contours have been - * described.<P> - * - * The type parameter defines what type of contour follows. The following - * values are valid. <P> - * - * <b>GLU_EXTERIOR</b> - * <UL> - * An exterior contour defines an exterior boundary of the polygon. - * </UL> - * <b>GLU_INTERIOR</b> - * <UL> - * An interior contour defines an interior boundary of the polygon (such as - * a hole). - * </UL> - * <b>GLU_UNKNOWN</b> - * <UL> - * An unknown contour is analyzed by the library to determine whether it is - * interior or exterior. - * </UL> - * <b>GLU_CCW, GLU_CW</b> - * <UL> - * The first <b>GLU_CCW</b> or <b>GLU_CW</b> contour defined is considered - * to be exterior. All other contours are considered to be exterior if they - * are oriented in the same direction (clockwise or counterclockwise) as the - * first contour, and interior if they are not. If one contour is of type - * <b>GLU_CCW</b> or <b>GLU_CW</b>, then all contours must be of the same - * type (if they are not, then all <b>GLU_CCW</b> and <b>GLU_CW</b> contours - * will be changed to <b>GLU_UNKNOWN</b>). Note that there is no - * real difference between the <b>GLU_CCW</b> and <b>GLU_CW</b> contour - * types. - * </UL><P> - * - * To define the type of the first contour, you can call <b>gluNextContour</b> - * before describing the first contour. If you do not call - * <b>gluNextContour</b> before the first contour, the first contour is marked - * <b>GLU_EXTERIOR</b>.<P> - * - * <UL> - * <b>Note:</b> The <b>gluNextContour</b> function is obsolete and is - * provided for backward compatibility only. The <b>gluNextContour</b> - * function is mapped to {@link #gluTessEndContour - * gluTessEndContour} followed by - * {@link #gluTessBeginContour gluTessBeginContour}. - * </UL> - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * @param type - * The type of the contour being defined. - * - * @see #gluNewTess gluNewTess - * @see #gluTessBeginContour gluTessBeginContour - * @see #gluTessBeginPolygon gluTessBeginPolygon - * @see #gluTessCallback gluTessCallback - * @see #gluTessEndContour gluTessEndContour - * @see #gluTessVertex gluTessVertex - ****************************************************************************/ -public final void gluNextContour(GLUtessellator tessellator, int type) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluNextContour(type); -} - -/***************************************************************************** - * <b>gluEndPolygon</b> and {@link #gluBeginPolygon - * gluBeginPolygon} delimit the definition of a nonconvex polygon. To define - * such a polygon, first call {@link #gluBeginPolygon - * gluBeginPolygon}. Then define the contours of the polygon by calling - * {@link #gluTessVertex gluTessVertex} for each vertex - * and {@link #gluNextContour gluNextContour} to start - * each new contour. Finally, call <b>gluEndPolygon</b> to signal the end of - * the definition. See the {@link #gluTessVertex - * gluTessVertex} and {@link #gluNextContour - * gluNextContour} reference pages for more details.<P> - * - * Once <b>gluEndPolygon</b> is called, the polygon is tessellated, and the - * resulting triangles are described through callbacks. See - * {@link #gluTessCallback gluTessCallback} for - * descriptions of the callback methods. - * - * @param tessellator - * Specifies the tessellation object (created with - * {@link #gluNewTess gluNewTess}). - * - * @see #gluNewTess gluNewTess - * @see #gluNextContour gluNextContour - * @see #gluTessCallback gluTessCallback - * @see #gluTessVertex gluTessVertex - * @see #gluTessBeginPolygon gluTessBeginPolygon - * @see #gluTessBeginContour gluTessBeginContour - ****************************************************************************/ -public final void gluEndPolygon(GLUtessellator tessellator) { - GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; - tess.gluEndPolygon(); -} - -//---------------------------------------------------------------------- // Quadric functionality // diff --git a/make/glu-CustomJavaCode-gles1_if.java b/make/glu-CustomJavaCode-gles1_if.java index ac140edcf..b73fc965f 100755 --- a/make/glu-CustomJavaCode-gles1_if.java +++ b/make/glu-CustomJavaCode-gles1_if.java @@ -77,23 +77,20 @@ public boolean isFunctionAvailable(String gluFunctionName) // public static final GLU createGLU() throws GLException { - GLU glu = null; - GL gl = getCurrentGL(); - if(gl==null) { - throw new GLException("No current GL"); - } - return createGLU(gl); + return createGLU(GLProfile.getProfile()); } -public static final GLU createGLU(GL gl) throws GLException { +public static final GLU createGLU(String profile) throws GLUnsupportedException { GLU glu = null; String clazzName; - if(gl.isGL2()) { + if(GLProfile.GL2.equals(profile)) { clazzName="javax.media.opengl.glu.gl2.GLUgl2"; - } else if(gl.isGLES1()) { + } else if(GLProfile.GLES1.equals(profile)) { clazzName="javax.media.opengl.glu.es1.GLUes1"; + } else if(GLProfile.GLES2.equals(profile)) { + clazzName="javax.media.opengl.glu.GLU"; } else { - throw new GLException("GLU not supported for GL "+gl); + throw new GLUnsupportedException("GLU not supported for GL profile: "+profile); } return (GLU) GLReflection.createInstance(clazzName); } @@ -106,6 +103,799 @@ public static final GL getCurrentGL() throws GLException { return curContext.getGL(); } +//---------------------------------------------------------------------- +// Tessellation routines +// + +/***************************************************************************** + * <b>gluNewTess</b> creates and returns a new tessellation object. This + * object must be referred to when calling tesselation methods. A return + * value of null means that there was not enough memeory to allocate the + * object. + * + * @return A new tessellation object. + * + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluDeleteTess gluDeleteTess + * @see #gluTessCallback gluTessCallback + ****************************************************************************/ +public final GLUtessellator gluNewTess() { + return GLUtessellatorImpl.gluNewTess(); +} + +/***************************************************************************** + * <b>gluDeleteTess</b> destroys the indicated tessellation object (which was + * created with {@link #gluNewTess gluNewTess}). + * + * @param tessellator + * Specifies the tessellation object to destroy. + * + * @see #gluBeginPolygon gluBeginPolygon + * @see #gluNewTess gluNewTess + * @see #gluTessCallback gluTessCallback + ****************************************************************************/ +public final void gluDeleteTess(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluDeleteTess(); +} + +/***************************************************************************** + * <b>gluTessProperty</b> is used to control properites stored in a + * tessellation object. These properties affect the way that the polygons are + * interpreted and rendered. The legal value for <i>which</i> are as + * follows:<P> + * + * <b>GLU_TESS_WINDING_RULE</b> + * <UL> + * Determines which parts of the polygon are on the "interior". + * <em>value</em> may be set to one of + * <BR><b>GLU_TESS_WINDING_ODD</b>, + * <BR><b>GLU_TESS_WINDING_NONZERO</b>, + * <BR><b>GLU_TESS_WINDING_POSITIVE</b>, or + * <BR><b>GLU_TESS_WINDING_NEGATIVE</b>, or + * <BR><b>GLU_TESS_WINDING_ABS_GEQ_TWO</b>.<P> + * + * To understand how the winding rule works, consider that the input + * contours partition the plane into regions. The winding rule determines + * which of these regions are inside the polygon.<P> + * + * For a single contour C, the winding number of a point x is simply the + * signed number of revolutions we make around x as we travel once around C + * (where CCW is positive). When there are several contours, the individual + * winding numbers are summed. This procedure associates a signed integer + * value with each point x in the plane. Note that the winding number is + * the same for all points in a single region.<P> + * + * The winding rule classifies a region as "inside" if its winding number + * belongs to the chosen category (odd, nonzero, positive, negative, or + * absolute value of at least two). The previous GLU tessellator (prior to + * GLU 1.2) used the "odd" rule. The "nonzero" rule is another common way + * to define the interior. The other three rules are useful for polygon CSG + * operations. + * </UL> + * <BR><b>GLU_TESS_BOUNDARY_ONLY</b> + * <UL> + * Is a boolean value ("value" should be set to GL_TRUE or GL_FALSE). When + * set to GL_TRUE, a set of closed contours separating the polygon interior + * and exterior are returned instead of a tessellation. Exterior contours + * are oriented CCW with respect to the normal; interior contours are + * oriented CW. The <b>GLU_TESS_BEGIN</b> and <b>GLU_TESS_BEGIN_DATA</b> + * callbacks use the type GL_LINE_LOOP for each contour. + * </UL> + * <BR><b>GLU_TESS_TOLERANCE</b> + * <UL> + * Specifies a tolerance for merging features to reduce the size of the + * output. For example, two vertices that are very close to each other + * might be replaced by a single vertex. The tolerance is multiplied by the + * largest coordinate magnitude of any input vertex; this specifies the + * maximum distance that any feature can move as the result of a single + * merge operation. If a single feature takes part in several merge + * operations, the toal distance moved could be larger.<P> + * + * Feature merging is completely optional; the tolerance is only a hint. + * The implementation is free to merge in some cases and not in others, or + * to never merge features at all. The initial tolerance is 0.<P> + * + * The current implementation merges vertices only if they are exactly + * coincident, regardless of the current tolerance. A vertex is spliced + * into an edge only if the implementation is unable to distinguish which + * side of the edge the vertex lies on. Two edges are merged only when both + * endpoints are identical. + * </UL> + * + * @param tessellator + * Specifies the tessellation object created with + * {@link #gluNewTess gluNewTess} + * @param which + * Specifies the property to be set. Valid values are + * <b>GLU_TESS_WINDING_RULE</b>, <b>GLU_TESS_BOUNDARDY_ONLY</b>, + * <b>GLU_TESS_TOLERANCE</b>. + * @param value + * Specifices the value of the indicated property. + * + * @see #gluGetTessProperty gluGetTessProperty + * @see #gluNewTess gluNewTess + ****************************************************************************/ +public final void gluTessProperty(GLUtessellator tessellator, int which, double value) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessProperty(which, value); +} + +/***************************************************************************** + * <b>gluGetTessProperty</b> retrieves properties stored in a tessellation + * object. These properties affect the way that tessellation objects are + * interpreted and rendered. See the + * {@link #gluTessProperty gluTessProperty} reference + * page for information about the properties and what they do. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param which + * Specifies the property whose value is to be fetched. Valid values + * are <b>GLU_TESS_WINDING_RULE</b>, <b>GLU_TESS_BOUNDARY_ONLY</b>, + * and <b>GLU_TESS_TOLERANCES</b>. + * @param value + * Specifices an array into which the value of the named property is + * written. + * + * @see #gluNewTess gluNewTess + * @see #gluTessProperty gluTessProperty + ****************************************************************************/ +public final void gluGetTessProperty(GLUtessellator tessellator, int which, double[] value, int value_offset) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluGetTessProperty(which, value, value_offset); +} + +/***************************************************************************** + * <b>gluTessNormal</b> describes a normal for a polygon that the program is + * defining. All input data will be projected onto a plane perpendicular to + * the one of the three coordinate axes before tessellation and all output + * triangles will be oriented CCW with repsect to the normal (CW orientation + * can be obtained by reversing the sign of the supplied normal). For + * example, if you know that all polygons lie in the x-y plane, call + * <b>gluTessNormal</b>(tess, 0.0, 0.0, 0.0) before rendering any polygons.<P> + * + * If the supplied normal is (0.0, 0.0, 0.0)(the initial value), the normal + * is determined as follows. The direction of the normal, up to its sign, is + * found by fitting a plane to the vertices, without regard to how the + * vertices are connected. It is expected that the input data lies + * approximately in the plane; otherwise, projection perpendicular to one of + * the three coordinate axes may substantially change the geometry. The sign + * of the normal is chosen so that the sum of the signed areas of all input + * contours is nonnegative (where a CCW contour has positive area).<P> + * + * The supplied normal persists until it is changed by another call to + * <b>gluTessNormal</b>. + * + * @param tessellator + * Specifies the tessellation object (created by + * {@link #gluNewTess gluNewTess}). + * @param x + * Specifies the first component of the normal. + * @param y + * Specifies the second component of the normal. + * @param z + * Specifies the third component of the normal. + * + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessNormal(GLUtessellator tessellator, double x, double y, double z) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessNormal(x, y, z); +} + +/***************************************************************************** + * <b>gluTessCallback</b> is used to indicate a callback to be used by a + * tessellation object. If the specified callback is already defined, then it + * is replaced. If <i>aCallback</i> is null, then the existing callback + * becomes undefined.<P> + * + * These callbacks are used by the tessellation object to describe how a + * polygon specified by the user is broken into triangles. Note that there are + * two versions of each callback: one with user-specified polygon data and one + * without. If both versions of a particular callback are specified, then the + * callback with user-specified polygon data will be used. Note that the + * polygonData parameter used by some of the methods is a copy of the + * reference that was specified when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The legal callbacks are as follows:<P> + * + * <b>GLU_TESS_BEGIN</b> + * <UL> + * The begin callback is invoked like {@link javax.media.opengl.GL#glBegin + * glBegin} to indicate the start of a (triangle) primitive. The method + * takes a single argument of type int. If the + * <b>GLU_TESS_BOUNDARY_ONLY</b> property is set to <b>GL_FALSE</b>, then + * the argument is set to either <b>GL_TRIANGLE_FAN</b>, + * <b>GL_TRIANGLE_STRIP</b>, or <b>GL_TRIANGLES</b>. If the + * <b>GLU_TESS_BOUNDARY_ONLY</b> property is set to <b>GL_TRUE</b>, then the + * argument will be set to <b>GL_LINE_LOOP</b>. The method prototype for + * this callback is: + * </UL> + * + * <PRE> + * void begin(int type);</PRE><P> + * + * <b>GLU_TESS_BEGIN_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_BEGIN</b> callback except + * that it takes an additional reference argument. This reference is + * identical to the opaque reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void beginData(int type, Object polygonData);</PRE> + * + * <b>GLU_TESS_EDGE_FLAG</b> + * <UL> + * The edge flag callback is similar to + * {@link javax.media.opengl.GL#glEdgeFlag glEdgeFlag}. The method takes + * a single boolean boundaryEdge that indicates which edges lie on the + * polygon boundary. If the boundaryEdge is <b>GL_TRUE</b>, then each vertex + * that follows begins an edge that lies on the polygon boundary, that is, + * an edge that separates an interior region from an exterior one. If the + * boundaryEdge is <b>GL_FALSE</b>, then each vertex that follows begins an + * edge that lies in the polygon interior. The edge flag callback (if + * defined) is invoked before the first vertex callback.<P> + * + * Since triangle fans and triangle strips do not support edge flags, the + * begin callback is not called with <b>GL_TRIANGLE_FAN</b> or + * <b>GL_TRIANGLE_STRIP</b> if a non-null edge flag callback is provided. + * (If the callback is initialized to null, there is no impact on + * performance). Instead, the fans and strips are converted to independent + * triangles. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void edgeFlag(boolean boundaryEdge);</PRE> + * + * <b>GLU_TESS_EDGE_FLAG_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_EDGE_FLAG</b> callback except that it takes + * an additional reference argument. This reference is identical to the + * opaque reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void edgeFlagData(boolean boundaryEdge, Object polygonData);</PRE> + * + * <b>GLU_TESS_VERTEX</b> + * <UL> + * The vertex callback is invoked between the begin and end callbacks. It is + * similar to {@link javax.media.opengl.GL#glVertex3f glVertex3f}, and it + * defines the vertices of the triangles created by the tessellation + * process. The method takes a reference as its only argument. This + * reference is identical to the opaque reference provided by the user when + * the vertex was described (see + * {@link #gluTessVertex gluTessVertex}). The method + * prototype for this callback is: + * </UL> + * + * <PRE> + * void vertex(Object vertexData);</PRE> + * + * <b>GLU_TESS_VERTEX_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_VERTEX</b> callback except that it takes an + * additional reference argument. This reference is identical to the opaque + * reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void vertexData(Object vertexData, Object polygonData);</PRE> + * + * <b>GLU_TESS_END</b> + * <UL> + * The end callback serves the same purpose as + * {@link javax.media.opengl.GL#glEnd glEnd}. It indicates the end of a + * primitive and it takes no arguments. The method prototype for this + * callback is: + * </UL> + * + * <PRE> + * void end();</PRE> + * + * <b>GLU_TESS_END_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_END</b> callback except that it takes an + * additional reference argument. This reference is identical to the opaque + * reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void endData(Object polygonData);</PRE> + * + * <b>GLU_TESS_COMBINE</b> + * <UL> + * The combine callback is called to create a new vertex when the + * tessellation detects an intersection, or wishes to merge features. The + * method takes four arguments: an array of three elements each of type + * double, an array of four references, an array of four elements each of + * type float, and a reference to a reference. The prototype is: + * </UL> + * + * <PRE> + * void combine(double[] coords, Object[] data, + * float[] weight, Object[] outData);</PRE> + * + * <UL> + * The vertex is defined as a linear combination of up to four existing + * vertices, stored in <i>data</i>. The coefficients of the linear + * combination are given by <i>weight</i>; these weights always add up to 1. + * All vertex pointers are valid even when some of the weights are 0. + * <i>coords</i> gives the location of the new vertex.<P> + * + * The user must allocate another vertex, interpolate parameters using + * <i>data</i> and <i>weight</i>, and return the new vertex pointer + * in <i>outData</i>. This handle is supplied during rendering callbacks. + * The user is responsible for freeing the memory some time after + * {@link #gluTessEndPolygon gluTessEndPolygon} is + * called.<P> + * + * For example, if the polygon lies in an arbitrary plane in 3-space, and a + * color is associated with each vertex, the <b>GLU_TESS_COMBINE</b> + * callback might look like this: + * </UL> + * <PRE> + * void myCombine(double[] coords, Object[] data, + * float[] weight, Object[] outData) + * { + * MyVertex newVertex = new MyVertex(); + * + * newVertex.x = coords[0]; + * newVertex.y = coords[1]; + * newVertex.z = coords[2]; + * newVertex.r = weight[0]*data[0].r + + * weight[1]*data[1].r + + * weight[2]*data[2].r + + * weight[3]*data[3].r; + * newVertex.g = weight[0]*data[0].g + + * weight[1]*data[1].g + + * weight[2]*data[2].g + + * weight[3]*data[3].g; + * newVertex.b = weight[0]*data[0].b + + * weight[1]*data[1].b + + * weight[2]*data[2].b + + * weight[3]*data[3].b; + * newVertex.a = weight[0]*data[0].a + + * weight[1]*data[1].a + + * weight[2]*data[2].a + + * weight[3]*data[3].a; + * outData = newVertex; + * }</PRE> + * + * <UL> + * If the tessellation detects an intersection, then the + * <b>GLU_TESS_COMBINE</b> or <b>GLU_TESS_COMBINE_DATA</b> callback (see + * below) must be defined, and it must write a non-null reference into + * <i>outData</i>. Otherwise the <b>GLU_TESS_NEED_COMBINE_CALLBACK</b> error + * occurs, and no output is generated. + * </UL> + * + * <b>GLU_TESS_COMBINE_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_COMBINE</b> callback except that it takes an + * additional reference argument. This reference is identical to the opaque + * reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void combineData(double[] coords, Object[] data, + float[] weight, Object[] outData, + Object polygonData);</PRE> + * + * <b>GLU_TESS_ERROR</b> + * <UL> + * The error callback is called when an error is encountered. The one + * argument is of type int; it indicates the specific error that occurred + * and will be set to one of <b>GLU_TESS_MISSING_BEGIN_POLYGON</b>, + * <b>GLU_TESS_MISSING_END_POLYGON</b>, + * <b>GLU_TESS_MISSING_BEGIN_CONTOUR</b>, + * <b>GLU_TESS_MISSING_END_CONTOUR</b>, <b>GLU_TESS_COORD_TOO_LARGE</b>, + * <b>GLU_TESS_NEED_COMBINE_CALLBACK</b> or <b>GLU_OUT_OF_MEMORY</b>. + * Character strings describing these errors can be retrieved with the + * {@link #gluErrorString gluErrorString} call. The + * method prototype for this callback is: + * </UL> + * + * <PRE> + * void error(int errnum);</PRE> + * + * <UL> + * The GLU library will recover from the first four errors by inserting the + * missing call(s). <b>GLU_TESS_COORD_TOO_LARGE</b> indicates that some + * vertex coordinate exceeded the predefined constant + * <b>GLU_TESS_MAX_COORD</b> in absolute value, and that the value has been + * clamped. (Coordinate values must be small enough so that two can be + * multiplied together without overflow.) + * <b>GLU_TESS_NEED_COMBINE_CALLBACK</b> indicates that the tessellation + * detected an intersection between two edges in the input data, and the + * <b>GLU_TESS_COMBINE</b> or <b>GLU_TESS_COMBINE_DATA</b> callback was not + * provided. No output is generated. <b>GLU_OUT_OF_MEMORY</b> indicates that + * there is not enough memory so no output is generated. + * </UL> + * + * <b>GLU_TESS_ERROR_DATA</b> + * <UL> + * The same as the GLU_TESS_ERROR callback except that it takes an + * additional reference argument. This reference is identical to the opaque + * reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void errorData(int errnum, Object polygonData);</PRE> + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param which + * Specifies the callback being defined. The following values are + * valid: <b>GLU_TESS_BEGIN</b>, <b>GLU_TESS_BEGIN_DATA</b>, + * <b>GLU_TESS_EDGE_FLAG</b>, <b>GLU_TESS_EDGE_FLAG_DATA</b>, + * <b>GLU_TESS_VERTEX</b>, <b>GLU_TESS_VERTEX_DATA</b>, + * <b>GLU_TESS_END</b>, <b>GLU_TESS_END_DATA</b>, + * <b>GLU_TESS_COMBINE</b>, <b>GLU_TESS_COMBINE_DATA</b>, + * <b>GLU_TESS_ERROR</b>, and <b>GLU_TESS_ERROR_DATA</b>. + * @param aCallback + * Specifies the callback object to be called. + * + * @see javax.media.opengl.GL#glBegin glBegin + * @see javax.media.opengl.GL#glEdgeFlag glEdgeFlag + * @see javax.media.opengl.GL#glVertex3f glVertex3f + * @see #gluNewTess gluNewTess + * @see #gluErrorString gluErrorString + * @see #gluTessVertex gluTessVertex + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + ****************************************************************************/ +public final void gluTessCallback(GLUtessellator tessellator, int which, GLUtessellatorCallback aCallback) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessCallback(which, aCallback); +} + +/***************************************************************************** + * <b>gluTessVertex</b> describes a vertex on a polygon that the program + * defines. Successive <b>gluTessVertex</b> calls describe a closed contour. + * For example, to describe a quadrilateral <b>gluTessVertex</b> should be + * called four times. <b>gluTessVertex</b> can only be called between + * {@link #gluTessBeginContour gluTessBeginContour} and + * {@link #gluTessBeginContour gluTessEndContour}.<P> + * + * <b>data</b> normally references to a structure containing the vertex + * location, as well as other per-vertex attributes such as color and normal. + * This reference is passed back to the user through the + * <b>GLU_TESS_VERTEX</b> or <b>GLU_TESS_VERTEX_DATA</b> callback after + * tessellation (see the {@link #gluTessCallback + * gluTessCallback} reference page). + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param coords + * Specifies the coordinates of the vertex. + * @param data + * Specifies an opaque reference passed back to the program with the + * vertex callback (as specified by + * {@link #gluTessCallback gluTessCallback}). + * + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluNewTess gluNewTess + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessVertex(GLUtessellator tessellator, double[] coords, int coords_offset, Object data) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessVertex(coords, coords_offset, data); +} + +/***************************************************************************** + * <b>gluTessBeginPolygon</b> and + * {@link #gluTessEndPolygon gluTessEndPolygon} delimit + * the definition of a convex, concave or self-intersecting polygon. Within + * each <b>gluTessBeginPolygon</b>/ + * {@link #gluTessEndPolygon gluTessEndPolygon} pair, + * there must be one or more calls to + * {@link #gluTessBeginContour gluTessBeginContour}/ + * {@link #gluTessEndContour gluTessEndContour}. Within + * each contour, there are zero or more calls to + * {@link #gluTessVertex gluTessVertex}. The vertices + * specify a closed contour (the last vertex of each contour is automatically + * linked to the first). See the {@link #gluTessVertex + * gluTessVertex}, {@link #gluTessBeginContour + * gluTessBeginContour}, and {@link #gluTessEndContour + * gluTessEndContour} reference pages for more details.<P> + * + * <b>data</b> is a reference to a user-defined data structure. If the + * appropriate callback(s) are specified (see + * {@link #gluTessCallback gluTessCallback}), then this + * reference is returned to the callback method(s). Thus, it is a convenient + * way to store per-polygon information.<P> + * + * Once {@link #gluTessEndPolygon gluTessEndPolygon} is + * called, the polygon is tessellated, and the resulting triangles are + * described through callbacks. See + * {@link #gluTessCallback gluTessCallback} for + * descriptions of the callback methods. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param data + * Specifies a reference to user polygon data. + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessVertex gluTessVertex + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessBeginPolygon(GLUtessellator tessellator, Object data) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessBeginPolygon(data); +} + +/***************************************************************************** + * <b>gluTessBeginContour</b> and + * {@link #gluTessEndContour gluTessEndContour} delimit + * the definition of a polygon contour. Within each + * <b>gluTessBeginContour</b>/ + * {@link #gluTessEndContour gluTessEndContour} pair, + * there can be zero or more calls to + * {@link #gluTessVertex gluTessVertex}. The vertices + * specify a closed contour (the last vertex of each contour is automatically + * linked to the first). See the {@link #gluTessVertex + * gluTessVertex} reference page for more details. <b>gluTessBeginContour</b> + * can only be called between + * {@link #gluTessBeginPolygon gluTessBeginPolygon} and + * {@link #gluTessEndPolygon gluTessEndPolygon}. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessVertex gluTessVertex + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessBeginContour(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessBeginContour(); +} + +/***************************************************************************** + * <b>gluTessEndContour</b> and + * {@link #gluTessBeginContour gluTessBeginContour} + * delimit the definition of a polygon contour. Within each + * {@link #gluTessBeginContour gluTessBeginContour}/ + * <b>gluTessEndContour</b> pair, there can be zero or more calls to + * {@link #gluTessVertex gluTessVertex}. The vertices + * specify a closed contour (the last vertex of each contour is automatically + * linked to the first). See the {@link #gluTessVertex + * gluTessVertex} reference page for more details. + * {@link #gluTessBeginContour gluTessBeginContour} can + * only be called between {@link #gluTessBeginPolygon + * gluTessBeginPolygon} and + * {@link #gluTessEndPolygon gluTessEndPolygon}. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessVertex gluTessVertex + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessEndContour(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessEndContour(); +} + +/***************************************************************************** + * <b>gluTessEndPolygon</b> and + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * delimit the definition of a convex, concave or self-intersecting polygon. + * Within each {@link #gluTessBeginPolygon + * gluTessBeginPolygon}/<b>gluTessEndPolygon</b> pair, there must be one or + * more calls to {@link #gluTessBeginContour + * gluTessBeginContour}/{@link #gluTessEndContour + * gluTessEndContour}. Within each contour, there are zero or more calls to + * {@link #gluTessVertex gluTessVertex}. The vertices + * specify a closed contour (the last vertex of each contour is automatically + * linked to the first). See the {@link #gluTessVertex + * gluTessVertex}, {@link #gluTessBeginContour + * gluTessBeginContour} and {@link #gluTessEndContour + * gluTessEndContour} reference pages for more details.<P> + * + * Once <b>gluTessEndPolygon</b> is called, the polygon is tessellated, and + * the resulting triangles are described through callbacks. See + * {@link #gluTessCallback gluTessCallback} for + * descriptions of the callback functions. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessVertex gluTessVertex + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessBeginPolygon gluTessBeginPolygon + ****************************************************************************/ +public final void gluTessEndPolygon(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessEndPolygon(); +} + +/***************************************************************************** + + * <b>gluBeginPolygon</b> and {@link #gluEndPolygon gluEndPolygon} + * delimit the definition of a nonconvex polygon. To define such a + * polygon, first call <b>gluBeginPolygon</b>. Then define the + * contours of the polygon by calling {@link #gluTessVertex + * gluTessVertex} for each vertex and {@link #gluNextContour + * gluNextContour} to start each new contour. Finally, call {@link + * #gluEndPolygon gluEndPolygon} to signal the end of the + * definition. See the {@link #gluTessVertex gluTessVertex} and {@link + * #gluNextContour gluNextContour} reference pages for more + * details.<P> + + * + * Once {@link #gluEndPolygon gluEndPolygon} is called, + * the polygon is tessellated, and the resulting triangles are described + * through callbacks. See {@link #gluTessCallback + * gluTessCallback} for descriptions of the callback methods. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluNextContour gluNextContour + * @see #gluTessCallback gluTessCallback + * @see #gluTessVertex gluTessVertex + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessBeginContour gluTessBeginContour + ****************************************************************************/ +public final void gluBeginPolygon(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluBeginPolygon(); +} + +/***************************************************************************** + * <b>gluNextContour</b> is used to describe polygons with multiple + * contours. After you describe the first contour through a series of + * {@link #gluTessVertex gluTessVertex} calls, a + * <b>gluNextContour</b> call indicates that the previous contour is complete + * and that the next contour is about to begin. Perform another series of + * {@link #gluTessVertex gluTessVertex} calls to + * describe the new contour. Repeat this process until all contours have been + * described.<P> + * + * The type parameter defines what type of contour follows. The following + * values are valid. <P> + * + * <b>GLU_EXTERIOR</b> + * <UL> + * An exterior contour defines an exterior boundary of the polygon. + * </UL> + * <b>GLU_INTERIOR</b> + * <UL> + * An interior contour defines an interior boundary of the polygon (such as + * a hole). + * </UL> + * <b>GLU_UNKNOWN</b> + * <UL> + * An unknown contour is analyzed by the library to determine whether it is + * interior or exterior. + * </UL> + * <b>GLU_CCW, GLU_CW</b> + * <UL> + * The first <b>GLU_CCW</b> or <b>GLU_CW</b> contour defined is considered + * to be exterior. All other contours are considered to be exterior if they + * are oriented in the same direction (clockwise or counterclockwise) as the + * first contour, and interior if they are not. If one contour is of type + * <b>GLU_CCW</b> or <b>GLU_CW</b>, then all contours must be of the same + * type (if they are not, then all <b>GLU_CCW</b> and <b>GLU_CW</b> contours + * will be changed to <b>GLU_UNKNOWN</b>). Note that there is no + * real difference between the <b>GLU_CCW</b> and <b>GLU_CW</b> contour + * types. + * </UL><P> + * + * To define the type of the first contour, you can call <b>gluNextContour</b> + * before describing the first contour. If you do not call + * <b>gluNextContour</b> before the first contour, the first contour is marked + * <b>GLU_EXTERIOR</b>.<P> + * + * <UL> + * <b>Note:</b> The <b>gluNextContour</b> function is obsolete and is + * provided for backward compatibility only. The <b>gluNextContour</b> + * function is mapped to {@link #gluTessEndContour + * gluTessEndContour} followed by + * {@link #gluTessBeginContour gluTessBeginContour}. + * </UL> + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param type + * The type of the contour being defined. + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessCallback gluTessCallback + * @see #gluTessEndContour gluTessEndContour + * @see #gluTessVertex gluTessVertex + ****************************************************************************/ +public final void gluNextContour(GLUtessellator tessellator, int type) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluNextContour(type); +} + +/***************************************************************************** + * <b>gluEndPolygon</b> and {@link #gluBeginPolygon + * gluBeginPolygon} delimit the definition of a nonconvex polygon. To define + * such a polygon, first call {@link #gluBeginPolygon + * gluBeginPolygon}. Then define the contours of the polygon by calling + * {@link #gluTessVertex gluTessVertex} for each vertex + * and {@link #gluNextContour gluNextContour} to start + * each new contour. Finally, call <b>gluEndPolygon</b> to signal the end of + * the definition. See the {@link #gluTessVertex + * gluTessVertex} and {@link #gluNextContour + * gluNextContour} reference pages for more details.<P> + * + * Once <b>gluEndPolygon</b> is called, the polygon is tessellated, and the + * resulting triangles are described through callbacks. See + * {@link #gluTessCallback gluTessCallback} for + * descriptions of the callback methods. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluNextContour gluNextContour + * @see #gluTessCallback gluTessCallback + * @see #gluTessVertex gluTessVertex + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessBeginContour gluTessBeginContour + ****************************************************************************/ +public final void gluEndPolygon(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluEndPolygon(); +} + // Boolean public static final int GLU_FALSE = 0; public static final int GLU_TRUE = 1; @@ -302,87 +1092,143 @@ 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; -public abstract void gluCylinder(GLUquadric quad, double base, double top, double height, int slices, int stacks) ; +public void gluCylinder(GLUquadric quad, double base, double top, double height, int slices, int stacks) { + throw new GLUnsupportedException("not implemented"); +} /** Interface to C language function: <br> <code> void gluDeleteQuadric(GLUquadric * quad); </code> */ -public abstract void gluDeleteQuadric(GLUquadric quad) ; +public void gluDeleteQuadric(GLUquadric quad) { + throw new GLUnsupportedException("not implemented"); +} /** Interface to C language function: <br> <code> void gluDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); </code> */ -public abstract void gluDisk(GLUquadric quad, double inner, double outer, int slices, int loops) ; +public void gluDisk(GLUquadric quad, double inner, double outer, int slices, int loops) { + throw new GLUnsupportedException("not implemented"); +} /** Interface to C language function: <br> <code> GLUquadric * gluNewQuadric(void); </code> */ -public abstract GLUquadric gluNewQuadric() ; +public GLUquadric gluNewQuadric() { + throw new GLUnsupportedException("not implemented"); +} /** Interface to C language function: <br> <code> void gluPartialDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); </code> */ -public abstract void gluPartialDisk(GLUquadric quad, double inner, double outer, int slices, int loops, double start, double sweep) ; +public void gluPartialDisk(GLUquadric quad, double inner, double outer, int slices, int loops, double start, double sweep) { + throw new GLUnsupportedException("not implemented"); +} /** Interface to C language function: <br> <code> void gluQuadricDrawStyle(GLUquadric * quad, GLenum draw); </code> */ -public abstract void gluQuadricDrawStyle(GLUquadric quad, int draw) ; +public void gluQuadricDrawStyle(GLUquadric quad, int draw) { + throw new GLUnsupportedException("not implemented"); +} /** Interface to C language function: <br> <code> void gluQuadricNormals(GLUquadric * quad, GLenum normal); </code> */ -public abstract void gluQuadricNormals(GLUquadric quad, int normal) ; +public void gluQuadricNormals(GLUquadric quad, int normal) { + throw new GLUnsupportedException("not implemented"); +} /** Interface to C language function: <br> <code> void gluQuadricOrientation(GLUquadric * quad, GLenum orientation); </code> */ -public abstract void gluQuadricOrientation(GLUquadric quad, int orientation) ; +public void gluQuadricOrientation(GLUquadric quad, int orientation) { + throw new GLUnsupportedException("not implemented"); +} /** Interface to C language function: <br> <code> void gluQuadricTexture(GLUquadric * quad, GLboolean texture); </code> */ -public abstract void gluQuadricTexture(GLUquadric quad, boolean texture) ; +public void gluQuadricTexture(GLUquadric quad, boolean texture) { + throw new GLUnsupportedException("not implemented"); +} /** Interface to C language function: <br> <code> void gluSphere(GLUquadric * quad, GLdouble radius, GLint slices, GLint stacks); </code> */ -public abstract void gluSphere(GLUquadric quad, double radius, int slices, int stacks) ; +public void gluSphere(GLUquadric quad, double radius, int slices, int stacks) { + throw new GLUnsupportedException("not implemented"); +} -public abstract void gluOrtho2D(float left, float right, float bottom, float top) ; +public void gluOrtho2D(float left, float right, float bottom, float top) { + throw new GLUnsupportedException("not implemented"); +} -public abstract void gluOrtho2D(double left, double right, double bottom, double top) ; +public void gluOrtho2D(double left, double right, double bottom, double top) { + throw new GLUnsupportedException("not implemented"); +} -public abstract void gluPerspective(float fovy, float aspect, float zNear, float zFar) ; +public void gluPerspective(float fovy, float aspect, float zNear, float zFar) { + throw new GLUnsupportedException("not implemented"); +} -public abstract void gluPerspective(double fovy, double aspect, double zNear, double zFar) ; +public void gluPerspective(double fovy, double aspect, double zNear, double zFar) { + throw new GLUnsupportedException("not implemented"); +} -public abstract void gluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) ; +public void gluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) { + throw new GLUnsupportedException("not implemented"); +} -public abstract void gluLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) ; +public void gluLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) { + throw new GLUnsupportedException("not implemented"); +} /** 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 array. */ -public abstract boolean gluProject(double objX, double objY, double objZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] winPos, int winPos_offset) ; +public boolean gluProject(double objX, double objY, double objZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] winPos, int winPos_offset) { + throw new GLUnsupportedException("not implemented"); +} /** 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 array. */ -public abstract boolean gluUnProject(double winX, double winY, double winZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] objPos, int objPos_offset) ; +public boolean gluUnProject(double winX, double winY, double winZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] objPos, int objPos_offset) { + throw new GLUnsupportedException("not implemented"); +} /** 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 array. */ -public abstract boolean gluUnProject4(double winX, double winY, double winZ, double clipW, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double nearVal, double farVal, double[] objPos, int objPos_offset) ; +public boolean gluUnProject4(double winX, double winY, double winZ, double clipW, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double nearVal, double farVal, double[] objPos, int objPos_offset) { + throw new GLUnsupportedException("not implemented"); +} -public abstract void gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) ; +public void gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) { + throw new GLUnsupportedException("not implemented"); +} -public abstract void gluPickMatrix(double x, double y, double delX, double delY, IntBuffer viewport) ; +public void gluPickMatrix(double x, double y, double delX, double delY, IntBuffer viewport) { + throw new GLUnsupportedException("not implemented"); +} -public abstract int gluScaleImage( int format, int widthin, int heightin, +public int gluScaleImage( int format, int widthin, int heightin, int typein, java.nio.Buffer datain, int widthout, int heightout, - int typeout, java.nio.Buffer dataout ) ; + int typeout, java.nio.Buffer dataout ) { + throw new GLUnsupportedException("not implemented"); +} -public abstract int gluBuild1DMipmapLevels( int target, int internalFormat, int width, +public int gluBuild1DMipmapLevels( int target, int internalFormat, int width, int format, int type, int userLevel, int baseLevel, int maxLevel, - java.nio.Buffer data ) ; -public abstract int gluBuild1DMipmaps( int target, int internalFormat, int width, - int format, int type, java.nio.Buffer data ) ; + java.nio.Buffer data ) { + throw new GLUnsupportedException("not implemented"); +} +public int gluBuild1DMipmaps( int target, int internalFormat, int width, + int format, int type, java.nio.Buffer data ) { + throw new GLUnsupportedException("not implemented"); +} -public abstract int gluBuild2DMipmapLevels( int target, int internalFormat, int width, +public int gluBuild2DMipmapLevels( int target, int internalFormat, int width, int height, int format, int type, int userLevel, int baseLevel, - int maxLevel, java.nio.Buffer data ) ; + int maxLevel, java.nio.Buffer data ) { + throw new GLUnsupportedException("not implemented"); +} -public abstract int gluBuild2DMipmaps( int target, int internalFormat, int width, - int height, int format, int type, java.nio.Buffer data ) ; +public int gluBuild2DMipmaps( int target, int internalFormat, int width, + int height, int format, int type, java.nio.Buffer data ) { + throw new GLUnsupportedException("not implemented"); +} -public abstract int gluBuild3DMipmapLevels( int target, int internalFormat, int width, +public int gluBuild3DMipmapLevels( int target, int internalFormat, int width, int height, int depth, int format, int type, int userLevel, int baseLevel, - int maxLevel, java.nio.Buffer data) ; + int maxLevel, java.nio.Buffer data) { + throw new GLUnsupportedException("not implemented"); +} -public abstract int gluBuild3DMipmaps( int target, int internalFormat, int width, - int height, int depth, int format, int type, java.nio.Buffer data ) ; +public int gluBuild3DMipmaps( int target, int internalFormat, int width, + int height, int depth, int format, int type, java.nio.Buffer data ) { + throw new GLUnsupportedException("not implemented"); +} diff --git a/make/glu-common.cfg b/make/glu-common.cfg index ed0c3cce0..988810b31 100644 --- a/make/glu-common.cfg +++ b/make/glu-common.cfg @@ -10,11 +10,14 @@ TagNativeBinding true Import java.nio.* Import javax.media.opengl.* Import javax.media.opengl.glu.* +Import javax.media.opengl.util.* Import com.sun.opengl.impl.* Import com.sun.opengl.impl.glu.* +Import com.sun.opengl.impl.glu.tessellator.GLUtessellatorImpl # Raise GLException instead of RuntimeException in glue code RuntimeExceptionType GLException +UnsupportedExceptionType GLUnsupportedException # # Opaques and other directives for platform-independent routines diff --git a/make/glu-es1.cfg b/make/glu-es1.cfg index 17234e6e5..f5cc4d7ae 100755 --- a/make/glu-es1.cfg +++ b/make/glu-es1.cfg @@ -20,8 +20,6 @@ Ignore gluScaleImage IncludeAs CustomJavaCode GLUes1 glu-CustomJavaCode-gles1.java Import javax.media.opengl.GLES1 -Import javax.media.opengl.glu.GLU -Import javax.media.opengl.util.BufferUtil Import com.sun.opengl.impl.glu.mipmap.Mipmap diff --git a/make/glu-es1_if.cfg b/make/glu-es1_if.cfg index 52029c4a5..d6d0bc397 100755 --- a/make/glu-es1_if.cfg +++ b/make/glu-es1_if.cfg @@ -6,7 +6,8 @@ NativeOutputDir ../build/gensrc/native/jogl Style ImplOnly ImplPackage javax.media.opengl.glu ImplJavaClass GLU -AccessControl GLU PUBLIC_ABSTRACT +#AccessControl GLU PUBLIC_ABSTRACT +AccessControl GLU PUBLIC Ignore gluBuild1DMipmapLevels Ignore gluBuild1DMipmaps @@ -21,5 +22,4 @@ IncludeAs CustomJavaCode GLU glu-CustomJavaCode-gles1_if.java Include glu-common.cfg -Import javax.media.opengl.* Import java.lang.reflect.* diff --git a/make/glu-gl2.cfg b/make/glu-gl2.cfg index ae0ae088b..068b47675 100755 --- a/make/glu-gl2.cfg +++ b/make/glu-gl2.cfg @@ -38,19 +38,16 @@ IncludeAs CustomJavaCode GLUgl2 glu-CustomJavaCode-gl2.java # GLU needs access to the GLUtesselatorImpl class for GLUtesselator, # to the Mipmap class for scaling and mipmap generation, # and to the nurbs.* package for the NURBS functionality -Import javax.media.opengl.glu.GLU -Import javax.media.opengl.GL2 -Import javax.media.opengl.util.* -Import com.sun.opengl.impl.gl2.ProjectDouble Import com.sun.opengl.impl.glu.error.Error -Import com.sun.opengl.impl.glu.tessellator.GLUtessellatorImpl Import com.sun.opengl.impl.glu.registry.Registry Import com.sun.opengl.impl.glu.nurbs.* -Import com.sun.opengl.impl.glu.gl2.* +Import java.security.* +Import com.sun.gluegen.runtime.opengl.GLProcAddressHelper Import com.sun.opengl.impl.glu.gl2.nurbs.* Import com.sun.opengl.impl.glu.mipmap.Mipmap -Import com.sun.gluegen.runtime.opengl.GLProcAddressHelper -Import java.security.* +Import com.sun.opengl.impl.glu.gl2.* +Import javax.media.opengl.GL2 +Import com.sun.opengl.impl.gl2.ProjectDouble # # ------------------------ diff --git a/make/glx-x11.cfg b/make/glx-x11.cfg index e7ef1fa63..fa2ad4790 100644 --- a/make/glx-x11.cfg +++ b/make/glx-x11.cfg @@ -90,3 +90,20 @@ Ignore TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB Ignore CLAMP_TO_EDGE_EXT Ignore ^gl[^X].+ Ignore ^X.+ +Ignore ^Visual.+ + +DropUniqVendorExtensions AMD +# We need GL_APPLE_float_pixels for our pbuffer implementation +# DropUniqVendorExtensions APPLE +DropUniqVendorExtensions ATI +DropUniqVendorExtensions HP +DropUniqVendorExtensions IBM +DropUniqVendorExtensions MESA +DropUniqVendorExtensions MESAX +DropUniqVendorExtensions NV +DropUniqVendorExtensions SGI +DropUniqVendorExtensions SGIS +DropUniqVendorExtensions SGIX +DropUniqVendorExtensions SUN +DropUniqVendorExtensions WIN + diff --git a/make/make.jogl.all.linux-x86.sh b/make/make.jogl.all.linux-x86.sh index 556224d4c..f538018be 100644 --- a/make/make.jogl.all.linux-x86.sh +++ b/make/make.jogl.all.linux-x86.sh @@ -2,7 +2,7 @@ . ../../setenv-build-jogl.sh -ant \ +ant -v \ -Dgluegen.cpptasks.detected.os=true \ -DisUnix=true \ -DisLinux=true \ diff --git a/make/wgl-win32.cfg b/make/wgl-win32.cfg index 88bffa3d7..7d5a17494 100644 --- a/make/wgl-win32.cfg +++ b/make/wgl-win32.cfg @@ -25,3 +25,19 @@ CustomCCode #include <stddef.h> Include intptr.cfg IncludeAs CustomCCode wgl-CustomCCode.c + +DropUniqVendorExtensions AMD +# We need GL_APPLE_float_pixels for our pbuffer implementation +# DropUniqVendorExtensions APPLE +DropUniqVendorExtensions ATI +DropUniqVendorExtensions HP +DropUniqVendorExtensions IBM +DropUniqVendorExtensions MESA +DropUniqVendorExtensions MESAX +DropUniqVendorExtensions NV +DropUniqVendorExtensions SGI +DropUniqVendorExtensions SGIS +DropUniqVendorExtensions SGIX +DropUniqVendorExtensions SUN +DropUniqVendorExtensions WIN + diff --git a/make/x11-lib.cfg b/make/x11-lib.cfg index 041a1b326..54f1bc1c4 100644 --- a/make/x11-lib.cfg +++ b/make/x11-lib.cfg @@ -41,6 +41,3 @@ CustomJavaCode X11Lib private static int getFirstElement(IntBuffer buf) CustomJavaCode X11Lib private static int getFirstElement(int[] arr, int offset) { return arr[offset]; } ReturnedArrayLength XGetVisualInfo getFirstElement({3}) -# Ignore all GLX and GL stuff -Ignore ^GL_.+ -Ignore ^gl.+ diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java index 014cc9cf5..5a4cd82fd 100644 --- a/src/classes/com/sun/opengl/impl/GLContextImpl.java +++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java @@ -239,7 +239,7 @@ public abstract class GLContextImpl extends GLContext { } else if(GLProfile.isGLES1()) { clazzName="com.sun.opengl.impl.es2.GLES2"+suffix; } else { - throw new GLException("uncovered profile"); + throw new GLUnsupportedException("uncovered profile"); } return GLReflection.createInstance(clazzName, cstrArgTypes, cstrArgs); } catch (Exception e) { @@ -369,7 +369,7 @@ public abstract class GLContextImpl extends GLContext { use. Returns one of GLPbuffer.APPLE_FLOAT, GLPbuffer.ATI_FLOAT, or GLPbuffer.NV_FLOAT. */ public int getFloatingPointMode() throws GLException { - throw new GLException("Not supported on non-pbuffer contexts"); + throw new GLUnsupportedException("Not supported on non-pbuffer contexts"); } /** On some platforms the mismatch between OpenGL's coordinate diff --git a/src/classes/com/sun/opengl/impl/GLPbufferImpl.java b/src/classes/com/sun/opengl/impl/GLPbufferImpl.java index 1f48ae8a1..9589cc735 100644 --- a/src/classes/com/sun/opengl/impl/GLPbufferImpl.java +++ b/src/classes/com/sun/opengl/impl/GLPbufferImpl.java @@ -75,7 +75,7 @@ public class GLPbufferImpl implements GLPbuffer { public void setSize(int width, int height) { // FIXME - throw new GLException("Not yet implemented"); + throw new GLUnsupportedException("Not yet implemented"); } public NativeWindow getNativeWindow() { diff --git a/src/classes/com/sun/opengl/impl/GLReflection.java b/src/classes/com/sun/opengl/impl/GLReflection.java index 6898db82d..5e55aba31 100644 --- a/src/classes/com/sun/opengl/impl/GLReflection.java +++ b/src/classes/com/sun/opengl/impl/GLReflection.java @@ -48,12 +48,12 @@ public final class GLReflection { try { factoryClass = Class.forName(clazzName); if (factoryClass == null) { - throw new GLException(clazzName + " not available"); + throw new GLUnsupportedException(clazzName + " not available"); } try { factory = factoryClass.getDeclaredConstructor( cstrArgTypes ); } catch(NoSuchMethodException nsme) { - throw new GLException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found"); + throw new GLUnsupportedException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found"); } return factory; } catch (Exception e) { diff --git a/src/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/classes/com/sun/opengl/impl/egl/EGLContext.java index 0e6d07a8e..3a23483cb 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLContext.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLContext.java @@ -197,8 +197,8 @@ public class EGLContext extends GLContextImpl { return null; } - public void copy(GLContext source, int mask) throws GLException { - throw new GLException("Not yet implemented"); + public void copy(GLContext source, int mask) throws GLUnsupportedException { + throw new GLUnsupportedException("Not yet implemented"); } public void bindPbufferToTexture() { diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java index 00f293ffb..9f6d6b789 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java @@ -123,7 +123,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { public GLDrawableImpl createOffscreenDrawable(GLCapabilities capabilities, GLCapabilitiesChooser chooser) { - throw new GLException("Not yet implemented"); + throw new GLUnsupportedException("Not yet implemented"); } public boolean canCreateGLPbuffer() { @@ -135,7 +135,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { final int initialWidth, final int initialHeight, final GLContext shareWith) { - throw new GLException("Pbuffer support not available on OpenGL ES"); + throw new GLUnsupportedException("Pbuffer support not available on OpenGL ES"); } public GLContext createExternalGLContext() { @@ -147,7 +147,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { } public GLDrawable createExternalGLDrawable() { - throw new GLException("Not yet implemented"); + throw new GLUnsupportedException("Not yet implemented"); } public void loadGLULibrary() { @@ -347,6 +347,6 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith) throws GLException { - throw new GLException("Unimplemented on this platform"); + throw new GLUnsupportedException("Unimplemented on this platform"); } } diff --git a/src/classes/com/sun/opengl/impl/glu/tessellator/Render.java b/src/classes/com/sun/opengl/impl/glu/tessellator/Render.java index 999656b82..cd6e02255 100644 --- a/src/classes/com/sun/opengl/impl/glu/tessellator/Render.java +++ b/src/classes/com/sun/opengl/impl/glu/tessellator/Render.java @@ -297,7 +297,7 @@ class Render { int newState; int edgeState = -1; /* force edge state output for first vertex */ - tess.callBeginOrBeginData(GL2ES1.GL_TRIANGLES); + tess.callBeginOrBeginData(GL.GL_TRIANGLES); for (; f != null; f = f.trail) { /* Loop once for each edge (there will always be 3 edges) */ @@ -328,7 +328,7 @@ class Render { * edge "e". The fan *should* contain exactly "size" triangles * (otherwise we've goofed up somewhere). */ - tess.callBeginOrBeginData( GL2ES1.GL_TRIANGLE_FAN); + tess.callBeginOrBeginData( GL.GL_TRIANGLE_FAN); tess.callVertexOrVertexData( e.Org.data); tess.callVertexOrVertexData( e.Sym.Org.data); @@ -350,7 +350,7 @@ class Render { * edge "e". The strip *should* contain exactly "size" triangles * (otherwise we've goofed up somewhere). */ - tess.callBeginOrBeginData( GL2ES1.GL_TRIANGLE_STRIP); + tess.callBeginOrBeginData( GL.GL_TRIANGLE_STRIP); tess.callVertexOrVertexData( e.Org.data); tess.callVertexOrVertexData( e.Sym.Org.data); @@ -384,7 +384,7 @@ class Render { for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { if (f.inside) { - tess.callBeginOrBeginData( GL2ES1.GL_LINE_LOOP); + tess.callBeginOrBeginData( GL.GL_LINE_LOOP); e = f.anEdge; do { tess.callVertexOrVertexData( e.Org.data); @@ -536,9 +536,9 @@ class Render { return true; } - tess.callBeginOrBeginData( tess.boundaryOnly ? GL2ES1.GL_LINE_LOOP - : (tess.cacheCount > 3) ? GL2ES1.GL_TRIANGLE_FAN - : GL2ES1.GL_TRIANGLES); + tess.callBeginOrBeginData( tess.boundaryOnly ? GL.GL_LINE_LOOP + : (tess.cacheCount > 3) ? GL.GL_TRIANGLE_FAN + : GL.GL_TRIANGLES); tess.callVertexOrVertexData( v[0].data); if (sign > 0) { diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java index ff5fbbdff..8bf82b3d2 100644 --- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java +++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java @@ -327,7 +327,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) { // FIXME: apparently the Apple extension doesn't require a custom memory allocator - throw new GLException("Not yet implemented"); + throw new GLUnsupportedException("Not yet implemented"); } public boolean isFunctionAvailable(String glFunctionName) diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java index c905ed48e..2880ee0ed 100644 --- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java @@ -115,7 +115,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl { public GLDrawable createExternalGLDrawable() { // FIXME - throw new GLException("Not yet implemented"); + throw new GLUnsupportedException("Not yet implemented"); } public void loadGLULibrary() { diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java index 7828e6a2c..9216e3e17 100644 --- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java @@ -117,7 +117,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable { // (undesirable) -- could maybe also do this with pbuffers /* if (!gl.isExtensionAvailable("GL_APPLE_float_pixels")) { - throw new GLException("Floating-point support (GL_APPLE_float_pixels) not available"); + throw new GLUnsupportedException("Floating-point support (GL_APPLE_float_pixels) not available"); } */ if(GLProfile.isGL2()) { diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java index 78a617f8e..a13aba0e4 100644 --- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java @@ -129,7 +129,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { final int initialHeight, final GLContext shareWith) { if (!canCreateGLPbuffer()) { - throw new GLException("Pbuffer support not available with current graphics card"); + throw new GLUnsupportedException("Pbuffer support not available with current graphics card"); } final List returnList = new ArrayList(); final GLDrawableFactory factory = this; diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java index 3ba3f060f..d68f087b6 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java @@ -178,7 +178,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { final int initialHeight, final GLContext shareWith) { if (!canCreateGLPbuffer()) { - throw new GLException("Pbuffer support not available with current graphics card"); + throw new GLUnsupportedException("Pbuffer support not available with current graphics card"); } final List returnList = new ArrayList(); final GLDrawableFactory factory = this; @@ -340,7 +340,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { glXExtensions.indexOf("GLX_NV_float_buffer") < 0) { throw new GLException("Floating-point pbuffers on X11 currently require NVidia hardware"); } - res[idx++] = GLX.GLX_FLOAT_COMPONENTS_NV; + res[idx++] = GLXExt.GLX_FLOAT_COMPONENTS_NV; res[idx++] = GL.GL_TRUE; } } @@ -413,7 +413,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { caps.setNumSamples(ivalues[i]); break; - case GLX.GLX_FLOAT_COMPONENTS_NV: + case GLXExt.GLX_FLOAT_COMPONENTS_NV: caps.setPbufferFloatingPointBuffers(ivalues[i] != GL.GL_FALSE); break; diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java index 746b7bd26..377d92f98 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXContext.java @@ -54,12 +54,12 @@ public class X11PbufferGLXContext extends X11GLXContext { public void bindPbufferToTexture() { // FIXME: figure out how to implement this - throw new GLException("Not yet implemented"); + throw new GLUnsupportedException("Not yet implemented"); } public void releasePbufferFromTexture() { // FIXME: figure out how to implement this - throw new GLException("Not yet implemented"); + throw new GLUnsupportedException("Not yet implemented"); } diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java index 8caf2fa33..06aeba0b6 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java @@ -171,7 +171,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable { // Pick innocent query values if multisampling or floating point buffers not available int sbAttrib = ((X11GLXDrawableFactory)getFactory()).isMultisampleAvailable() ? GLXExt.GLX_SAMPLE_BUFFERS: GLX.GLX_RED_SIZE; int samplesAttrib = ((X11GLXDrawableFactory)getFactory()).isMultisampleAvailable() ? GLXExt.GLX_SAMPLES: GLX.GLX_RED_SIZE; - int floatNV = getCapabilities().getPbufferFloatingPointBuffers() ? GLX.GLX_FLOAT_COMPONENTS_NV : GLX.GLX_RED_SIZE; + int floatNV = getCapabilities().getPbufferFloatingPointBuffers() ? GLXExt.GLX_FLOAT_COMPONENTS_NV : GLX.GLX_RED_SIZE; // Query the fbconfig to determine its GLCapabilities int[] iattribs = { diff --git a/src/classes/com/sun/opengl/util/texture/Texture.java b/src/classes/com/sun/opengl/util/texture/Texture.java index f0c36e398..ec3692196 100755 --- a/src/classes/com/sun/opengl/util/texture/Texture.java +++ b/src/classes/com/sun/opengl/util/texture/Texture.java @@ -519,11 +519,13 @@ public class Texture { } try { - // FIXME: need to get rid of this cast - GLUgl2 glu = (GLUgl2) GLU.createGLU(gl); - glu.gluBuild2DMipmaps(texTarget, data.getInternalFormat(), - data.getWidth(), data.getHeight(), - data.getPixelFormat(), data.getPixelType(), data.getBuffer()); + if(gl.isGL2()) { + // FIXME: need to get rid of this cast + GLUgl2 glu = (GLUgl2) GLU.createGLU(); + glu.gluBuild2DMipmaps(texTarget, data.getInternalFormat(), + data.getWidth(), data.getHeight(), + data.getPixelFormat(), data.getPixelType(), data.getBuffer()); + } } finally { gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, align[0]); // restore alignment } diff --git a/src/classes/javax/media/opengl/GLUnsupportedException.java b/src/classes/javax/media/opengl/GLUnsupportedException.java new file mode 100644 index 000000000..34a1c7340 --- /dev/null +++ b/src/classes/javax/media/opengl/GLUnsupportedException.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any kind. ALL + * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, + * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN + * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR + * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR + * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR + * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE + * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, + * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF + * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed or intended for use + * in the design, construction, operation or maintenance of any nuclear + * facility. + * + * Sun gratefully acknowledges that this software was originally authored + * and developed by Kenneth Bradley Russell and Christopher John Kline. + */ + +package javax.media.opengl; + +/** A generic exception for OpenGL errors used throughout the binding + as a substitute for {@link UnsupportedOperationException}. */ + +public class GLUnsupportedException extends UnsupportedOperationException { + /** Constructs a GLUnsupportedException object. */ + public GLUnsupportedException() { + super(); + } + + /** Constructs a GLUnsupportedException object with the specified detail + message. */ + public GLUnsupportedException(String message) { + super(message); + } + + /** Constructs a GLUnsupportedException object with the specified detail + message and root cause. */ + public GLUnsupportedException(String message, Throwable cause) { + super(message, cause); + } + + /** Constructs a GLUnsupportedException object with the specified root + cause. */ + public GLUnsupportedException(Throwable cause) { + super(cause); + } +} |