summaryrefslogtreecommitdiffstats
path: root/make/config/jogl/gl-es3-impl.cfg
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-10 02:15:56 +0200
committerSven Gothel <[email protected]>2013-10-10 02:15:56 +0200
commit4e83a5df7a851cc33d85f76381f058256906ad4c (patch)
tree9454329d601da72c7e4642491406dac8eed3d4c6 /make/config/jogl/gl-es3-impl.cfg
parente96b2d648e7d69b95325fb6b80c6eb508e1e8a14 (diff)
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 <name>', 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.
Diffstat (limited to 'make/config/jogl/gl-es3-impl.cfg')
-rw-r--r--make/config/jogl/gl-es3-impl.cfg91
1 files changed, 91 insertions, 0 deletions
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 <stdio.h> /* 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 <GLES3/gl3.h>
+CustomCCode #include <GLES3/gl3ext.h>
+CustomCCode #include <GLES2/gl2ext.h>
+CustomCCode #include <stdlib.h>
+
+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
+