aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-20 11:46:26 +0200
committerSven Gothel <[email protected]>2010-04-20 11:46:26 +0200
commit32790c376583beccd030eecd7c56cbe66d380172 (patch)
tree894613c7fc6a598aed59db87e5812ef6a44b83dd /make
parentaa7084700bbf74d8bcc98cf0239f57cff2983423 (diff)
JOGL GL4 preperation (cont):
- All available OpenGL versions (native/platform) are verified at GLProfile initialization and can be queried .. A mapping of major,compat -> major,minor,options is created. - Removal of temp context creation, when creating a context. This was necessary to query general availability of ARB_create_context. Due to the shared context of X11GLXDrawableFactory and WindowsWGLDrawableFactory, this is no more necessary. Due to the version mapping, the ARB_create_context paramters are known. - NativeWindow X11Lib: Added X11ErrorHandler, throwing a RuntimeException. Necessary to catch BadMatch .. etc X11 errors, eg for glXCreateContextAttribsARB Hence all X11 calls are covered now. - X11DummyGLXDrawable needs to use an own Window, otherwise GLn n>2 fails - Flattening the desktop GL* implementation, all use GL4bcImpl, which reduces the footprint dramatically. - GL*Impl.isGL*() (desktop) utilizes the GLContext.isGL*(), hence the results reflect the actual native context version. - GLContextImpl makeCurrent/create: Added workflow documentation, clarified code, defined abstract methods to have a protocol. - Removed moved files (from here to gluegen), see gluegen a01cb3d59715a41153380f1977ec75263b762dc6 - NativeLibLoader -> <TYPE>JNILibLoader - Fixed Exception Handling (as in gluegen bce53b52c8638729750c4286dbc04cb14329fd34), ie removed empty catch Throwable .. - GLContext.setSwapInterval(): Nop in offscreen case, otherwise X11IOError (NVIDIA Bug) Test: Tests - Junit - demos.gears.Gears - demos.jrefract.JRefract Platforms - Linux 64/32 ATI/NVidia - MacOsX - Windows (virtualbox 3.1.6, offscreen failed) TODO/BUGS: - FIXME ATI GLn n>2 with AWT, can't make context current, works well on NVIDIA though - FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available! - Add GL 3.3 to GL3/gl3ext.h - Add GL 4.0 to GL3/gl3ext.h and fix the GL3/GL4 seperation - Rename jogl.gl2.jar -> jogl.gldesktop.jar (as done with it's native lib already)
Diffstat (limited to 'make')
-rw-r--r--make/build-jogl.xml133
-rw-r--r--make/build-junit.xml18
-rw-r--r--make/build-nativewindow.xml14
-rwxr-xr-xmake/config/jogl/cg-common-CustomJavaCode.java2
-rw-r--r--make/config/jogl/gl-gl2.cfg48
-rw-r--r--make/config/jogl/gl-gl3.cfg43
-rw-r--r--make/config/jogl/gl-gl3bc.cfg64
-rw-r--r--make/config/jogl/gl-gl4.cfg37
-rw-r--r--make/config/jogl/gl-gl4bc.cfg110
-rw-r--r--make/config/jogl/gl-impl-CustomCCode-gl4bc.c (renamed from make/config/jogl/gl-impl-CustomCCode-gl3bc.c)8
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-common.java74
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-desktop.java250
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gl4.java (renamed from make/config/jogl/gl-impl-CustomJavaCode-gl3.java)129
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java (renamed from make/config/jogl/gl-impl-CustomJavaCode-gl3bc.java)133
-rwxr-xr-xmake/config/jogl/gl-impl-CustomJavaCode-gles1.java41
-rwxr-xr-xmake/config/jogl/gl-impl-CustomJavaCode-gles2.java41
-rw-r--r--make/config/jogl/gl3-common.cfg3
-rw-r--r--make/config/jogl/gl4-common.cfg5
-rw-r--r--make/config/jogl/gl4-desktop-tracker.cfg (renamed from make/config/jogl/gl3-desktop-tracker.cfg)0
-rwxr-xr-xmake/config/jogl/glu-CustomJavaCode-base.java4
-rwxr-xr-xmake/config/jogl/glu-CustomJavaCode-gl2es1.java2
-rw-r--r--make/config/jogl/glu-common.cfg2
-rw-r--r--make/config/jogl/obsolete/gl-gl2es12.cfg (renamed from make/config/jogl/gl-gl2es12.cfg)0
-rw-r--r--make/config/jogl/obsolete/gl-impl-CustomCCode-gl2.c (renamed from make/config/jogl/gl-impl-CustomCCode-gl2.c)0
-rw-r--r--make/config/jogl/obsolete/gl-impl-CustomCCode-gl2es12.c (renamed from make/config/jogl/gl-impl-CustomCCode-gl2es12.c)0
-rw-r--r--make/config/jogl/obsolete/gl-impl-CustomCCode-gl3.c (renamed from make/config/jogl/gl-impl-CustomCCode-gl3.c)0
-rw-r--r--make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2.java (renamed from make/config/jogl/gl-impl-CustomJavaCode-gl2.java)129
-rw-r--r--make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2es12.java (renamed from make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java)102
-rw-r--r--make/config/nativewindow/x11-CustomJavaCode.java3
-rw-r--r--make/stub_includes/opengl/gl4.c10
-rw-r--r--make/stub_includes/opengl/gl4bc.c18
31 files changed, 521 insertions, 902 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index d42b859bd..6d95ebea8 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -104,9 +104,6 @@
<property name="java.part.cgl"
value="com/jogamp/opengl/impl/macosx/cgl/*"/>
- <property name="java.part.gl2es12"
- value="com/jogamp/opengl/impl/gl2es12/**"/>
-
<property name="java.part.gl4"
value="com/jogamp/opengl/impl/**/gl4/**"/>
@@ -508,12 +505,24 @@
</gluegen>
</target>
- <target name="java.generate.gl2es12">
- <echo message="Generating GL2ES12 implementation" />
+ <target name="java.generate.gl4">
+ <echo message="Generating GL4 interface and implementation" />
+ <antcall target="java.generate.copy2temp" inheritRefs="true" />
+ <gluegen src="${stub.includes.opengl}/gl4.c"
+ outputRootDir="${build.jogl}"
+ config="${config.jogl}/gl-gl4.cfg"
+ includeRefid="stub.includes.fileset.all.gl2"
+ emitter="com.sun.gluegen.opengl.GLEmitter">
+ <classpath refid="gluegen.classpath" />
+ </gluegen>
+ </target>
+
+ <target name="java.generate.gl4bc">
+ <echo message="Generating GL4bc implementation" />
<antcall target="java.generate.copy2temp" inheritRefs="true" />
- <gluegen src="${stub.includes.opengl}/gl2es12.c"
+ <gluegen src="${stub.includes.opengl}/gl4bc.c"
outputRootDir="${build.jogl}"
- config="${config.jogl}/gl-gl2es12.cfg"
+ config="${config.jogl}/gl-gl4bc.cfg"
includeRefid="stub.includes.fileset.all.gl2"
emitter="com.sun.gluegen.opengl.GLEmitter">
<classpath refid="gluegen.classpath" />
@@ -544,7 +553,7 @@
</gluegen>
</target>
- <target name="java.generate.gl.all" depends="java.generate.gl_if, java.generate.gl2_es1_if, java.generate.gl2_es2_if, java.generate.gl2_gl3_if, java.generate.gl2, java.generate.gl3, java.generate.gl3bc, java.generate.gl2es12, java.generate.gles1, java.generate.gles2"/>
+ <target name="java.generate.gl.all" depends="java.generate.gl_if, java.generate.gl2_es1_if, java.generate.gl2_es2_if, java.generate.gl2_gl3_if, java.generate.gl2, java.generate.gl3, java.generate.gl3bc, java.generate.gl4, java.generate.gl4bc, java.generate.gles1, java.generate.gles2"/>
<!-- target name="java.generate.gl.nsig" if="gluegen.nsig">
<echo message="Generating GL interface and implementation" />
@@ -781,21 +790,6 @@
</target>
- <target name="java.generate.composable.pipeline.check.gl2es12">
- <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
- (the uptodate element doesn't support arbitrary source and destination files) -->
- <dependset>
- <srcfilelist dir="${classes}/javax/media/opengl" files="GL2ES12.class" />
- <targetfileset dir="${src.generated.java}/javax/media/opengl"
- includes="DebugGL2ES12.java,TraceGL2ES12.java" />
- </dependset>
-
- <!-- Now choose one of the two to test to see if we have to regenerate -->
- <uptodate property="java.generate.composable.pipeline.skip.gl2es12"
- srcfile="${classes}/javax/media/opengl/GL2ES12.class"
- targetfile="${src.generated.java}/javax/media/opengl/DebugGL2ES12.java" />
- </target>
-
<target name="java.generate.composable.pipeline.check.gl2">
<!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
(the uptodate element doesn't support arbitrary source and destination files) -->
@@ -826,6 +820,21 @@
targetfile="${src.generated.java}/javax/media/opengl/DebugGL3.java" />
</target>
+ <target name="java.generate.composable.pipeline.check.gl4">
+ <!-- Blow away the DebugGL*.java and TraceGL*.java sources if GL*.class has changed
+ (the uptodate element doesn't support arbitrary source and destination files) -->
+ <dependset>
+ <srcfilelist dir="${classes}/javax/media/opengl" files="GL4.class" />
+ <targetfileset dir="${src.generated.java}/javax/media/opengl"
+ includes="DebugGL4.java,TraceGL4.java,DebugGL4bc.java,TraceGL4bc.java" />
+ </dependset>
+
+ <!-- Now choose one of the two to test to see if we have to regenerate -->
+ <uptodate property="java.generate.composable.pipeline.skip.gl4"
+ srcfile="${classes}/javax/media/opengl/GL4.class"
+ targetfile="${src.generated.java}/javax/media/opengl/DebugGL4.java" />
+ </target>
+
<target name="java.generate.composable.pipeline.es1" depends="java.generate.composable.pipeline.check.es1" unless="java.generate.composable.pipeline.skip.es1">
<java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
<arg value="javax.media.opengl.GLES1" />
@@ -899,7 +908,29 @@
</copy>
</target>
- <target name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.es1, java.generate.composable.pipeline.es2, java.generate.composable.pipeline.gl2, java.generate.composable.pipeline.gl3">
+ <target name="java.generate.composable.pipeline.gl4" depends="java.generate.composable.pipeline.check.gl4" unless="java.generate.composable.pipeline.skip.gl4">
+ <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
+ <arg value="javax.media.opengl.GL4" />
+ <arg value="${src.generated.java}/javax/media/opengl" />
+ <classpath refid="pipeline.classpath" />
+ </java>
+ <copy todir="${src.generated.java-cdc}">
+ <fileset dir="${src.generated.java}"
+ includes="javax/media/opengl/DebugGL4.java javax/media/opengl/TraceGL4.java" />
+ </copy>
+
+ <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true">
+ <arg value="javax.media.opengl.GL4bc" />
+ <arg value="${src.generated.java}/javax/media/opengl" />
+ <classpath refid="pipeline.classpath" />
+ </java>
+ <copy todir="${src.generated.java-cdc}">
+ <fileset dir="${src.generated.java}"
+ includes="javax/media/opengl/DebugGL4bc.java javax/media/opengl/TraceGL4bc.java" />
+ </copy>
+ </target>
+
+ <target name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.es1, java.generate.composable.pipeline.es2, java.generate.composable.pipeline.gl2, java.generate.composable.pipeline.gl3, java.generate.composable.pipeline.gl4">
</target>
<target name="java.generate.composable.pipeline.custom.check.glfixfunc">
@@ -1259,9 +1290,7 @@
<include name="${rootrel.src.c.openmax}/omx_tool.c" if="useOpenMAX"/>
<include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c" if="useOpenMAX"/>
- <include name="${rootrel.generated.c.jogl}/gl2/GL2Impl_JNI.c"/>
- <include name="${rootrel.generated.c.jogl}/gl3/GL3Impl_JNI.c"/>
- <include name="${rootrel.generated.c.jogl}/gl3/GL3bcImpl_JNI.c"/>
+ <include name="${rootrel.generated.c.jogl}/gl4/GL4bcImpl_JNI.c"/>
<!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
<include name="${rootrel.generated.c.jogl}/gl2/GLUgl2_JNI.c"/>
<include name="${rootrel.generated.c.jogl}/X11/GLX*.c" if="isX11"/>
@@ -1269,24 +1298,6 @@
<include name="${rootrel.generated.c.jogl}/Windows/WGL*.c" if="isWindows"/>
</patternset>
- <patternset id="c.src.files.jogl.gl2es12">
- <include name="${rootrel.src.c}/macosx/MacOSXCustomCGLCode.c" if="isOSX"/>
- <include name="${rootrel.src.c}/macosx/MacOSXWindowSystemInterface.m" if="isOSX"/>
- <include name="${rootrel.src.c}/macosx/ContextUpdater.m" if="isOSX"/>
- <include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
- <!-- FIXME: the Mixer should be moved to another library -->
- <!--include name="${rootrel.src.c}/Mixer.cpp" if="isWindows"/-->
- <include name="${rootrel.src.c.openmax}/omx_tool.c" if="useOpenMAX"/>
- <include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c" if="useOpenMAX"/>
-
- <include name="${rootrel.generated.c.jogl}/gl2es12/GL2ES12Impl_JNI.c"/>
- <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
- <!--include name="${rootrel.generated.c.jogl}/gl2es12/GLUgl2es12_JNI.c"/ SKIPPED -->
- <include name="${rootrel.generated.c.jogl}/X11/GLX*.c" if="isX11"/>
- <include name="${rootrel.generated.c.jogl}/MacOSX/CGL*.c" if="isOSX"/>
- <include name="${rootrel.generated.c.jogl}/Windows/WGL*.c" if="isWindows"/>
- </patternset>
-
<patternset id="c.src.files.jogl.es2">
<include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
<include name="${rootrel.src.c.openmax}/omx_tool.c" if="useOpenMAX"/>
@@ -1393,13 +1404,6 @@
linker.cfg.id="${linker.cfg.id.gl2}"/>
</target>
- <target name="c.build.jogl.gl2es12" unless="setup.nodesktop">
- <c.build c.compiler.src.files="c.src.files.jogl.gl2es12"
- output.lib.name="jogl_gl2es12"
- compiler.cfg.id="${compiler.cfg.id}"
- linker.cfg.id="${linker.cfg.id.gl2}"/>
- </target>
-
<target name="c.build.jogl.es2">
<c.build c.compiler.src.files="c.src.files.jogl.es2"
output.lib.name="jogl_es2"
@@ -1430,11 +1434,10 @@
<msvc.manifest objdir="${obj.jogl}" dllname="jogl_es1" />
<msvc.manifest objdir="${obj.jogl}" dllname="jogl_es2" />
<msvc.manifest objdir="${obj.jogl}" dllname="jogl_gl2" />
- <msvc.manifest objdir="${obj.jogl}" dllname="jogl_gl2es12" />
<antcall target="c.manifest.cg" inheritRefs="true" />
</target>
- <target name="c.build.jogl" depends="c.configure,c.build.jogl.prepare,c.build.jogl.gl2es12,c.build.jogl.desktop,c.build.jogl.es2,c.build.jogl.es1,c.build.jogl.cg">
+ <target name="c.build.jogl" depends="c.configure,c.build.jogl.prepare,c.build.jogl.desktop,c.build.jogl.es2,c.build.jogl.es1,c.build.jogl.cg">
<antcall target="gluegen.cpptasks.striplibs" inheritRefs="true">
<param name="libdir" value="${obj.jogl}"/>
</antcall>
@@ -1450,7 +1453,6 @@
<fileset dir="${obj.jogl}">
<include name="*_es1.${native.library.suffix-cdc}" />
<include name="*_es2.${native.library.suffix-cdc}" />
- <include name="*_gl2es12.${native.library.suffix-cdc}" />
</fileset>
</jar>
</target>
@@ -1528,14 +1530,7 @@
</jar>
</target>
- <target name="build-jars-es-desktop-javase" depends="setup-manifestfile,build-jars-os-desktop-javase" unless="setup.nodesktop">
- <jar manifest="${build.jogl}/tempversion" destfile="${jogl.gl2es12.jar}" filesonly="true">
- <fileset dir="${classes}" includes="${java.part.gl2es12}, ${java.part.openmax}"
- excludes="${java.part.glugl2}"/>
- </jar>
- </target>
-
- <target name="build-jars-es-javase" depends="setup-manifestfile,build-jars-es-desktop-javase">
+ <target name="build-jars-es-javase" depends="setup-manifestfile">
<jar manifest="${build.jogl}/tempversion" destfile="${jogl.egl.jar}" filesonly="true">
<fileset dir="${classes}"
includes="${java.part.egl}"
@@ -1573,15 +1568,7 @@
</jar>
</target>
- <target name="build-jars-es-desktop-cdc" depends="setup-manifestfile-cdc,build-jars-os-desktop-cdc" unless="setup.nodesktop">
- <jar manifest="${build.jogl}/tempversion-cdc" destfile="${jogl.gl2es12.cdc.jar}" filesonly="true">
- <fileset dir="${classes-cdc}"
- includes="${java.part.gl2es12}, ${java.part.openmax}"
- excludes="${java.part.glugl2}"/>
- </jar>
- </target>
-
- <target name="build-jars-es-cdc" depends="setup-manifestfile-cdc,build-jars-es-desktop-cdc" unless="setup.noCDC">
+ <target name="build-jars-es-cdc" depends="setup-manifestfile-cdc" unless="setup.noCDC">
<jar manifest="${build.jogl}/tempversion-cdc" destfile="${jogl.egl.cdc.jar}" filesonly="true">
<fileset dir="${classes-cdc}"
includes="${java.part.egl}"
@@ -1645,7 +1632,7 @@
<target name="build-jars-all-cdc" depends="setup-manifestfile">
<jar manifest="${build.jogl}/tempversion-cdc" destfile="${jogl.all.cdc.jar}" filesonly="true">
<fileset dir="${classes-cdc}"
- includes="${java.part.core} ${java.part.egl} ${java.part.glutess} ${java.part.glumipmap} ${java.part.openmax} ${java.part.sdk} ${java.part.glx} ${java.part.cgl} ${java.part.gl2es12} ${java.part.wgl} ${java.part.es1} ${java.part.es1.dbg} ${java.part.es2} ${java.part.es2.dbg} ${java.part.util} ${java.part.util.glsl} ${java.part.util.fixedfuncemu}"
+ includes="${java.part.core} ${java.part.egl} ${java.part.glutess} ${java.part.glumipmap} ${java.part.openmax} ${java.part.sdk} ${java.part.glx} ${java.part.cgl} ${java.part.wgl} ${java.part.es1} ${java.part.es1.dbg} ${java.part.es2} ${java.part.es2.dbg} ${java.part.util} ${java.part.util.glsl} ${java.part.util.fixedfuncemu}"
excludes="${java.excludes.cdcfp}"/>
<fileset dir="${src.java}"
includes="${java.part.util.fixedfuncemu.shadercode}"/>
diff --git a/make/build-junit.xml b/make/build-junit.xml
index 887060084..ebf3f683e 100644
--- a/make/build-junit.xml
+++ b/make/build-junit.xml
@@ -81,6 +81,24 @@
<condition property="jvmarg.newt" value="-XstartOnFirstThread -Djava.awt.headless=true"><isset property="isOSX"/></condition>
<condition property="jvmarg.newt" value="-Djava.awt.headless=true"><not><isset property="isOSX"/></not></condition>
+ <!-- Test*CORE* -->
+ <junit forkmode="once" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
+ <env key="${system.env.library.path}" path="${obj.all.paths}"/>
+ <jvmarg value="-Djava.library.path=${obj.all.paths}"/>
+
+ <formatter usefile="false" type="plain"/>
+ <formatter usefile="true" type="xml"/>
+ <classpath refid="junit_jogl_newt.run.classpath"/>
+
+ <batchtest todir="${results.junit}">
+ <fileset dir="${classes}">
+ <include name="${java.dir.test}/**/Test*CORE*"/>
+ </fileset>
+ <formatter usefile="false" type="brief"/>
+ <formatter usefile="true" type="xml"/>
+ </batchtest>
+ </junit>
+
<!-- Test*NEWT*
Emulation of junit task,
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index 4b726bafb..8d1639502 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -517,10 +517,6 @@
</and>
</condition>
- <patternset id="c.src.files.jvm">
- <include name="${rootrel.src.c}/JVM*.c"/>
- </patternset>
-
<patternset id="c.src.files.awt">
<include name="${rootrel.src.c}/JAWT*.c"/>
<include name="${rootrel.generated.c}/X11/JAWT*.c" if="isX11"/>
@@ -608,13 +604,6 @@
</apply>
</target>
- <target name="c.build.nativewindow.jvm">
- <c.build c.compiler.src.files="c.src.files.jvm"
- output.lib.name="nativewindow_jvm"
- compiler.cfg.id="${compiler.cfg.id}"
- linker.cfg.id="${linker.cfg.id.base}"/>
- </target>
-
<target name="c.build.nativewindow.awt" unless="setup.noNativeAWT">
<c.build c.compiler.src.files="c.src.files.awt"
c.compiler.use-jawt="true"
@@ -636,11 +625,10 @@
<target name="c.manifest" if="isVC8Family">
<!-- exec mt, the Microsoft Manifest Tool, to include DLL manifests in order to resolve the location of msvcr80.dll -->
- <msvc.manifest objdir="${obj.nativewindow}" dllname="nativewindow_jvm" />
<msvc.manifest objdir="${obj.nativewindow}" dllname="nativewindow_awt" />
</target>
- <target name="c.build.nativewindow" depends="c.configure,c.build.nativewindow.windowlib,c.build.nativewindow.jvm,c.build.nativewindow.awt">
+ <target name="c.build.nativewindow" depends="c.configure,c.build.nativewindow.windowlib,c.build.nativewindow.awt">
<antcall target="gluegen.cpptasks.striplibs" inheritRefs="true">
<param name="libdir" value="${obj.nativewindow}"/>
</antcall>
diff --git a/make/config/jogl/cg-common-CustomJavaCode.java b/make/config/jogl/cg-common-CustomJavaCode.java
index 974e24bf4..d1e4f8bf5 100755
--- a/make/config/jogl/cg-common-CustomJavaCode.java
+++ b/make/config/jogl/cg-common-CustomJavaCode.java
@@ -1,5 +1,5 @@
static {
- com.jogamp.opengl.impl.NativeLibLoader.loadCgImpl();
+ com.jogamp.opengl.impl.GLJNILibLoader.loadCgImpl();
}
/** A convenience method which reads all available data from the InputStream and then calls cgCreateProgram. */
diff --git a/make/config/jogl/gl-gl2.cfg b/make/config/jogl/gl-gl2.cfg
index 37452d159..48dd8eda6 100644
--- a/make/config/jogl/gl-gl2.cfg
+++ b/make/config/jogl/gl-gl2.cfg
@@ -12,72 +12,32 @@ ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/fixedfunc/
ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/fixedfunc/GLLightingFunc.java
Package javax.media.opengl
-Style InterfaceAndImpl
+Style InterfaceOnly
JavaClass GL2
Extends GL2 GLBase
Extends GL2 GL
Extends GL2 GL2ES1
Extends GL2 GL2ES2
Extends GL2 GL2GL3
-ImplPackage com.jogamp.opengl.impl.gl2
-ImplJavaClass GL2Impl
-Implements GL2Impl GLBase
-Implements GL2Impl GL
-Implements GL2Impl GL2ES1
-Implements GL2Impl GL2ES2
-Implements GL2Impl GL2GL3
Include gl-common.cfg
Include gl-common-extensions.cfg
Include gl-desktop.cfg
-EmitProcAddressTable true
-ProcAddressTableClassName GL2ProcAddressTable
-GetProcAddressTableExpr ((GL2ProcAddressTable)_context.getGLProcAddressTable())
-
# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
TagNativeBinding true
# Ignore extensions that are already picked up via the GL2ES1 interface
IgnoreExtension GL_EXT_point_parameters
-# Add PixelStorei StateTracker
-#
-CustomJavaCode GL2Impl private static final int params_offset = 0; // just a helper for JavaPrologue ..
-
-JavaPrologue glPixelStorei glStateTracker.setInt(pname, param);
-
-JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offset) ) { return; }
-
CustomJavaCode GL2 public boolean glIsPBOPackEnabled();
CustomJavaCode GL2 public boolean glIsPBOUnpackEnabled();
IncludeAs CustomJavaCode GL2 gl-if-CustomJavaCode-gl2.java
-CustomJavaCode GL2Impl public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar) {
-CustomJavaCode GL2Impl glFrustum((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
-
-CustomJavaCode GL2Impl public void glOrthof(float left, float right, float bottom, float top, float zNear, float zFar) {
-CustomJavaCode GL2Impl glOrtho((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
-
-CustomJavaCode GL2Impl public void glClearDepthf(float depth) {
-CustomJavaCode GL2Impl glClearDepth((double)depth); }
-
-CustomJavaCode GL2Impl public void glDepthRangef(float zNear, float zFar) {
-CustomJavaCode GL2Impl glDepthRange((double)zNear, (double)zFar); }
-
Include gl-headers.cfg
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-desktop.java
-IncludeAs CustomJavaCode GL2Impl gl-impl-CustomJavaCode-gl2_es2.java
-IncludeAs CustomCCode gl-impl-CustomCCode-gl2.c
+EmitProcAddressTable false
+ProcAddressTableClassName DontGenerateProcAddressTableStuff
+GetProcAddressTableExpr DontGenerateProcAddressTableStuff
-Import javax.media.opengl.GLES1
-Import javax.media.opengl.GLES2
-Import javax.media.opengl.GL2
-Import javax.media.opengl.GLArrayData
-Import javax.media.opengl.GLUniformData
-Import com.jogamp.opengl.impl.InternalBufferUtil
-Import java.io.PrintStream
diff --git a/make/config/jogl/gl-gl3.cfg b/make/config/jogl/gl-gl3.cfg
index 0bfe2cc38..d5e0003d4 100644
--- a/make/config/jogl/gl-gl3.cfg
+++ b/make/config/jogl/gl-gl3.cfg
@@ -8,7 +8,7 @@ ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/G
ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/GLBase.java
Package javax.media.opengl
-Style InterfaceAndImpl
+Style InterfaceOnly
JavaClass GL3
Extends GL3 GLBase
Extends GL3 GL
@@ -27,48 +27,15 @@ Include gl3-desktop.cfg
IncludeAs CustomJavaCode GL3 gl-if-CustomJavaCode-gl3.java
-EmitProcAddressTable true
-ProcAddressTableClassName GL3ProcAddressTable
-GetProcAddressTableExpr ((GL3ProcAddressTable)_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 APIENTRY
-LocalProcAddressCallingConvention __ALL__ APIENTRY
+EmitProcAddressTable false
# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
TagNativeBinding true
-# Add PixelStorei StateTracker
-#
-CustomJavaCode GL3Impl private static final int params_offset = 0; // just a helper for JavaPrologue ..
-
-JavaPrologue glPixelStorei glStateTracker.setInt(pname, param);
-
-JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offset) ) { return; }
-
-CustomJavaCode GL3Impl public void glClearDepthf(float depth) {
-CustomJavaCode GL3Impl glClearDepth((double)depth); }
-
-CustomJavaCode GL3Impl public void glDepthRangef(float zNear, float zFar) {
-CustomJavaCode GL3Impl glDepthRange((double)zNear, (double)zFar); }
-
Include gl3-headers.cfg
Include ../intptr.cfg
-IncludeAs CustomJavaCode GL3Impl gl-impl-CustomJavaCode-common.java
-IncludeAs CustomJavaCode GL3Impl gl-impl-CustomJavaCode-gl3.java
-IncludeAs CustomJavaCode GL3Impl gl-impl-CustomJavaCode-desktop.java
-IncludeAs CustomJavaCode GL3Impl gl-impl-CustomJavaCode-gl2_es2.java
-IncludeAs CustomCCode gl-impl-CustomCCode-gl3.c
+EmitProcAddressTable false
+ProcAddressTableClassName DontGenerateProcAddressTableStuff
+GetProcAddressTableExpr DontGenerateProcAddressTableStuff
-Import javax.media.opengl.GLES2
-Import javax.media.opengl.GL3
-Import javax.media.opengl.GLArrayData
-Import javax.media.opengl.GLUniformData
-Import com.jogamp.opengl.impl.InternalBufferUtil
-Import java.io.PrintStream
diff --git a/make/config/jogl/gl-gl3bc.cfg b/make/config/jogl/gl-gl3bc.cfg
index 7bba2f635..7c53ea8d6 100644
--- a/make/config/jogl/gl-gl3bc.cfg
+++ b/make/config/jogl/gl-gl3bc.cfg
@@ -14,7 +14,7 @@ ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/fixedfunc/
ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/fixedfunc/GLLightingFunc.java
Package javax.media.opengl
-Style InterfaceAndImpl
+Style InterfaceOnly
JavaClass GL3bc
Extends GL3bc GLBase
Extends GL3bc GL
@@ -23,15 +23,6 @@ Extends GL3bc GL2ES2
Extends GL3bc GL2GL3
Extends GL3bc GL2
Extends GL3bc GL3
-ImplPackage com.jogamp.opengl.impl.gl3
-ImplJavaClass GL3bcImpl
-Implements GL3bcImpl GLBase
-Implements GL3bcImpl GL
-Implements GL3bcImpl GL2ES1
-Implements GL3bcImpl GL2ES2
-Implements GL3bcImpl GL2GL3
-Implements GL3bcImpl GL2
-Implements GL3bcImpl GL3
Include gl-common.cfg
Include gl-common-extensions.cfg
@@ -39,64 +30,17 @@ Include gl-desktop.cfg
Include gl3-common.cfg
Include gl3-desktop.cfg
-# Because we're manually implementing glMapBuffer but only producing
-# the implementing class, GlueGen doesn't notice that it has to emit a
-# proc address table entry for it. Force it to here.
-ForceProcAddressGen glMapBuffer
-
-# 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 APIENTRY
-LocalProcAddressCallingConvention __ALL__ APIENTRY
-
-EmitProcAddressTable true
-ProcAddressTableClassName GL3bcProcAddressTable
-GetProcAddressTableExpr ((GL3bcProcAddressTable)_context.getGLProcAddressTable())
-
# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
TagNativeBinding true
# Ignore extensions that are already picked up via the GL2ES1 interface
IgnoreExtension GL_EXT_point_parameters
-# Add PixelStorei StateTracker
-CustomJavaCode GL3bcImpl private static final int params_offset = 0; // just a helper for JavaPrologue ..
-
-JavaPrologue glPixelStorei glStateTracker.setInt(pname, param);
-
-JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offset) ) { return; }
-
-CustomJavaCode GL3bcImpl public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar) {
-CustomJavaCode GL3bcImpl glFrustum((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
-
-CustomJavaCode GL3bcImpl public void glOrthof(float left, float right, float bottom, float top, float zNear, float zFar) {
-CustomJavaCode GL3bcImpl glOrtho((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
-
-CustomJavaCode GL3bcImpl public void glClearDepthf(float depth) {
-CustomJavaCode GL3bcImpl glClearDepth((double)depth); }
-
-CustomJavaCode GL3bcImpl public void glDepthRangef(float zNear, float zFar) {
-CustomJavaCode GL3bcImpl glDepthRange((double)zNear, (double)zFar); }
-
Include gl-headers.cfg
Include gl3ext-headers.cfg
Include ../intptr.cfg
-IncludeAs CustomJavaCode GL3bcImpl gl-impl-CustomJavaCode-common.java
-IncludeAs CustomJavaCode GL3bcImpl gl-impl-CustomJavaCode-gl3bc.java
-IncludeAs CustomJavaCode GL3bcImpl gl-impl-CustomJavaCode-desktop.java
-IncludeAs CustomJavaCode GL3bcImpl gl-impl-CustomJavaCode-gl2_es2.java
-IncludeAs CustomCCode gl-impl-CustomCCode-gl3bc.c
+EmitProcAddressTable false
+ProcAddressTableClassName DontGenerateProcAddressTableStuff
+GetProcAddressTableExpr DontGenerateProcAddressTableStuff
-Import javax.media.opengl.GLES1
-Import javax.media.opengl.GLES2
-Import javax.media.opengl.GL2GL3
-Import javax.media.opengl.GL2
-Import javax.media.opengl.GL3
-Import javax.media.opengl.GL3bc
-Import com.jogamp.opengl.impl.InternalBufferUtil
-Import java.io.PrintStream
diff --git a/make/config/jogl/gl-gl4.cfg b/make/config/jogl/gl-gl4.cfg
new file mode 100644
index 000000000..1d4392899
--- /dev/null
+++ b/make/config/jogl/gl-gl4.cfg
@@ -0,0 +1,37 @@
+# This .cfg file is used to generate the GL interface and implementing class.
+JavaOutputDir gensrc/classes
+NativeOutputDir gensrc/native/jogl/gl4
+
+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/GL2GL3.java
+ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL3.java
+ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/GLBase.java
+
+Package javax.media.opengl
+Style InterfaceOnly
+JavaClass GL4
+Extends GL4 GLBase
+Extends GL4 GL
+Extends GL4 GL2ES2
+Extends GL4 GL2GL3
+Extends GL4 GL3
+Include gl-common.cfg
+Include gl-common-extensions.cfg
+Include gl3-common.cfg
+Include gl4-common.cfg
+Include gl3-desktop.cfg
+
+IncludeAs CustomJavaCode GL4 gl-if-CustomJavaCode-gl3.java
+
+EmitProcAddressTable false
+ProcAddressTableClassName DontGenerateProcAddressTableStuff
+GetProcAddressTableExpr DontGenerateProcAddressTableStuff
+
+
+# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
+TagNativeBinding true
+
+Include gl3-headers.cfg
+Include ../intptr.cfg
+
diff --git a/make/config/jogl/gl-gl4bc.cfg b/make/config/jogl/gl-gl4bc.cfg
new file mode 100644
index 000000000..3a3e02041
--- /dev/null
+++ b/make/config/jogl/gl-gl4bc.cfg
@@ -0,0 +1,110 @@
+# This .cfg file is used to generate the GL interface and implementing class.
+JavaOutputDir gensrc/classes
+NativeOutputDir gensrc/native/jogl/gl4
+
+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/GL2GL3.java
+ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL2.java
+ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL3.java
+ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL4.java
+ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/javax/media/opengl/GL3bc.java
+ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/GLBase.java
+ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java
+ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFunc.java
+ExtendedInterfaceSymbolsIgnore ../src/jogl/classes/javax/media/opengl/fixedfunc/GLLightingFunc.java
+
+Package javax.media.opengl
+Style InterfaceAndImpl
+JavaClass GL4bc
+Extends GL4bc GLBase
+Extends GL4bc GL
+Extends GL4bc GL2ES1
+Extends GL4bc GL2ES2
+Extends GL4bc GL2GL3
+Extends GL4bc GL2
+Extends GL4bc GL3
+Extends GL4bc GL3bc
+Extends GL4bc GL4
+ImplPackage com.jogamp.opengl.impl.gl4
+ImplJavaClass GL4bcImpl
+Implements GL4bcImpl GLBase
+Implements GL4bcImpl GL
+Implements GL4bcImpl GL2ES1
+Implements GL4bcImpl GL2ES2
+Implements GL4bcImpl GL2GL3
+Implements GL4bcImpl GL2
+Implements GL4bcImpl GL3
+Implements GL4bcImpl GL3bc
+Implements GL4bcImpl GL4
+
+Include gl-common.cfg
+Include gl-common-extensions.cfg
+Include gl-desktop.cfg
+Include gl3-common.cfg
+Include gl4-common.cfg
+Include gl3-desktop.cfg
+
+# Because we're manually implementing glMapBuffer but only producing
+# the implementing class, GlueGen doesn't notice that it has to emit a
+# proc address table entry for it. Force it to here.
+ForceProcAddressGen glMapBuffer
+
+# 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 APIENTRY
+LocalProcAddressCallingConvention __ALL__ APIENTRY
+
+EmitProcAddressTable true
+ProcAddressTableClassName GL4bcProcAddressTable
+GetProcAddressTableExpr ((GL4bcProcAddressTable)_context.getGLProcAddressTable())
+
+# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
+TagNativeBinding true
+
+# Ignore extensions that are already picked up via the GL2ES1 interface
+IgnoreExtension GL_EXT_point_parameters
+
+# Add PixelStorei StateTracker
+CustomJavaCode GL4bcImpl private static final int params_offset = 0; // just a helper for JavaPrologue ..
+
+JavaPrologue glPixelStorei glStateTracker.setInt(pname, param);
+
+JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offset) ) { return; }
+
+CustomJavaCode GL4bcImpl public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar) {
+CustomJavaCode GL4bcImpl glFrustum((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
+
+CustomJavaCode GL4bcImpl public void glOrthof(float left, float right, float bottom, float top, float zNear, float zFar) {
+CustomJavaCode GL4bcImpl glOrtho((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
+
+CustomJavaCode GL4bcImpl public void glClearDepthf(float depth) {
+CustomJavaCode GL4bcImpl glClearDepth((double)depth); }
+
+CustomJavaCode GL4bcImpl public void glDepthRangef(float zNear, float zFar) {
+CustomJavaCode GL4bcImpl glDepthRange((double)zNear, (double)zFar); }
+
+Include gl-headers.cfg
+Include gl3ext-headers.cfg
+Include ../intptr.cfg
+
+IncludeAs CustomJavaCode GL4bcImpl gl-impl-CustomJavaCode-common.java
+IncludeAs CustomJavaCode GL4bcImpl gl-impl-CustomJavaCode-gl4bc.java
+IncludeAs CustomJavaCode GL4bcImpl gl-impl-CustomJavaCode-desktop.java
+IncludeAs CustomJavaCode GL4bcImpl gl-impl-CustomJavaCode-gl2_es2.java
+IncludeAs CustomCCode gl-impl-CustomCCode-gl4bc.c
+
+Import javax.media.opengl.GLES1
+Import javax.media.opengl.GLES2
+Import javax.media.opengl.GL2GL3
+Import javax.media.opengl.GL2
+Import javax.media.opengl.GL3
+Import javax.media.opengl.GL3bc
+Import javax.media.opengl.GL4
+Import com.jogamp.opengl.impl.InternalBufferUtil
+Import java.io.PrintStream
diff --git a/make/config/jogl/gl-impl-CustomCCode-gl3bc.c b/make/config/jogl/gl-impl-CustomCCode-gl4bc.c
index 21de8c925..bcda20fa4 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gl3bc.c
+++ b/make/config/jogl/gl-impl-CustomCCode-gl4bc.c
@@ -1,10 +1,10 @@
/* Java->C glue code:
- * Java package: com.jogamp.opengl.impl.gl3.GL3bcImpl
+ * Java package: com.jogamp.opengl.impl.gl4.GL4bcImpl
* Java method: long dispatch_glMapBuffer(int target, int access)
* C function: void * glMapBuffer(GLenum target, GLenum access);
*/
JNIEXPORT jlong JNICALL
-Java_com_jogamp_opengl_impl_gl3_GL3bcImpl_dispatch_1glMapBuffer(JNIEnv *env, jobject _unused, jint target, jint access, jlong glProcAddress) {
+Java_com_jogamp_opengl_impl_gl4_GL4bcImpl_dispatch_1glMapBuffer(JNIEnv *env, jobject _unused, jint target, jint access, jlong glProcAddress) {
PFNGLMAPBUFFERPROC ptr_glMapBuffer;
void * _res;
ptr_glMapBuffer = (PFNGLMAPBUFFERPROC) (intptr_t) glProcAddress;
@@ -14,11 +14,11 @@ Java_com_jogamp_opengl_impl_gl3_GL3bcImpl_dispatch_1glMapBuffer(JNIEnv *env, job
}
/* Java->C glue code:
- * Java package: com.jogamp.opengl.impl.gl3.GL3bcImpl
+ * Java package: com.jogamp.opengl.impl.gl4.GL4bcImpl
* Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
* C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
*/
JNIEXPORT jobject JNICALL
-Java_com_jogamp_opengl_impl_gl3_GL3bcImpl_newDirectByteBuffer(JNIEnv *env, jobject _unused, jlong addr, jint capacity) {
+Java_com_jogamp_opengl_impl_gl4_GL4bcImpl_newDirectByteBuffer(JNIEnv *env, jobject _unused, jlong addr, jint capacity) {
return (*env)->NewDirectByteBuffer(env, (void*) (intptr_t) addr, capacity);
}
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-common.java b/make/config/jogl/gl-impl-CustomJavaCode-common.java
index 564606799..4872490b0 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-common.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-common.java
@@ -1,16 +1,58 @@
- public GLProfile getGLProfile() {
- return this.glProfile;
- }
- private GLProfile glProfile;
-
- public int glGetBoundBuffer(int target) {
- return bufferStateTracker.getBoundBufferObject(target, this);
- }
-
- public boolean glIsVBOArrayEnabled() {
- return checkArrayVBOEnabled(false);
- }
-
- public boolean glIsVBOElementEnabled() {
- return checkElementVBOEnabled(false);
- }
+ public GLProfile getGLProfile() {
+ return this.glProfile;
+ }
+ private GLProfile glProfile;
+
+ public int glGetBoundBuffer(int target) {
+ return bufferStateTracker.getBoundBufferObject(target, this);
+ }
+
+ public boolean glIsVBOArrayEnabled() {
+ return checkArrayVBOEnabled(false);
+ }
+
+ public boolean glIsVBOElementEnabled() {
+ return checkElementVBOEnabled(false);
+ }
+
+ public final boolean isGL() {
+ return true;
+ }
+
+ public final GL getGL() throws GLException {
+ return this;
+ }
+
+ public boolean isFunctionAvailable(String glFunctionName) {
+ return _context.isFunctionAvailable(glFunctionName);
+ }
+
+ public boolean isExtensionAvailable(String glExtensionName) {
+ return _context.isExtensionAvailable(glExtensionName);
+ }
+
+ public Object getExtension(String extensionName) {
+ // At this point we don't expose any extensions using this mechanism
+ return null;
+ }
+
+ /** Returns the context this GL object is associated with for better
+ error checking by DebugGL. */
+ public GLContext getContext() {
+ return _context;
+ }
+
+ private GLContextImpl _context;
+
+ public void setSwapInterval(int interval) {
+ _context.setSwapInterval(interval);
+ }
+
+ public int getSwapInterval() {
+ return _context.getSwapInterval();
+ }
+
+ public Object getPlatformGLExtensions() {
+ return _context.getPlatformGLExtensions();
+ }
+
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-desktop.java b/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
index 04ba39c3d..93a275269 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
@@ -1,79 +1,191 @@
-private int[] imageSizeTemp = new int[1];
-
-/** Helper for more precise computation of number of bytes that will
- be touched by a pixel pack or unpack operation. */
-private int imageSizeInBytes(int bytesPerElement,
- int width, int height, int depth, boolean pack) {
- int rowLength = 0;
- int skipRows = 0;
- int skipPixels = 0;
- int alignment = 1;
- int imageHeight = 0;
- int skipImages = 0;
-
- if (pack) {
- glGetIntegerv(GL_PACK_ROW_LENGTH, imageSizeTemp, 0);
- rowLength = imageSizeTemp[0];
- glGetIntegerv(GL_PACK_SKIP_ROWS, imageSizeTemp, 0);
- skipRows = imageSizeTemp[0];
- glGetIntegerv(GL_PACK_SKIP_PIXELS, imageSizeTemp, 0);
- skipPixels = imageSizeTemp[0];
- glGetIntegerv(GL_PACK_ALIGNMENT, imageSizeTemp, 0);
- alignment = imageSizeTemp[0];
- if (depth > 1) {
- glGetIntegerv(GL_PACK_IMAGE_HEIGHT, imageSizeTemp, 0);
- imageHeight = imageSizeTemp[0];
- glGetIntegerv(GL_PACK_SKIP_IMAGES, imageSizeTemp, 0);
- skipImages = imageSizeTemp[0];
+ private int[] imageSizeTemp = new int[1];
+
+ /** Helper for more precise computation of number of bytes that will
+ be touched by a pixel pack or unpack operation. */
+ private int imageSizeInBytes(int bytesPerElement,
+ int width, int height, int depth, boolean pack) {
+ int rowLength = 0;
+ int skipRows = 0;
+ int skipPixels = 0;
+ int alignment = 1;
+ int imageHeight = 0;
+ int skipImages = 0;
+
+ if (pack) {
+ glGetIntegerv(GL_PACK_ROW_LENGTH, imageSizeTemp, 0);
+ rowLength = imageSizeTemp[0];
+ glGetIntegerv(GL_PACK_SKIP_ROWS, imageSizeTemp, 0);
+ skipRows = imageSizeTemp[0];
+ glGetIntegerv(GL_PACK_SKIP_PIXELS, imageSizeTemp, 0);
+ skipPixels = imageSizeTemp[0];
+ glGetIntegerv(GL_PACK_ALIGNMENT, imageSizeTemp, 0);
+ alignment = imageSizeTemp[0];
+ if (depth > 1) {
+ glGetIntegerv(GL_PACK_IMAGE_HEIGHT, imageSizeTemp, 0);
+ imageHeight = imageSizeTemp[0];
+ glGetIntegerv(GL_PACK_SKIP_IMAGES, imageSizeTemp, 0);
+ skipImages = imageSizeTemp[0];
+ }
+ } else {
+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, imageSizeTemp, 0);
+ rowLength = imageSizeTemp[0];
+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, imageSizeTemp, 0);
+ skipRows = imageSizeTemp[0];
+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, imageSizeTemp, 0);
+ skipPixels = imageSizeTemp[0];
+ glGetIntegerv(GL_UNPACK_ALIGNMENT, imageSizeTemp, 0);
+ alignment = imageSizeTemp[0];
+ if (depth > 1) {
+ glGetIntegerv(GL_UNPACK_IMAGE_HEIGHT, imageSizeTemp, 0);
+ imageHeight = imageSizeTemp[0];
+ glGetIntegerv(GL_UNPACK_SKIP_IMAGES, imageSizeTemp, 0);
+ skipImages = imageSizeTemp[0];
+ }
}
- } else {
- glGetIntegerv(GL_UNPACK_ROW_LENGTH, imageSizeTemp, 0);
- rowLength = imageSizeTemp[0];
- glGetIntegerv(GL_UNPACK_SKIP_ROWS, imageSizeTemp, 0);
- skipRows = imageSizeTemp[0];
- glGetIntegerv(GL_UNPACK_SKIP_PIXELS, imageSizeTemp, 0);
- skipPixels = imageSizeTemp[0];
- glGetIntegerv(GL_UNPACK_ALIGNMENT, imageSizeTemp, 0);
- alignment = imageSizeTemp[0];
- if (depth > 1) {
- glGetIntegerv(GL_UNPACK_IMAGE_HEIGHT, imageSizeTemp, 0);
- imageHeight = imageSizeTemp[0];
- glGetIntegerv(GL_UNPACK_SKIP_IMAGES, imageSizeTemp, 0);
- skipImages = imageSizeTemp[0];
+ // Try to deal somewhat correctly with potentially invalid values
+ width = Math.max(0, width );
+ height = Math.max(1, height); // min 1D
+ depth = Math.max(1, depth ); // min 1 * imageSize
+ skipRows = Math.max(0, skipRows);
+ skipPixels = Math.max(0, skipPixels);
+ alignment = Math.max(1, alignment);
+ skipImages = Math.max(0, skipImages);
+
+ imageHeight = ( imageHeight > 0 ) ? imageHeight : height;
+ rowLength = ( rowLength > 0 ) ? rowLength : width;
+
+ int rowLengthInBytes = rowLength * bytesPerElement;
+
+ if (alignment > 1) {
+ int padding = rowLengthInBytes % alignment;
+ if (padding > 0) {
+ rowLengthInBytes += alignment - padding;
+ }
}
+
+ /**
+ * skipPixels and skipRows is a static one time offset.
+ *
+ * skipImages and depth are in multiples of image size.
+ *
+ * rowlenght is the actual repeating offset
+ * to go from line n to line n+1 at the same x-axis position.
+ */
+ return
+ ( skipImages + depth - 1 ) * imageHeight * rowLengthInBytes + // whole images
+ ( skipRows + height - 1 ) * rowLengthInBytes + // lines with padding
+ ( skipPixels + width ) * bytesPerElement; // last line
+ }
+
+ public final boolean isGL4bc() {
+ return _context.isGL4bc();
+ }
+
+ public final boolean isGL4() {
+ return _context.isGL4();
+ }
+
+ public final boolean isGL3bc() {
+ return _context.isGL3bc();
+ }
+
+ public final boolean isGL3() {
+ return _context.isGL3();
}
- // Try to deal somewhat correctly with potentially invalid values
- width = Math.max(0, width );
- height = Math.max(1, height); // min 1D
- depth = Math.max(1, depth ); // min 1 * imageSize
- skipRows = Math.max(0, skipRows);
- skipPixels = Math.max(0, skipPixels);
- alignment = Math.max(1, alignment);
- skipImages = Math.max(0, skipImages);
- imageHeight = ( imageHeight > 0 ) ? imageHeight : height;
- rowLength = ( rowLength > 0 ) ? rowLength : width;
+ public final boolean isGL2() {
+ return _context.isGL2();
+ }
+
+ public final boolean isGL2ES1() {
+ return _context.isGL2ES1();
+ }
- int rowLengthInBytes = rowLength * bytesPerElement;
+ public final boolean isGL2ES2() {
+ return _context.isGL2ES2();
+ }
- if (alignment > 1) {
- int padding = rowLengthInBytes % alignment;
- if (padding > 0) {
- rowLengthInBytes += alignment - padding;
+ public final boolean isGL2GL3() {
+ return _context.isGL2GL3();
+ }
+
+ public final boolean hasGLSL() {
+ return _context.hasGLSL();
+ }
+
+ public final GL4bc getGL4bc() throws GLException {
+ if(!isGL4bc()) {
+ throw new GLException("Not a GL4bc implementation");
+ }
+ return this;
+ }
+
+ public final GL4 getGL4() throws GLException {
+ if(!isGL4bc()) {
+ throw new GLException("Not a GL4 implementation");
}
+ return this;
}
- /**
- * skipPixels and skipRows is a static one time offset.
- *
- * skipImages and depth are in multiples of image size.
- *
- * rowlenght is the actual repeating offset
- * to go from line n to line n+1 at the same x-axis position.
- */
- return
- ( skipImages + depth - 1 ) * imageHeight * rowLengthInBytes + // whole images
- ( skipRows + height - 1 ) * rowLengthInBytes + // lines with padding
- ( skipPixels + width ) * bytesPerElement; // last line
-}
+ public final GL3bc getGL3bc() throws GLException {
+ if(!isGL3bc()) {
+ throw new GLException("Not a GL3bc implementation");
+ }
+ return this;
+ }
+
+ public final GL3 getGL3() throws GLException {
+ if(!isGL3()) {
+ throw new GLException("Not a GL3 implementation");
+ }
+ return this;
+ }
+
+ public final GL2 getGL2() throws GLException {
+ if(!isGL2()) {
+ throw new GLException("Not a GL2 implementation");
+ }
+ return this;
+ }
+
+ public final GL2ES1 getGL2ES1() throws GLException {
+ if(!isGL2ES1()) {
+ throw new GLException("Not a GL2ES1 implementation");
+ }
+ return this;
+ }
+
+ public final GL2ES2 getGL2ES2() throws GLException {
+ if(!isGL2ES2()) {
+ throw new GLException("Not a GL2ES2 implementation");
+ }
+ return this;
+ }
+
+ public final GL2GL3 getGL2GL3() throws GLException {
+ if(!isGL2GL3()) {
+ throw new GLException("Not a GL2GL3 implementation");
+ }
+ return this;
+ }
+
+ public final boolean isGLES1() {
+ return false;
+ }
+
+ public final boolean isGLES2() {
+ return false;
+ }
+
+ public final boolean isGLES() {
+ return false;
+ }
+
+ public final GLES1 getGLES1() throws GLException {
+ throw new GLException("Not a GLES1 implementation");
+ }
+
+ public final GLES2 getGLES2() throws GLException {
+ throw new GLException("Not a GLES2 implementation");
+ }
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl3.java b/make/config/jogl/gl-impl-CustomJavaCode-gl4.java
index cff0b0f94..a2c70eeee 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl3.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl4.java
@@ -23,123 +23,6 @@ public GL3Impl(GLProfile glp, GLContextImpl context) {
this.glProfile = glp;
}
-public final boolean isGL() {
- return true;
-}
-
-public final boolean isGL4bc() {
- return false;
-}
-
-public final boolean isGL4() {
- return false;
-}
-
-public final boolean isGL3bc() {
- return false;
-}
-
-public final boolean isGL3() {
- return true;
-}
-
-public final boolean isGL2() {
- return false;
-}
-
-public final boolean isGLES1() {
- return false;
-}
-
-public final boolean isGLES2() {
- return false;
-}
-
-public final boolean isGLES() {
- return false;
-}
-
-public final boolean isGL2ES1() {
- return false;
-}
-
-public final boolean isGL2ES2() {
- return true;
-}
-
-public final boolean isGL2GL3() {
- return true;
-}
-
-public final boolean hasGLSL() {
- return true;
-}
-
-public final GL getGL() throws GLException {
- return this;
-}
-
-public final GL4bc getGL4bc() throws GLException {
- throw new GLException("Not a GL4bc implementation");
-}
-
-public final GL4 getGL4() throws GLException {
- throw new GLException("Not a GL4 implementation");
-}
-
-public final GL3bc getGL3bc() throws GLException {
- throw new GLException("Not a GL3bc implementation");
-}
-
-public final GL3 getGL3() throws GLException {
- return this;
-}
-
-public final GL2 getGL2() throws GLException {
- throw new GLException("Not a GL2 implementation");
-}
-
-public final GLES1 getGLES1() throws GLException {
- throw new GLException("Not a GLES1 implementation");
-}
-
-public final GLES2 getGLES2() throws GLException {
- throw new GLException("Not a GLES2 implementation");
-}
-
-public final GL2ES1 getGL2ES1() throws GLException {
- throw new GLException("Not a GLES2ES1 implementation");
-}
-
-public final GL2ES2 getGL2ES2() throws GLException {
- return this;
-}
-
-public final GL2GL3 getGL2GL3() throws GLException {
- return this;
-}
-
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
/**
* Provides platform-independent access to the wglAllocateMemoryNV /
* glXAllocateMemoryNV extension.
@@ -148,18 +31,6 @@ public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2,
return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
}
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
//
// Helpers for ensuring the correct amount of texture data
//
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl3bc.java b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
index 2f804a218..bceb12fe5 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl3bc.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
@@ -16,7 +16,7 @@ public void setObjectTracker(GLObjectTracker tracker) {
*/
-public GL3bcImpl(GLProfile glp, GLContextImpl context) {
+public GL4bcImpl(GLProfile glp, GLContextImpl context) {
this._context = context;
this.bufferSizeTracker = context.getBufferSizeTracker();
this.bufferStateTracker = context.getBufferStateTracker();
@@ -24,123 +24,6 @@ public GL3bcImpl(GLProfile glp, GLContextImpl context) {
this.glProfile = glp;
}
-public final boolean isGL() {
- return true;
-}
-
-public final boolean isGL4bc() {
- return false;
-}
-
-public final boolean isGL4() {
- return false;
-}
-
-public final boolean isGL3bc() {
- return true;
-}
-
-public final boolean isGL3() {
- return true;
-}
-
-public final boolean isGL2() {
- return true;
-}
-
-public final boolean isGLES1() {
- return false;
-}
-
-public final boolean isGLES2() {
- return false;
-}
-
-public final boolean isGLES() {
- return false;
-}
-
-public final boolean isGL2ES1() {
- return true;
-}
-
-public final boolean isGL2ES2() {
- return true;
-}
-
-public final boolean isGL2GL3() {
- return true;
-}
-
-public final boolean hasGLSL() {
- return true;
-}
-
-public final GL getGL() throws GLException {
- return this;
-}
-
-public final GL4bc getGL4bc() throws GLException {
- throw new GLException("Not a GL4bc implementation");
-}
-
-public final GL4 getGL4() throws GLException {
- throw new GLException("Not a GL4 implementation");
-}
-
-public final GL3bc getGL3bc() throws GLException {
- return this;
-}
-
-public final GL3 getGL3() throws GLException {
- return this;
-}
-
-public final GL2 getGL2() throws GLException {
- return this;
-}
-
-public final GLES1 getGLES1() throws GLException {
- throw new GLException("Not a GLES1 implementation");
-}
-
-public final GLES2 getGLES2() throws GLException {
- throw new GLException("Not a GLES2 implementation");
-}
-
-public final GL2ES1 getGL2ES1() throws GLException {
- return this;
-}
-
-public final GL2ES2 getGL2ES2() throws GLException {
- return this;
-}
-
-public final GL2GL3 getGL2GL3() throws GLException {
- return this;
-}
-
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
/**
* Provides platform-independent access to the wglAllocateMemoryNV /
* glXAllocateMemoryNV extension.
@@ -149,18 +32,6 @@ public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2,
return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
}
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
//
// Helpers for ensuring the correct amount of texture data
//
@@ -433,7 +304,7 @@ private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap();
/** Entry point to C language function: <br> <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code> */
public java.nio.ByteBuffer glMapBuffer(int target, int access) {
- final long __addr_ = ((GL3bcProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
+ final long __addr_ = ((GL4bcProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
if (__addr_ == 0) {
throw new GLException("Method \"glMapBuffer\" not available");
}
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
index 6fb8a32ef..b4efac8a1 100755
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
@@ -6,10 +6,6 @@ public GLES1Impl(GLProfile glp, GLContextImpl context) {
this.glProfile = glp;
}
-public final boolean isGL() {
- return true;
-}
-
public final boolean isGL4bc() {
return false;
}
@@ -58,10 +54,6 @@ public final boolean hasGLSL() {
return false;
}
-public final GL getGL() throws GLException {
- return this;
-}
-
public final GL4bc getGL4bc() throws GLException {
throw new GLException("Not a GL4bc implementation");
}
@@ -102,39 +94,6 @@ public final GL2GL3 getGL2GL3() throws GLException {
throw new GLException("Not a GL2GL3 implementation");
}
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
//
// Helpers for ensuring the correct amount of texture data
//
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
index 8204bd1ae..bb8ddb7ef 100755
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
@@ -10,10 +10,6 @@ public GLES2Impl(GLProfile glp, GLContextImpl context) {
this.glProfile = glp;
}
-public final boolean isGL() {
- return true;
-}
-
public final boolean isGL4bc() {
return false;
}
@@ -62,10 +58,6 @@ public final boolean hasGLSL() {
return true;
}
-public final GL getGL() throws GLException {
- return this;
-}
-
public final GL4bc getGL4bc() throws GLException {
throw new GLException("Not a GL4bc implementation");
}
@@ -106,39 +98,6 @@ public final GL2GL3 getGL2GL3() throws GLException {
throw new GLException("Not a GL2GL3 implementation");
}
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
//
// Helpers for ensuring the correct amount of texture data
//
diff --git a/make/config/jogl/gl3-common.cfg b/make/config/jogl/gl3-common.cfg
index fac8323bb..c2cc2968e 100644
--- a/make/config/jogl/gl3-common.cfg
+++ b/make/config/jogl/gl3-common.cfg
@@ -16,6 +16,9 @@ RenameExtensionIntoCore GL_ARB_geometry_shader4
RenameExtensionIntoCore GL_ARB_sync
# <<< OpenGL 3.2
+# >>> OpenGL 3.3
+# <<< OpenGL 3.3
+
# Ignore GL functions that deal with explicit pointer values in such a
# way that we cannot implement the functionality in Java
Ignore glMultiDrawElementsBaseVertex
diff --git a/make/config/jogl/gl4-common.cfg b/make/config/jogl/gl4-common.cfg
new file mode 100644
index 000000000..2c119da30
--- /dev/null
+++ b/make/config/jogl/gl4-common.cfg
@@ -0,0 +1,5 @@
+
+# >>> OpenGL 4.0
+# <<< OpenGL 4.0
+
+
diff --git a/make/config/jogl/gl3-desktop-tracker.cfg b/make/config/jogl/gl4-desktop-tracker.cfg
index 4b9a7edb7..4b9a7edb7 100644
--- a/make/config/jogl/gl3-desktop-tracker.cfg
+++ b/make/config/jogl/gl4-desktop-tracker.cfg
diff --git a/make/config/jogl/glu-CustomJavaCode-base.java b/make/config/jogl/glu-CustomJavaCode-base.java
index aeb4f2ef9..480f5d117 100755
--- a/make/config/jogl/glu-CustomJavaCode-base.java
+++ b/make/config/jogl/glu-CustomJavaCode-base.java
@@ -169,7 +169,7 @@ protected static boolean checkedGLUtessellatorImpl = false;
protected static final void validateGLUtessellatorImpl() {
if(!checkedGLUtessellatorImpl) {
- availableGLUtessellatorImpl = NWReflection.isClassAvailable("com.jogamp.opengl.impl.glu.tessellator.GLUtessellatorImpl");
+ availableGLUtessellatorImpl = ReflectionUtil.isClassAvailable("com.jogamp.opengl.impl.glu.tessellator.GLUtessellatorImpl");
checkedGLUtessellatorImpl = true;
}
if(!availableGLUtessellatorImpl) {
@@ -1220,7 +1220,7 @@ protected static final void validateGLUquadricImpl() {
if(!checkedGLUquadricImpl) {
synchronized (syncObject) {
if(!checkedGLUquadricImpl) {
- availableGLUquadricImpl = NWReflection.isClassAvailable("com.jogamp.opengl.impl.glu.GLUquadricImpl");
+ availableGLUquadricImpl = ReflectionUtil.isClassAvailable("com.jogamp.opengl.impl.glu.GLUquadricImpl");
checkedGLUquadricImpl = true;
}
}
diff --git a/make/config/jogl/glu-CustomJavaCode-gl2es1.java b/make/config/jogl/glu-CustomJavaCode-gl2es1.java
index b5cb3b2f8..f3b4322d9 100755
--- a/make/config/jogl/glu-CustomJavaCode-gl2es1.java
+++ b/make/config/jogl/glu-CustomJavaCode-gl2es1.java
@@ -86,7 +86,7 @@ protected static boolean checkedMipmap = false;
protected static final void validateMipmap() {
if(!checkedMipmap) {
- availableMipmap = NWReflection.isClassAvailable("com.jogamp.opengl.impl.glu.mipmap.Mipmap");
+ availableMipmap = ReflectionUtil.isClassAvailable("com.jogamp.opengl.impl.glu.mipmap.Mipmap");
checkedMipmap = true;
}
if(!availableMipmap) {
diff --git a/make/config/jogl/glu-common.cfg b/make/config/jogl/glu-common.cfg
index 937ca0348..f5fc7c1b3 100644
--- a/make/config/jogl/glu-common.cfg
+++ b/make/config/jogl/glu-common.cfg
@@ -14,7 +14,7 @@ Import javax.media.opengl.glu.*
Import com.jogamp.opengl.impl.*
Import com.jogamp.opengl.impl.glu.*
Import com.jogamp.opengl.impl.glu.tessellator.GLUtessellatorImpl
-Import com.jogamp.nativewindow.impl.NWReflection
+Import com.jogamp.common.util.ReflectionUtil
# Raise GLException instead of RuntimeException in glue code
RuntimeExceptionType GLException
diff --git a/make/config/jogl/gl-gl2es12.cfg b/make/config/jogl/obsolete/gl-gl2es12.cfg
index 3942b1419..3942b1419 100644
--- a/make/config/jogl/gl-gl2es12.cfg
+++ b/make/config/jogl/obsolete/gl-gl2es12.cfg
diff --git a/make/config/jogl/gl-impl-CustomCCode-gl2.c b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2.c
index 91fd0078b..91fd0078b 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gl2.c
+++ b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2.c
diff --git a/make/config/jogl/gl-impl-CustomCCode-gl2es12.c b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2es12.c
index 07b821802..07b821802 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gl2es12.c
+++ b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2es12.c
diff --git a/make/config/jogl/gl-impl-CustomCCode-gl3.c b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl3.c
index f540a7d4a..f540a7d4a 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gl3.c
+++ b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl3.c
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2.java b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2.java
index 0658b8a01..a1a6917df 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl2.java
+++ b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2.java
@@ -24,123 +24,6 @@ public GL2Impl(GLProfile glp, GLContextImpl context) {
this.glProfile = glp;
}
-public final boolean isGL() {
- return true;
-}
-
-public final boolean isGL4bc() {
- return false;
-}
-
-public final boolean isGL4() {
- return false;
-}
-
-public final boolean isGL3bc() {
- return false;
-}
-
-public final boolean isGL3() {
- return false;
-}
-
-public final boolean isGL2() {
- return true;
-}
-
-public final boolean isGLES1() {
- return false;
-}
-
-public final boolean isGLES2() {
- return false;
-}
-
-public final boolean isGLES() {
- return false;
-}
-
-public final boolean isGL2ES1() {
- return true;
-}
-
-public final boolean isGL2ES2() {
- return true;
-}
-
-public final boolean isGL2GL3() {
- return true;
-}
-
-public final boolean hasGLSL() {
- return true;
-}
-
-public final GL getGL() throws GLException {
- return this;
-}
-
-public final GL4bc getGL4bc() throws GLException {
- throw new GLException("Not a GL4bc implementation");
-}
-
-public final GL4 getGL4() throws GLException {
- throw new GLException("Not a GL4 implementation");
-}
-
-public final GL3bc getGL3bc() throws GLException {
- throw new GLException("Not a GL3bc implementation");
-}
-
-public final GL3 getGL3() throws GLException {
- throw new GLException("Not a GL3 implementation");
-}
-
-public final GL2 getGL2() throws GLException {
- return this;
-}
-
-public final GLES1 getGLES1() throws GLException {
- throw new GLException("Not a GLES1 implementation");
-}
-
-public final GLES2 getGLES2() throws GLException {
- throw new GLException("Not a GLES2 implementation");
-}
-
-public final GL2ES1 getGL2ES1() throws GLException {
- return this;
-}
-
-public final GL2ES2 getGL2ES2() throws GLException {
- return this;
-}
-
-public final GL2GL3 getGL2GL3() throws GLException {
- return this;
-}
-
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
/**
* Provides platform-independent access to the wglAllocateMemoryNV /
* glXAllocateMemoryNV extension.
@@ -149,18 +32,6 @@ public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2,
return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
}
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
//
// Helpers for ensuring the correct amount of texture data
//
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2es12.java
index 54c7bd92b..aed442da3 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java
+++ b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2es12.java
@@ -26,108 +26,6 @@ public GL2ES12Impl(GLProfile glp, GLContextImpl context) {
private boolean isGL2ES2;
-public final boolean isGL() {
- return true;
-}
-
-public final boolean isGL4bc() {
- return false;
-}
-
-public final boolean isGL4() {
- return false;
-}
-
-public final boolean isGL3bc() {
- return false;
-}
-
-public final boolean isGL3() {
- return false;
-}
-
-public final boolean isGL2() {
- return false;
-}
-
-public final boolean isGLES1() {
- return false;
-}
-
-public final boolean isGLES2() {
- return false;
-}
-
-public final boolean isGLES() {
- return false;
-}
-
-public final boolean isGL2ES1() {
- return !isGL2ES2;
-}
-
-public final boolean isGL2ES2() {
- return isGL2ES2;
-}
-
-public final boolean isGL2GL3() {
- return false;
-}
-
-public final boolean hasGLSL() {
- return isGL2ES2;
-}
-
-public final GL getGL() throws GLException {
- return this;
-}
-
-public final GL4bc getGL4bc() throws GLException {
- throw new GLException("Not a GL4bc implementation");
-}
-
-public final GL4 getGL4() throws GLException {
- throw new GLException("Not a GL4 implementation");
-}
-
-public final GL3bc getGL3bc() throws GLException {
- throw new GLException("Not a GL3bc implementation");
-}
-
-public final GL3 getGL3() throws GLException {
- throw new GLException("Not a GL3 implementation");
-}
-
-public final GL2 getGL2() throws GLException {
- throw new GLException("Not a GL2 implementation");
-}
-
-public final GLES1 getGLES1() throws GLException {
- throw new GLException("Not a GLES1 implementation");
-}
-
-public final GLES2 getGLES2() throws GLException {
- throw new GLException("Not a GLES2 implementation");
-}
-
-public final GL2ES1 getGL2ES1() throws GLException {
- if (isGL2ES1()) {
- return this;
- }
- throw new GLException("Not a GL2ES1 implementation");
-}
-
-public final GL2ES2 getGL2ES2() throws GLException {
- if (isGL2ES2()) {
- return this;
- }
- throw new GLException("Not a GL2ES2 implementation");
-}
-
-public final GL2GL3 getGL2GL3() throws GLException {
- throw new GLException("Not a GL2GL3 implementation");
-}
-
public boolean isFunctionAvailable(String glFunctionName) {
return _context.isFunctionAvailable(glFunctionName);
}
diff --git a/make/config/nativewindow/x11-CustomJavaCode.java b/make/config/nativewindow/x11-CustomJavaCode.java
index 57f37bee7..44bb1e8d0 100644
--- a/make/config/nativewindow/x11-CustomJavaCode.java
+++ b/make/config/nativewindow/x11-CustomJavaCode.java
@@ -26,9 +26,8 @@
public static native long DefaultVisualID(long display, int screen);
- /**
public static native long CreateDummyWindow(long display, int screen_index, long visualID);
- public static native void DestroyDummyWindow(long display, long window); */
+ public static native void DestroyDummyWindow(long display, long window);
public static native long dlopen(String name);
public static native long dlsym(String name);
diff --git a/make/stub_includes/opengl/gl4.c b/make/stub_includes/opengl/gl4.c
index cf8a709f7..5e9d87ccd 100644
--- a/make/stub_includes/opengl/gl4.c
+++ b/make/stub_includes/opengl/gl4.c
@@ -1,11 +1,11 @@
#define GLAPI
-// Define GL4_PROTOTYPES so that the OpenGL prototypes in
+// Define GL3_PROTOTYPES so that the OpenGL prototypes in
// "gl3.h" are parsed.
-#define GL4_PROTOTYPES
+#define GL3_PROTOTYPES
-// Define GL_GL4EXT_PROTOTYPES so that the OpenGL extension prototypes in
+// Define GL_GL3EXT_PROTOTYPES so that the OpenGL extension prototypes in
// "gl3ext.h" are parsed.
-#define GL_GL4EXT_PROTOTYPES
+#define GL_GL3EXT_PROTOTYPES
-#include <GL4/gl3.h>
+#include <GL3/gl3.h>
diff --git a/make/stub_includes/opengl/gl4bc.c b/make/stub_includes/opengl/gl4bc.c
new file mode 100644
index 000000000..262e005f7
--- /dev/null
+++ b/make/stub_includes/opengl/gl4bc.c
@@ -0,0 +1,18 @@
+#define GLAPI
+
+// Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
+// "glext.h" are parsed.
+#define GL_GLEXT_PROTOTYPES
+
+#include <GL/gl.h>
+
+// Define GL3_PROTOTYPES so that the OpenGL prototypes in
+// "gl3.h" are parsed.
+#define GL3_PROTOTYPES
+
+// Define GL_GL3EXT_PROTOTYPES so that the OpenGL extension prototypes in
+// "gl3ext.h" are parsed.
+#define GL_GL3EXT_PROTOTYPES
+
+#include <GL3/gl3ext.h>
+