From 4e83a5df7a851cc33d85f76381f058256906ad4c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 10 Oct 2013 02:15:56 +0200 Subject: Bug 852: Remove CPU sourced data API entry where not allowed (ES3 and GL core >= 3.0) ; GL2 cfg: Ignore GL2ES3 symbols (super) Remove CPU sourced data API entries via new config 'BufferObjectOnly ', listed in 'gl-common-gpubufferonly.cfg' and included in ES3 and all GL core >= 3 interfaces. If BufferObjectOnly is defined for a function, only the 'long offset' variant is being emitted. Due to limitations of GlueGen's 'ExtendedInterfaceSymbolsIgnore A.java', which only identifies the function name and not the signature - all CPU sourced variants are manually added to the compatibility and ES2 GL profiles via '*-common-cpubufferJavaCode.java' files. GLContext: Added 'isCPUSourcedAvail()' to determine whether context allows CPU sourced data, i.e. for GL2ES1 and GLES2 ctx. GLContext/GLProfile/GL: isGLES2() now returns false if having a ES3 context due to 'CPU sourced' incompatibility! +++ GL2 cfg: Added ignore GL2ES3 symbols of it's superclass, removing duplicated symbols. --- make/config/jogl/gl-common-gpubufferonly.cfg | 50 +++++++++++ make/config/jogl/gl-es3-impl.cfg | 91 ++++++++++++++++++++ make/config/jogl/gl-es3.cfg | 98 ---------------------- make/config/jogl/gl-gl4bc.cfg | 3 + make/config/jogl/gl-if-es2.cfg | 3 + make/config/jogl/gl-if-es3.cfg | 39 +++++++++ make/config/jogl/gl-if-gl.cfg | 1 + make/config/jogl/gl-if-gl2.cfg | 3 + make/config/jogl/gl-if-gl2_es1.cfg | 2 + make/config/jogl/gl-if-gl2_es2.cfg | 1 + make/config/jogl/gl-if-gl2_es3.cfg | 1 + make/config/jogl/gl-if-gl2_gl3.cfg | 1 + make/config/jogl/gl-if-gl3.cfg | 1 + make/config/jogl/gl-if-gl3bc.cfg | 2 +- make/config/jogl/gl-if-gl4.cfg | 1 + make/config/jogl/gl-if-gl4_es3.cfg | 1 + make/config/jogl/gl-impl-CustomJavaCode-gles3.java | 2 +- make/config/jogl/gl2-common-cpubufferJavaCode.java | 13 +++ .../jogl/gl2_es1-common-cpubufferJavaCode.java | 4 + .../jogl/gl2_es2-common-cpubufferJavaCode.java | 4 + .../jogl/gl3bc-common-cpubufferJavaCode.java | 13 +++ .../jogl/gl4bc-common-cpubufferJavaCode.java | 21 +++++ 22 files changed, 255 insertions(+), 100 deletions(-) create mode 100644 make/config/jogl/gl-common-gpubufferonly.cfg create mode 100644 make/config/jogl/gl-es3-impl.cfg delete mode 100644 make/config/jogl/gl-es3.cfg create mode 100644 make/config/jogl/gl-if-es3.cfg create mode 100644 make/config/jogl/gl2-common-cpubufferJavaCode.java create mode 100644 make/config/jogl/gl2_es1-common-cpubufferJavaCode.java create mode 100644 make/config/jogl/gl2_es2-common-cpubufferJavaCode.java create mode 100644 make/config/jogl/gl3bc-common-cpubufferJavaCode.java create mode 100644 make/config/jogl/gl4bc-common-cpubufferJavaCode.java (limited to 'make/config/jogl') diff --git a/make/config/jogl/gl-common-gpubufferonly.cfg b/make/config/jogl/gl-common-gpubufferonly.cfg new file mode 100644 index 000000000..14671f353 --- /dev/null +++ b/make/config/jogl/gl-common-gpubufferonly.cfg @@ -0,0 +1,50 @@ + +# +# For core GL spec >= 3.1 and ES >= 3.0 +# source can only be a buffer object! +# +# See Bug 852 +# +# OpenGL 3.1 core spec 2.10 p41 +# Vertex Array Objects - *Pointer commands +# +# OpenGL 3.2 core spec 2.9.7 p45 +# Draw* commands -w/ "Array Indices in Buffer Objects" +# +# OpenGL 4.0 core spec 2.9.8 p51: +# Draw* Indirect Commands .. +# + +BufferObjectOnly glColorPointer +BufferObjectOnly glEdgeFlagPointer +BufferObjectOnly glElementPointerATI +BufferObjectOnly glFogCoordPointer +BufferObjectOnly glFogCoordPointerEXT +BufferObjectOnly glInterleavedArrays +BufferObjectOnly glMatrixIndexPointerARB +BufferObjectOnly glNormalPointer +BufferObjectOnly glSecondaryColorPointer +BufferObjectOnly glSecondaryColorPointerEXT +BufferObjectOnly glTexCoordPointer +BufferObjectOnly glVariantPointerEXT +BufferObjectOnly glVertexPointer +BufferObjectOnly glVertexAttribPointer +BufferObjectOnly glVertexAttribPointerARB +BufferObjectOnly glVertexAttribPointerNV +BufferObjectOnly glVertexAttribIPointer +BufferObjectOnly glVertexAttribLPointer +BufferObjectOnly glVertexWeightPointerEXT +BufferObjectOnly glWeightPointerARB + +BufferObjectOnly glDrawElements +BufferObjectOnly glDrawElementsBaseVertex +BufferObjectOnly glDrawElementsInstanced +BufferObjectOnly glDrawElementsInstancedBaseInstance +BufferObjectOnly glDrawElementsInstancedBaseVertex +BufferObjectOnly glDrawElementsInstancedBaseVertexBaseInstance +BufferObjectOnly glDrawRangeElements +BufferObjectOnly glDrawRangeElementsBaseVertex + +BufferObjectOnly glDrawArraysIndirect +BufferObjectOnly glDrawElementsIndirect + diff --git a/make/config/jogl/gl-es3-impl.cfg b/make/config/jogl/gl-es3-impl.cfg new file mode 100644 index 000000000..2e5e36e9c --- /dev/null +++ b/make/config/jogl/gl-es3-impl.cfg @@ -0,0 +1,91 @@ +# This .cfg file is used to generate the GL implementing class. +JavaOutputDir gensrc/classes +NativeOutputDir gensrc/native/jogl/es3 + +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2ES2.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GLES2.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2ES3.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL3ES3.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL4ES3.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GLES3.java +ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/GLBase.java + +Style ImplOnly +ImplPackage jogamp.opengl.es3 +ImplJavaClass GLES3Impl +Implements GLES3Impl GLBase +Implements GLES3Impl GL +Implements GLES3Impl GL2ES2 +Implements GLES3Impl GLES2 +Implements GLES3Impl GL2ES3 +Implements GLES3Impl GL3ES3 +Implements GLES3Impl GL4ES3 +Implements GLES3Impl GLES3 +HierarchicalNativeOutput false +Include gl-common.cfg +Include gl-common-extensions.cfg +Include gl2_es3-common.cfg +Include gl2_es2-CustomJavaCode.cfg + +ForceExtension GL_ARB_ES3_compatibility + +EmitProcAddressTable true +ProcAddressTableClassName GLES3ProcAddressTable +GetProcAddressTableExpr ((GLES3ProcAddressTable)_context.getGLProcAddressTable()) + +# Force all of the methods to be emitted using dynamic linking so we +# don't need to link against any emulation library on the desktop or +# depend on the presence of an import library for a particular device +ForceProcAddressGen __ALL__ + +# Also force the calling conventions of the locally generated function +# pointer typedefs for these routines to GL_APIENTRY +LocalProcAddressCallingConvention __ALL__ GL_APIENTRY + +# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums +TagNativeBinding true + +# Add PixelStorei StateTracker +# +# Add input validation to glPixelStorei, just to be sure. +CustomJavaCode GLES3Impl private static final int params_offset = 0; // just a helper for JavaPrologue .. + +JavaPrologue glPixelStorei if (pname != GL_PACK_ALIGNMENT && pname != GL_UNPACK_ALIGNMENT) { +JavaPrologue glPixelStorei throw new GLException("Unsupported pixel store parameter name 0x" + Integer.toHexString(pname)); +JavaPrologue glPixelStorei } +JavaPrologue glPixelStorei glStateTracker.setInt(pname, param); + +JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offset) ) { return; } + +CustomCCode #include /* android */ +CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in +CustomCCode "glext.h" are parsed. */ +CustomCCode #define GL_GLEXT_PROTOTYPES + +CustomCCode /* Include the OpenGL headers */ +CustomCCode /* #define GL_APICALL __declspec(dllimport) */ +CustomCCode #include +CustomCCode #include +CustomCCode #include +CustomCCode #include + +IncludeAs CustomJavaCode GLES3Impl gl-impl-CustomJavaCode-common.java +IncludeAs CustomJavaCode GLES3Impl gl-impl-CustomJavaCode-gles3.java +IncludeAs CustomJavaCode GLES3Impl gl-impl-CustomJavaCode-embedded.java +IncludeAs CustomJavaCode GLES3Impl gl-impl-CustomJavaCode-gl2_es2.java +IncludeAs CustomCCode gl-impl-CustomCCode-gles3.c + +Import javax.media.opengl.GLBase +Import javax.media.opengl.GL +Import javax.media.opengl.GL2ES2 +Import javax.media.opengl.GL2ES3 +Import javax.media.opengl.GL3ES3 +Import javax.media.opengl.GL4ES3 +Import javax.media.opengl.GLES3 +Import javax.media.opengl.GLArrayData +Import javax.media.opengl.GLUniformData +Import com.jogamp.common.nio.Buffers +Import com.jogamp.opengl.util.GLBuffers +Import java.io.PrintStream + diff --git a/make/config/jogl/gl-es3.cfg b/make/config/jogl/gl-es3.cfg deleted file mode 100644 index 997723d01..000000000 --- a/make/config/jogl/gl-es3.cfg +++ /dev/null @@ -1,98 +0,0 @@ -# This .cfg file is used to generate the GL interface and implementing class. -JavaOutputDir gensrc/classes -NativeOutputDir gensrc/native/jogl/es3 - -ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL.java -ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2ES2.java -ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GLES2.java -ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2ES3.java -ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL3ES3.java -ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL4ES3.java -ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/GLBase.java - -Package javax.media.opengl -Style InterfaceAndImpl -JavaClass GLES3 -#Extends GLES3 GLBase -#Extends GLES3 GL -#Extends GLES3 GL2ES2 -#Extends GLES3 GL2ES3 -#Extends GLES3 GL3ES3 -Extends GLES3 GLES2 -Extends GLES3 GL4ES3 -ImplPackage jogamp.opengl.es3 -ImplJavaClass GLES3Impl -Implements GLES3Impl GLBase -Implements GLES3Impl GL -Implements GLES3Impl GL2ES2 -Implements GLES3Impl GLES2 -Implements GLES3Impl GL2ES3 -Implements GLES3Impl GL3ES3 -Implements GLES3Impl GL4ES3 -HierarchicalNativeOutput false -Include gl-common.cfg -Include gl-common-extensions.cfg -Include gl2_es3-common.cfg -Include gl2_es2-CustomJavaCode.cfg - -ForceExtension GL_ARB_ES3_compatibility - -EmitProcAddressTable true -ProcAddressTableClassName GLES3ProcAddressTable -GetProcAddressTableExpr ((GLES3ProcAddressTable)_context.getGLProcAddressTable()) - -# Force all of the methods to be emitted using dynamic linking so we -# don't need to link against any emulation library on the desktop or -# depend on the presence of an import library for a particular device -ForceProcAddressGen __ALL__ - -# Also force the calling conventions of the locally generated function -# pointer typedefs for these routines to GL_APIENTRY -LocalProcAddressCallingConvention __ALL__ GL_APIENTRY - -# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums -TagNativeBinding true - -# Add PixelStorei StateTracker -# -# Add input validation to glPixelStorei, just to be sure. -CustomJavaCode GLES3Impl private static final int params_offset = 0; // just a helper for JavaPrologue .. - -JavaPrologue glPixelStorei if (pname != GL_PACK_ALIGNMENT && pname != GL_UNPACK_ALIGNMENT) { -JavaPrologue glPixelStorei throw new GLException("Unsupported pixel store parameter name 0x" + Integer.toHexString(pname)); -JavaPrologue glPixelStorei } -JavaPrologue glPixelStorei glStateTracker.setInt(pname, param); - -JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offset) ) { return; } - -CustomCCode #include /* android */ -CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in -CustomCCode "glext.h" are parsed. */ -CustomCCode #define GL_GLEXT_PROTOTYPES - -CustomCCode /* Include the OpenGL headers */ -CustomCCode /* #define GL_APICALL __declspec(dllimport) */ -CustomCCode #include -CustomCCode #include -CustomCCode #include -CustomCCode #include - -IncludeAs CustomJavaCode GLES3Impl gl-impl-CustomJavaCode-common.java -IncludeAs CustomJavaCode GLES3Impl gl-impl-CustomJavaCode-gles3.java -IncludeAs CustomJavaCode GLES3Impl gl-impl-CustomJavaCode-embedded.java -IncludeAs CustomJavaCode GLES3Impl gl-impl-CustomJavaCode-gl2_es2.java -IncludeAs CustomCCode gl-impl-CustomCCode-gles3.c - -Import javax.media.opengl.GLBase -Import javax.media.opengl.GL -Import javax.media.opengl.GL2ES2 -Import javax.media.opengl.GL2ES3 -Import javax.media.opengl.GL3ES3 -Import javax.media.opengl.GL4ES3 -Import javax.media.opengl.GLES3 -Import javax.media.opengl.GLArrayData -Import javax.media.opengl.GLUniformData -Import com.jogamp.common.nio.Buffers -Import com.jogamp.opengl.util.GLBuffers -Import java.io.PrintStream - diff --git a/make/config/jogl/gl-gl4bc.cfg b/make/config/jogl/gl-gl4bc.cfg index d1bd85641..c3a392c52 100644 --- a/make/config/jogl/gl-gl4bc.cfg +++ b/make/config/jogl/gl-gl4bc.cfg @@ -84,6 +84,8 @@ TagNativeBinding true # Ignore extensions that are already picked up via the GL2ES1 interface IgnoreExtension GL_EXT_point_parameters +IncludeAs CustomJavaCode GL4bc gl4bc-common-cpubufferJavaCode.java + # Add PixelStorei StateTracker CustomJavaCode GL4bcImpl private static final int params_offset = 0; // just a helper for JavaPrologue .. @@ -117,6 +119,7 @@ Include gl3ext-headers.cfg IncludeAs CustomJavaCode GL4bcImpl gl-impl-CustomJavaCode-common.java IncludeAs CustomJavaCode GL4bcImpl gl-impl-CustomJavaCode-gl4bc.java IncludeAs CustomJavaCode GL4bcImpl gl-impl-CustomJavaCode-gl2_es2.java + IncludeAs CustomCCode gl-impl-CustomCCode-gl4bc.c Import javax.media.opengl.GLES1 diff --git a/make/config/jogl/gl-if-es2.cfg b/make/config/jogl/gl-if-es2.cfg index aabd2d5a7..052722f40 100644 --- a/make/config/jogl/gl-if-es2.cfg +++ b/make/config/jogl/gl-if-es2.cfg @@ -17,6 +17,9 @@ Include gl-common-extensions.cfg Include gl2_es2-common.cfg Include gl2_es2-CustomJavaCode.cfg +IncludeAs CustomJavaCode GLES2 gl2_es1-common-cpubufferJavaCode.java +IncludeAs CustomJavaCode GLES2 gl2_es2-common-cpubufferJavaCode.java + # Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums TagNativeBinding true diff --git a/make/config/jogl/gl-if-es3.cfg b/make/config/jogl/gl-if-es3.cfg new file mode 100644 index 000000000..33e41762a --- /dev/null +++ b/make/config/jogl/gl-if-es3.cfg @@ -0,0 +1,39 @@ +# This .cfg file is used to generate the GL interface. +JavaOutputDir gensrc/classes + +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2ES2.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GLES2.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2ES3.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL3ES3.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL4ES3.java +ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/GLBase.java + +Package javax.media.opengl +Style InterfaceOnly +JavaClass GLES3 +#Extends GLES3 GLBase +#Extends GLES3 GL +#Extends GLES3 GL2ES2 +#Extends GLES3 GL2ES3 +#Extends GLES3 GL3ES3 +Extends GLES3 GLES2 +Extends GLES3 GL4ES3 +HierarchicalNativeOutput false +Include gl-common.cfg +Include gl-common-gpubufferonly.cfg +Include gl-common-extensions.cfg +Include gl2_es3-common.cfg +Include gl2_es2-CustomJavaCode.cfg + +ForceExtension GL_ARB_ES3_compatibility + +# dummy procaddress config / force procaddress for comments +EmitProcAddressTable false +ProcAddressTableClassName DontGenerateProcAddressTableStuff +GetProcAddressTableExpr DontGenerateProcAddressTableStuff +ForceProcAddressGen __ALL__ + +# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums +TagNativeBinding true + diff --git a/make/config/jogl/gl-if-gl.cfg b/make/config/jogl/gl-if-gl.cfg index 4137cae8e..5c9e4caa2 100644 --- a/make/config/jogl/gl-if-gl.cfg +++ b/make/config/jogl/gl-if-gl.cfg @@ -8,6 +8,7 @@ ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/GLBase.jav HierarchicalNativeOutput false Include gl-common.cfg +Include gl-common-gpubufferonly.cfg Include gl-common-extensions.cfg Include gl-if-gl-ignores.cfg Include gl-if-gl2_es2-ignores.cfg diff --git a/make/config/jogl/gl-if-gl2.cfg b/make/config/jogl/gl-if-gl2.cfg index 60efd73af..37f7b6feb 100644 --- a/make/config/jogl/gl-if-gl2.cfg +++ b/make/config/jogl/gl-if-gl2.cfg @@ -5,6 +5,7 @@ NativeOutputDir gensrc/native/jogl/gl2 ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL.java ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2ES1.java ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2ES2.java +ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2ES3.java ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2GL3.java ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/GLBase.java ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java @@ -26,6 +27,8 @@ Include gl-if-gl3-ignores.cfg Include gl-if-gl4-ignores.cfg IncludeAs CustomJavaCode GL2 gl-if-CustomJavaCode-gl_compat.java +IncludeAs CustomJavaCode GL2 gl2_es2-common-cpubufferJavaCode.java +IncludeAs CustomJavaCode GL2 gl2-common-cpubufferJavaCode.java # Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums TagNativeBinding true diff --git a/make/config/jogl/gl-if-gl2_es1.cfg b/make/config/jogl/gl-if-gl2_es1.cfg index 04d78f51e..b533e83c3 100644 --- a/make/config/jogl/gl-if-gl2_es1.cfg +++ b/make/config/jogl/gl-if-gl2_es1.cfg @@ -110,6 +110,8 @@ Ignore GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES CustomJavaCode GL2ES1 public void glOrtho(double left, double right, double bottom, double top, double near_val, double far_val); CustomJavaCode GL2ES1 public void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar); +IncludeAs CustomJavaCode GL2ES1 gl2_es1-common-cpubufferJavaCode.java + # dummy procaddress config / force procaddress for comments EmitProcAddressTable false ProcAddressTableClassName DontGenerateProcAddressTableStuff diff --git a/make/config/jogl/gl-if-gl2_es2.cfg b/make/config/jogl/gl-if-gl2_es2.cfg index 0ad140eb2..db5489d06 100644 --- a/make/config/jogl/gl-if-gl2_es2.cfg +++ b/make/config/jogl/gl-if-gl2_es2.cfg @@ -13,6 +13,7 @@ Extends GL2ES2 GL HierarchicalNativeOutput false Include gl-common.cfg +Include gl-common-gpubufferonly.cfg Include gl-common-extensions.cfg Include gl2_es2-common.cfg Include gl-if-gl2_es2-ignores.cfg diff --git a/make/config/jogl/gl-if-gl2_es3.cfg b/make/config/jogl/gl-if-gl2_es3.cfg index f44c9b393..112bc5434 100644 --- a/make/config/jogl/gl-if-gl2_es3.cfg +++ b/make/config/jogl/gl-if-gl2_es3.cfg @@ -17,6 +17,7 @@ ExtendedInterfaceSymbolsOnly ../build-temp/gluegen-set/javax/media/opengl/GL2ES3 HierarchicalNativeOutput false Include gl-common.cfg +Include gl-common-gpubufferonly.cfg Include gl-common-extensions.cfg Include gl2_es3-common.cfg Include gl-if-gl2_es3-ignores.cfg diff --git a/make/config/jogl/gl-if-gl2_gl3.cfg b/make/config/jogl/gl-if-gl2_gl3.cfg index 467919328..532a670e6 100644 --- a/make/config/jogl/gl-if-gl2_gl3.cfg +++ b/make/config/jogl/gl-if-gl2_gl3.cfg @@ -16,6 +16,7 @@ ExtendedInterfaceSymbolsOnly ../build-temp/gluegen-set/javax/media/opengl/GL2GL3 HierarchicalNativeOutput false Include gl-common.cfg +Include gl-common-gpubufferonly.cfg Include gl-common-extensions.cfg Include gl-desktop.cfg Include gl3-common.cfg diff --git a/make/config/jogl/gl-if-gl3.cfg b/make/config/jogl/gl-if-gl3.cfg index 09f51d6b0..d472fbc29 100644 --- a/make/config/jogl/gl-if-gl3.cfg +++ b/make/config/jogl/gl-if-gl3.cfg @@ -20,6 +20,7 @@ Extends GL3 GL3ES3 Extends GL3 GL2GL3 ImplPackage jogamp.opengl.gl3 Include gl-common.cfg +Include gl-common-gpubufferonly.cfg Include gl-common-extensions.cfg Include gl3-desktop.cfg Include gl3-common.cfg diff --git a/make/config/jogl/gl-if-gl3bc.cfg b/make/config/jogl/gl-if-gl3bc.cfg index bca3d61e6..5172c726c 100644 --- a/make/config/jogl/gl-if-gl3bc.cfg +++ b/make/config/jogl/gl-if-gl3bc.cfg @@ -34,7 +34,7 @@ Include gl-desktop.cfg Include gl3-desktop.cfg Include gl-if-gl4-ignores.cfg -IncludeAs CustomJavaCode GL2 gl-if-CustomJavaCode-gl_compat.java +IncludeAs CustomJavaCode GL3bc gl3bc-common-cpubufferJavaCode.java # Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums TagNativeBinding true diff --git a/make/config/jogl/gl-if-gl4.cfg b/make/config/jogl/gl-if-gl4.cfg index 4b19b448e..144c10ad2 100644 --- a/make/config/jogl/gl-if-gl4.cfg +++ b/make/config/jogl/gl-if-gl4.cfg @@ -23,6 +23,7 @@ JavaClass GL4 Extends GL4 GL4ES3 Extends GL4 GL3 Include gl-common.cfg +Include gl-common-gpubufferonly.cfg Include gl-common-extensions.cfg Include gl3-desktop.cfg Include gl3-common.cfg diff --git a/make/config/jogl/gl-if-gl4_es3.cfg b/make/config/jogl/gl-if-gl4_es3.cfg index cd9c17f27..6233d530a 100644 --- a/make/config/jogl/gl-if-gl4_es3.cfg +++ b/make/config/jogl/gl-if-gl4_es3.cfg @@ -20,6 +20,7 @@ ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/GLBase.jav HierarchicalNativeOutput false Include gl-common.cfg +Include gl-common-gpubufferonly.cfg Include gl-common-extensions.cfg Include gl2_es3-common.cfg Include gl-if-gl2_es3-ignores.cfg diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles3.java b/make/config/jogl/gl-impl-CustomJavaCode-gles3.java index 5c58f6cc4..38deb3399 100644 --- a/make/config/jogl/gl-impl-CustomJavaCode-gles3.java +++ b/make/config/jogl/gl-impl-CustomJavaCode-gles3.java @@ -48,7 +48,7 @@ public final boolean isGLES1() { @Override public final boolean isGLES2() { - return true; + return !_isES3; } @Override diff --git a/make/config/jogl/gl2-common-cpubufferJavaCode.java b/make/config/jogl/gl2-common-cpubufferJavaCode.java new file mode 100644 index 000000000..50a97b3df --- /dev/null +++ b/make/config/jogl/gl2-common-cpubufferJavaCode.java @@ -0,0 +1,13 @@ + + /** Entry point to C language function: void {@native glDrawElementsInstanced}(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei instancecount);
Part of GL_ES_VERSION_3_0, GL_VERSION_3_1; GL_ARB_draw_instanced + @param indices a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawElementsInstanced(int mode, int count, int type, Buffer indices, int instancecount); + + /** Entry point to C language function: void {@native glDrawRangeElements}(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices);
Part of GL_VERSION_1_2, GL_ES_VERSION_3_0 + @param indices a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawRangeElements(int mode, int start, int end, int count, int type, Buffer indices); + + /** Entry point to C language function: void {@native glVertexAttribIPointer}(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
Part of GL_ES_VERSION_3_0, GL_VERSION_3_0 + @param pointer a direct only {@link java.nio.Buffer} */ + public void glVertexAttribIPointer(int index, int size, int type, int stride, Buffer pointer); + diff --git a/make/config/jogl/gl2_es1-common-cpubufferJavaCode.java b/make/config/jogl/gl2_es1-common-cpubufferJavaCode.java new file mode 100644 index 000000000..39bc141b8 --- /dev/null +++ b/make/config/jogl/gl2_es1-common-cpubufferJavaCode.java @@ -0,0 +1,4 @@ + /** Entry point to C language function: void {@native glDrawElements}(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices);
Part of GL_VERSION_ES_CL_CM, GL_VERSION_1_1, GL_ES_VERSION_2_0 + @param indices a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawElements(int mode, int count, int type, Buffer indices); + diff --git a/make/config/jogl/gl2_es2-common-cpubufferJavaCode.java b/make/config/jogl/gl2_es2-common-cpubufferJavaCode.java new file mode 100644 index 000000000..fe6820e1f --- /dev/null +++ b/make/config/jogl/gl2_es2-common-cpubufferJavaCode.java @@ -0,0 +1,4 @@ + /** Entry point to C language function: void {@native glVertexAttribPointer}(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * ptr);
Part of GL_ES_VERSION_2_0, GL_VERSION_2_0 + @param ptr a direct only {@link java.nio.Buffer} */ + public void glVertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, Buffer ptr); + diff --git a/make/config/jogl/gl3bc-common-cpubufferJavaCode.java b/make/config/jogl/gl3bc-common-cpubufferJavaCode.java new file mode 100644 index 000000000..d5d2ec836 --- /dev/null +++ b/make/config/jogl/gl3bc-common-cpubufferJavaCode.java @@ -0,0 +1,13 @@ + + /** Entry point to C language function: void {@native glDrawElementsBaseVertex}(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex);
Part of GL_ARB_draw_elements_base_vertex, GL_VERSION_3_2 + @param indices a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawElementsBaseVertex(int mode, int count, int type, Buffer indices, int basevertex); + + /** Entry point to C language function: void {@native glDrawElementsInstancedBaseVertex}(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei instancecount, GLint basevertex);
Part of GL_ARB_draw_elements_base_vertex, GL_VERSION_3_2 + @param indices a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawElementsInstancedBaseVertex(int mode, int count, int type, Buffer indices, int instancecount, int basevertex); + + /** Entry point to C language function: void {@native glDrawRangeElementsBaseVertex}(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex);
Part of GL_ARB_draw_elements_base_vertex, GL_VERSION_3_2 + @param indices a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawRangeElementsBaseVertex(int mode, int start, int end, int count, int type, Buffer indices, int basevertex); + diff --git a/make/config/jogl/gl4bc-common-cpubufferJavaCode.java b/make/config/jogl/gl4bc-common-cpubufferJavaCode.java new file mode 100644 index 000000000..a29f540fa --- /dev/null +++ b/make/config/jogl/gl4bc-common-cpubufferJavaCode.java @@ -0,0 +1,21 @@ + + /** Entry point to C language function: void {@native glDrawArraysIndirect}(GLenum mode, const GLvoid * indirect);
Part of GL_VERSION_4_0, GL_ARB_draw_indirect + @param indirect a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawArraysIndirect(int mode, Buffer indirect); + + /** Entry point to C language function: void {@native glDrawElementsIndirect}(GLenum mode, GLenum type, const GLvoid * indirect);
Part of GL_VERSION_4_0, GL_ARB_draw_indirect + @param indirect a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawElementsIndirect(int mode, int type, Buffer indirect); + + /** Entry point to C language function: void {@native glDrawElementsInstancedBaseInstance}(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLuint baseinstance);
Part of GL_VERSION_4_2, GL_ARB_base_instance + @param indices a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawElementsInstancedBaseInstance(int mode, int count, int type, Buffer indices, int instancecount, int baseinstance); + + /** Entry point to C language function: void {@native glDrawElementsInstancedBaseVertexBaseInstance}(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
Part of GL_VERSION_4_2, GL_ARB_base_instance + @param indices a direct or array-backed {@link java.nio.Buffer} */ + public void glDrawElementsInstancedBaseVertexBaseInstance(int mode, int count, int type, Buffer indices, int instancecount, int basevertex, int baseinstance); + + /** Entry point to C language function: void {@native glVertexAttribLPointer}(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
Part of GL_VERSION_4_1, GL_ARB_vertex_attrib_64bit + @param pointer a direct only {@link java.nio.Buffer} */ + public void glVertexAttribLPointer(int index, int size, int type, int stride, Buffer pointer); + -- cgit v1.2.3