diff options
Diffstat (limited to 'make')
50 files changed, 5663 insertions, 930 deletions
diff --git a/make/build.xml b/make/build.xml index d0e302837..5f5d0ed8b 100644 --- a/make/build.xml +++ b/make/build.xml @@ -23,9 +23,7 @@ - javadoc: create the standard developer Javadoc (recommended) - (Note: should build all first - may be dependence in the future) - javadoc.spec: create the standard developer Javadoc but exclude com.sun.* classes - - javadoc.dev.win32: - - javadoc.dev.x11: - - javadoc.dev.macosx: create the internal developer Javadoc. This includes the + - javadoc.dev.all: create the internal developer Javadoc. This includes the - Java and C file generators. Note that it is only supported - to create the Javadoc for the platform on which you are - currently running. @@ -50,9 +48,13 @@ - - Some environment defs .. jogl.cdcfp - jogl.es1 - jogl.es2 + jogl.noes1 + jogl.noes2 + jogl.nogl2 jogl.noAWT + jogl.noglugl2 - no glu gl2 impl. + jogl.noutil - no com.sun.opengl.util.* + jogl.nonewt jogl.noX11WindowsMacOsX, which implies: jogl.noX11 jogl.noWindows @@ -79,38 +81,50 @@ - Base initialization and detection of operating system. --> <target name="base.init" depends="gluegen.cpptasks.detect.os"> - <condition property="isGLES"> - <or> - <isset property="jogl.es1" /> - <isset property="jogl.es2" /> - </or> - </condition> - <!-- Also set isCDCFP for the GlueGen build.xml to keep GL - references there to a minimum --> - <condition property="isCDCFP"> - <isset property="jogl.cdcfp" /> + <echo message="isX11: ${isX11}" /> + <echo message="isWindows: ${isWindows}" /> + <echo message="isOSX: ${isOSX}" /> + + <condition property="jogl.noes"> + <and> + <isset property="jogl.noes1"/> + <isset property="jogl.noes2"/> + </and> </condition> - <echo message="jogl.cdcfp: ${jogl.cdcfp}" /> + <echo message="jogl.noes : ${jogl.noes}" /> + <echo message="jogl.noes1: ${jogl.noes1}" /> + <echo message="jogl.noes2: ${jogl.noes2}" /> + <echo message="jogl.nogl2: ${jogl.nogl2}" /> - <condition property="isGLES1"> - <isset property="jogl.es1" /> + <condition property="jogl.noAWT"> + <isset property="jogl.cdcfp"/> </condition> - - <condition property="isGLES2"> - <isset property="jogl.es2" /> + <condition property="javac.bootclasspath.jar" + value="../../gluegen/make/lib/cdc_fp.jar"> + <isset property="jogl.cdcfp"/> </condition> + <echo message="jogl.cdcfp: ${jogl.cdcfp}" /> + <echo message="jogl.noAWT: ${jogl.noAWT}" /> + <echo message="javac.bootclasspath.jar: ${javac.bootclasspath.jar}" /> - <echo message="jogl.es1: ${jogl.es1}" /> - <echo message="jogl.es2: ${jogl.es2}" /> + <condition property="jogl.noX11WindowsMacOsX"> + <and> + <isset property="jogl.noX11"/> + <isset property="jogl.noWindows"/> + <isset property="jogl.noMacOsX"/> + </and> + </condition> <condition property="jogl.noX11"> - <isset property="jogl.noX11WindowsMacOsX" /> + <isset property="jogl.noX11WindowsMacOsX"/> </condition> + <condition property="jogl.noWindows"> <isset property="jogl.noX11WindowsMacOsX" /> </condition> + <condition property="jogl.noMacOsX"> <isset property="jogl.noX11WindowsMacOsX" /> </condition> @@ -120,29 +134,119 @@ <echo message="jogl.noWindows: ${jogl.noWindows}" /> <echo message="jogl.noMacOsX: ${jogl.noMacOsX}" /> + <!-- partitioning --> + + <property name="java.part.egl" + value="com/sun/opengl/impl/egl/**"/> + + <property name="java.part.glugl2" + value="com/sun/opengl/impl/glu/gl2/**, com/sun/opengl/impl/glu/nurbs/**, com/sun/opengl/impl/glu/registry/**, com/sun/opengl/impl/glu/tessellator/**, javax/media/opengl/glu/gl2/**"/> + + <property name="java.part.gl2" + value="javax/media/opengl/GL2.*, javax/media/opengl/TraceGL2.*, javax/media/opengl/DebugGL2.*, com/sun/opengl/impl/**/gl2/**, com/sun/opengl/impl/**/glx/**, com/sun/opengl/impl/**/wgl/**, com/sun/opengl/impl/**/cgl/**"/> + + <property name="java.part.es1" + value="javax/media/opengl/GLES1.*, javax/media/opengl/TraceGLES1.*, javax/media/opengl/DebugGLES1.*, javax/media/opengl/**/es1/**, com/sun/opengl/**/es1/**"/> + + <property name="java.part.es2" + value="javax/media/opengl/GLES2.*, javax/media/opengl/TraceGLES2.*, javax/media/opengl/DebugGLES2.*, javax/media/opengl/**/es2/**, com/sun/opengl/**/es2/**"/> + + <property name="java.part.awt" + value="javax/media/opengl/awt/**, com/sun/opengl/impl/j2d/**"/> + + <property name="java.part.util" + value="com/sun/opengl/util/io/**, com/sun/opengl/util/texture/**"/> + + <property name="java.part.util.awt" + value="com/sun/opengl/util/**/awt/**, com/sun/opengl/util/**/j2d/**"/> + + <property name="java.part.util.gl2" + value="com/sun/opengl/util/glut/**, com/sun/opengl/util/**/gl2/**"/> + + <property name="java.part.x11" + value="com/sun/opengl/**/x11/**"/> + + <property name="java.part.win" + value="com/sun/opengl/**/windows/**"/> + + <property name="java.part.macosx" + value="com/sun/opengl/**/macosx/**"/> + + <property name="java.part.newt" + value="com/sun/javafx/newt/**"/> + + <!-- condition excludes --> + + <condition property="java.excludes.egl" + value="${java.part.egl}"> + <and> + <isset property="jogl.noes1"/> + <isset property="jogl.noes2"/> + </and> + </condition> + + <condition property="java.excludes.glugl2" + value="${java.part.glugl2}"> + <or> + <isset property="jogl.noglugl2"/> + <isset property="jogl.nogl2"/> + </or> + </condition> + + <condition property="java.excludes.gl2" + value="${java.part.gl2}, ${java.part.util.gl2}"> + <isset property="jogl.nogl2"/> + </condition> + + <condition property="java.excludes.es1" + value="${java.part.es1}"> + <isset property="jogl.noes1"/> + </condition> + + <condition property="java.excludes.es2" + value="${java.part.es2}"> + <isset property="jogl.noes2"/> + </condition> + <condition property="java.excludes.awt" - value="javax/media/opengl/awt/**, com/sun/opengl/util/j2d/**, com/sun/opengl/util/JOGLAppletLauncher.java, com/sun/opengl/impl/awt/**, com/sun/opengl/impl/x11/awt/**, com/sun/opengl/impl/windows/awt/**, com/sun/opengl/impl/macosx/awt/**"> + value="${java.part.awt}, ${java.part.util.awt}, com/sun/opengl/impl/awt/**"> <isset property="jogl.noAWT"/> </condition> - <echo message="java.excludes.awt: ${java.excludes.awt}" /> - <condition property="java.excludes.impl.x11" - value="com/sun/opengl/impl/x11/**"> + <condition property="java.excludes.util" + value="${java.part.util} ${java.part.util.awt} ${java.part.util.gl2}"> + <isset property="jogl.noutil"/> + </condition> + + <condition property="java.excludes.x11" + value="${java.part.x11}"> <isset property="jogl.noX11"/> </condition> - <echo message="java.excludes.impl.x11: ${java.excludes.impl.x11}" /> - <condition property="java.excludes.impl.win" - value="com/sun/opengl/impl/windows/**"> + <condition property="java.excludes.win" + value="${java.part.win}"> <isset property="jogl.noWindows"/> </condition> - <echo message="java.excludes.impl.win: ${java.excludes.impl.win}" /> - <condition property="java.excludes.impl.macosx" - value="com/sun/opengl/impl/macosx/**"> + <condition property="java.excludes.macosx" + value="${java.part.macosx}"> <isset property="jogl.noMacOsX"/> </condition> - <echo message="java.excludes.impl.macosx: ${java.excludes.impl.macosx}" /> + + <condition property="java.excludes.newt" + value="${java.part.newt}"> + <isset property="jogl.nonewt"/> + </condition> + + <property name="java.excludes.javadoc.packagenames" + value="com.sun.opengl.impl.gl2.fixme.*,com.sun.javafx.audio.windows.waveout.TestSpatialization"/> + + <property name="java.excludes.fixme" + value="com/sun/opengl/impl/gl2/fixme/** com/sun/javafx/audio/windows/waveout/TestSpatialization.java" /> + + <property name="java.excludes.all" value="${java.excludes.fixme} ${java.excludes.egl}, ${java.excludes.gl2}, ${java.excludes.es1}, ${java.excludes.es2}, ${java.excludes.awt}, ${java.excludes.glugl2}, ${java.excludes.util}, ${java.excludes.x11}, ${java.excludes.win}, ${java.excludes.macosx}, ${java.excludes.newt}" /> + <echo message="java.excludes.all: ${java.excludes.all}" /> + <!-- Set the project root directory to be up one directory. --> <property name="project.root" value=".." /> @@ -151,19 +255,19 @@ <property name="make" value="." /> </target> - <target name="base.init.sourcelevel.1" unless="gluegen.nsig"> + <target name="base.init.sourcelevel.1"> <property name="jogl.sourcelevel" value="1.4" /> </target> - <target name="base.init.sourcelevel.2" if="gluegen.nsig"> + <!--target name="base.init.sourcelevel.2" if="gluegen.nsig"> <property name="jogl.sourcelevel" value="1.5" /> - </target> + </target--> <!-- ================================================================== --> <!-- - Load user properties which override build defaults. --> - <target name="load.user.properties" depends="base.init,base.init.sourcelevel.1,base.init.sourcelevel.2" unless="user.properties.file"> + <target name="load.user.properties" depends="base.init,base.init.sourcelevel.1" unless="user.properties.file"> <!-- Load the user specified properties file that defines various host - specific paths. The user will be notified if this is does not - exist. --> @@ -242,15 +346,15 @@ <property name="config" value="${project.root}/make" /> <property name="stub.includes" value="${config}/stub_includes" /> <property name="stub.includes.dir" value="stub_includes" /> <!-- NOTE: this MUST be relative for FileSet --> - <property name="stub.includes.x11" value="${stub.includes}/x11" /> <property name="stub.includes.opengl" value="${stub.includes}/opengl" /> <property name="stub.includes.common" value="${stub.includes}/common" /> - <dirset id="stub.includes.fileset.all" dir="."> + <dirset id="stub.includes.fileset.all.gl2" dir="."> <include name="${stub.includes.dir}/opengl/**" /> <include name="${stub.includes.dir}/macosx/**" /> <include name="${stub.includes.dir}/win32/**" /> <include name="${stub.includes.dir}/x11/**" /> <include name="${stub.includes.dir}/common/**" /> + <include name="${stub.includes.dir}/jni/**" /> </dirset> <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes.dir}"> <include name="opengl/**" /> @@ -258,6 +362,7 @@ <include name="win32/**" /> <include name="x11/**" /> <include name="common/**" /> + <include name="jni/**" /> </fileset> <fileset id="stub.includes.dependencies.fileset.2" file="${gluegen.jar}" /> <fileset id="stub.includes.dependencies.fileset.3" dir="."> @@ -292,17 +397,17 @@ <property name="java.lib.dir.linux.amd64" value="${java.home.dir}/jre/lib/amd64" /> <property name="java.lib.dir.linux.ia64" value="${java.home.dir}/jre/lib/ia64" /> <property name="java.lib.dir.hpux" value="${java.home.dir}/jre/lib/PA_RISC2.0" /> - <condition property="cpu" value="sparc"> + <condition property="cpu" value="sparc"> <os name="SunOS" arch="sparc" /> </condition> - <condition property="cpu" value="sparcv9"> + <condition property="cpu" value="sparcv9"> <os name="SunOS" arch="sparcv9" /> </condition> - <condition property="cpu" value="i386"> + <condition property="cpu" value="i386"> <os name="SunOS" arch="x86" /> </condition> - <condition property="cpu" value="amd64"> + <condition property="cpu" value="amd64"> <os name="SunOS" arch="amd64" /> </condition> @@ -326,7 +431,18 @@ </path> <!-- The resulting jogl.jar. --> - <property name="jogl.jar" value="${build}/jogl.jar" /> + <property name="jogl.core.jar" value="${build}/jogl.core.jar" /> + <property name="jogl.gles1.jar" value="${build}/jogl.gles1.jar" /> + <property name="jogl.gles2.jar" value="${build}/jogl.gles2.jar" /> + <property name="jogl.egl.jar" value="${build}/jogl.egl.jar" /> + <property name="jogl.gl2.jar" value="${build}/jogl.gl2.jar" /> + <property name="jogl.awt.jar" value="${build}/jogl.awt.jar" /> + <property name="jogl.newt.jar" value="${build}/jogl.newt.jar" /> + <property name="jogl.oswin.jar" value="${build}/jogl.oswin.jar" /> + <property name="jogl.util.jar" value="${build}/jogl.util.jar" /> + <property name="jogl.util.gl2.jar" value="${build}/jogl.util.gl2.jar" /> + <property name="jogl.util.awt.jar" value="${build}/jogl.util.awt.jar" /> + <property name="jogl.all.jar" value="${build}/jogl.all.jar" /> <!-- The javadoc dirs. --> <property name="javadoc" value="${project.root}/javadoc_public" /> @@ -335,59 +451,39 @@ <property name="javadoc.link" value="http://java.sun.com/j2se/1.4.2/docs/api/" /> <property name="javadoc.windowtitle" value="JOGL API -- JSR-231 ${base_version} Specification" /> <property name="javadoc.overview" value="spec-overview.html" /> - <property name="javadoc.spec.packagenames" value="javax.media.opengl,javax.media.opengl.glu" /> - <property name="javadoc.packagenames" value="${javadoc.spec.packagenames},com.sun.opengl.util,com.sun.opengl.util.j2d,com.sun.opengl.util.texture,com.sun.opengl.util.texture.spi" /> - <property name="javadoc.dev.packagenames.win32" value="com.sun.opengl.impl.windows" /> - <property name="javadoc.dev.packagenames.x11" value="com.sun.opengl.impl.x11" /> - <property name="javadoc.dev.packagenames.macosx" value="com.sun.opengl.impl.macosx" /> - <property name="javadoc.dev.packagenames" value="javax.media.opengl,javax.media.opengl.glu,com.sun.opengl.impl,com.sun.opengl.util,com.sun.gluegen,com.sun.gluegen.runtime" /> - <property name="javadoc.bottom" value="Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="http://jcp.org/en/jsr/detail?id=231">license terms</a>." /> + <property name="javadoc.spec.packagenames" value="javax.media.opengl,javax.media.opengl.glu,javax.media.opengl.awt" /> + + <property name="javadoc.packagenames" value="${javadoc.spec.packagenames},com.sun.opengl.util.*" /> + + <property name="javadoc.dev.packagenames" value="javax.media.opengl.*,com.sun.opengl.impl.*,com.sun.opengl.util.*,com.sun.gluegen,com.sun.gluegen.runtime" /> + <property name="javadoc.bottom" value="Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="http://jcp.org/en/jsr/detail?id=231">license terms</a>." /> </target> - <target name="declare.gl.gles1" if="isGLES1"> - <property name="gl.headers" value="${stub.includes.dir}/opengl/GLES/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> - <property name="java.excludes.gles" value="com/sun/opengl/util/texture/**, com/sun/opengl/util/Animator.java, com/sun/opengl/util/FPSAnimator.java, com/sun/opengl/util/*Rec.java, com/sun/opengl/util/GLUT*.java, com/sun/opengl/util/Gamma.java, com/sun/opengl/util/ImageUtil.java, com/sun/opengl/util/Screenshot.java, com/sun/opengl/util/TGAWriter.java, com/sun/opengl/util/TileRenderer.java, com/sun/opengl/impl/GLObjectTracker.java, com/sun/opengl/impl/GLPbufferImpl.java, com/sun/opengl/impl/Project.java, com/sun/opengl/impl/Util.java, com/sun/opengl/impl/error/**, com/sun/opengl/impl/glue/**, com/sun/opengl/impl/mipmap/**, com/sun/opengl/impl/nurbs/**, com/sun/opengl/impl/packrect/**, com/sun/opengl/impl/registry/**, com/sun/opengl/impl/tessellator/**" /> + <target name="declare.gl.gles1" unless="jogl.noes1"> + <property name="gles1.headers" value="${stub.includes.dir}/opengl/GLES/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> </target> - <target name="declare.gl.gles2" if="isGLES2"> - <property name="gl.headers" value="${stub.includes.dir}/opengl/GLES2/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> - <property name="java.excludes.gles" value="com/sun/opengl/util/texture/**, com/sun/opengl/util/Animator.java, com/sun/opengl/util/FPSAnimator.java, com/sun/opengl/util/*Rec.java, com/sun/opengl/util/GLUT*.java, com/sun/opengl/util/Gamma.java, com/sun/opengl/util/ImageUtil.java, com/sun/opengl/util/Screenshot.java, com/sun/opengl/util/TGAWriter.java, com/sun/opengl/util/TileRenderer.java, com/sun/opengl/impl/GLObjectTracker.java, com/sun/opengl/impl/GLPbufferImpl.java, com/sun/opengl/impl/GLUquadricImpl.java, com/sun/opengl/impl/Project.java, com/sun/opengl/impl/ProjectES1.java, com/sun/opengl/impl/Util.java, com/sun/opengl/impl/error/**, com/sun/opengl/impl/glue/**, com/sun/opengl/impl/mipmap/**, com/sun/opengl/impl/nurbs/**, com/sun/opengl/impl/packrect/**, com/sun/opengl/impl/registry/**, com/sun/opengl/impl/tessellator/**" /> + <target name="declare.gl.gles2" unless="jogl.noes2"> + <property name="gles2.headers" value="${stub.includes.dir}/opengl/GLES2/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> </target> - <target name="declare.gl.gles" if="isGLES" depends="declare.gl.gles1, declare.gl.gles2"> - <!-- Use the CDC / FP classes only if we're building for the embedded system --> - <property name="javac.bootclasspath.jar" value="../../gluegen/make/lib/cdc_fp.jar" /> - <!-- Set platform directories. --> - <property name="stub.includes.platform" value="${stub.includes.dir}/gluegen_egl" /> + <target name="declare.gl.gles" unless="jogl.noes" depends="declare.gl.gles1, declare.gl.gles2"> <!-- Prepare to build the EGL interface --> - <property name="stub.includes.fileset.platform.params" value="${stub.includes.dir}/gluegen_egl/**" /> - <property name="window.cfg" value="${config}/egl.cfg" /> + <property name="window.es.cfg" value="${config}/egl.cfg" /> + <property name="window.es.system" value="gluegen_egl"/> </target> - <target name="declare.gl.desktop" unless="isGLES"> - <property name="gl.headers" value="${stub.includes.dir}/opengl/GL/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> - <property name="java.excludes.gles" value="com/sun/opengl/impl/egl/**, com/sun/opengl/impl/ProjectES1.java" /> + <target name="declare.gl.gl2" unless="jogl.nogl2"> + <property name="gl2.headers" value="${stub.includes.dir}/opengl/GL/*.h" /> <!-- NOTE: this MUST be relative for FileSet --> <!-- CHECK: this may need to be pruned for each platform --> </target> - <echo message="java.excludes.gles: ${java.excludes.gles}" /> - <!-- Declarations that have to come after both the common setup and the GLES tests --> <target name="declare.common.2"> - <!-- Java files to exclude based on platform (relative to "src.java") --> - <!-- NOTE: the OpenGL ES exclusions are due to references to unsupported APIs --> - <!-- FIXME: this needs refactoring at this point --> - <property name="java.excludes.win32" value="${java.excludes.gles}, ${java.excludes.impl.x11}, ${java.excludes.impl.win}, ${java.excludes.impl.macosx}, ${java.excludes.awt}" /> - <property name="java.excludes.x11" value="${java.excludes.gles}, ${java.excludes.impl.x11}, ${java.excludes.impl.win}, ${java.excludes.impl.macosx}, ${java.excludes.awt}" /> - <property name="java.excludes.macosx" value="${java.excludes.gles}, ${java.excludes.impl.x11}, ${java.excludes.impl.win}, ${java.excludes.impl.macosx}, ${java.excludes.awt}" /> </target> - <echo message="java.excludes.win32: ${java.excludes.win32}" /> - <echo message="java.excludes.x11: ${java.excludes.x11}" /> - <echo message="java.excludes.macosx: ${java.excludes.macosx}" /> - <!-- ================================================================== --> <!-- - - Platform specific declares. + - Platform specific declares - COMPILER --> <target name="declare.win32.vc6" if="isVC6"> <echo message="Win32.VC6" /> @@ -419,71 +515,6 @@ <property name="linker.cfg.id.core" value="linker.cfg.win32.mingw.jogl" /> </target> - <target name="declare.win32.gles1" if="isGLES1"> - <property name="gl.cfg" value="${config}/gl-es1.cfg" /> - <property name="gl.c" value="${stub.includes.common}/gles1.c" /> - <property name="glu.cfg" value="${config}/glu-es1.cfg" /> - </target> - - <target name="declare.win32.gles2" if="isGLES2"> - <property name="gl.cfg" value="${config}/gl-es2.cfg" /> - <property name="gl.c" value="${stub.includes.common}/gles2.c" /> - <property name="glu.cfg" value="${config}/glu-es2.cfg" /> - </target> - - <target name="declare.win32.gles" depends="declare.win32.gles1, declare.win32.gles2" /> - - <target name="declare.win32.desktop" unless="isGLES"> - <property name="gl.cfg" value="${config}/gl-win32.cfg" /> - <property name="gl.c" value="${stub.includes.common}/gl.c" /> - <property name="glu.cfg" value="${config}/glu-win32.cfg" /> - <!-- Set platform directories. --> - <property name="stub.includes.platform" value="${stub.includes}/win32" /> - <!-- Prepare to build the Windows class for access to the window system --> - <property name="stub.includes.fileset.platform.params" value="${stub.includes.dir}/win32/** ${stub.includes.dir}/common/** ${stub.includes.dir}/opengl/**" /> - <property name="window.cfg" value="${config}/wingdi-win32.cfg" /> - </target> - - <target name="declare.win32" depends="declare.win32.vc6,declare.win32.vc7,declare.win32.vc8,declare.win32.vc8_x64,declare.win32.mingw,declare.win32.gles,declare.win32.desktop" if="isWindows"> - <!-- Set platform configuration files. --> - <property name="gl.cfg.nsig" value="${config}/gl-win32-nsig.cfg" /> - <property name="glext.platform.cfg" value="${config}/wglext.cfg" /> - <property name="jawt.cfg" value="${config}/jawt-win32.cfg" /> - - <!-- Set platform headers. --> - <property name="glext.platform.header" value="${stub.includes.dir}/win32/wglext.c" /> - - <!-- Set platform directories. --> - <property name="java.includes.dir.platform" value="${java.includes.dir.win32}" /> - <property name="java.lib.dir.platform" value="${java.lib.dir.win32}" /> - <property name="java.excludes.platform" value="${java.excludes.win32}" /> - - <!-- Set Javadoc properties. --> - <property name="javadoc.dev.packagenames.platform" value="${javadoc.dev.packagenames.win32}" /> - </target> - - <target name="declare.x11" depends="init" if="isX11"> - <!-- Set platform configuration files. --> - <property name="gl.cfg" value="${config}/gl-x11.cfg" /> - <property name="gl.cfg.nsig" value="${config}/gl-x11-nsig.cfg" /> - <property name="glext.platform.cfg" value="${config}/glxext.cfg" /> - <property name="glu.cfg" value="${config}/glu-x11.cfg" /> - <property name="jawt.cfg" value="${config}/jawt-x11.cfg" /> - <property name="window.cfg" value="${config}/glx-x11.cfg" /> - - <!-- Set platform headers. --> - <property name="glext.platform.header" value="${stub.includes.dir}/x11/glxext.c" /> - - <!-- Set platform directories. --> - <property name="stub.includes.platform" value="${stub.includes.x11}" /> - <property name="java.excludes.platform" value="${java.excludes.x11}" /> - <property name="stub.includes.fileset.platform.params" - value="${stub.includes.dir}/opengl/** ${stub.includes.dir}/x11/** ${stub.includes.dir}/common/**" /> - - <!-- Set Javadoc properties. --> - <property name="javadoc.dev.packagenames.platform" value="${javadoc.dev.packagenames.x11}" /> - </target> - <target name="declare.linux.x86" if="isLinuxX86"> <echo message="Linux.x86" /> <property name="java.includes.dir.platform" value="${java.includes.dir.linux}" /> @@ -542,34 +573,6 @@ <property name="linker.cfg.id.core" value="linker.cfg.solaris.amd64.jogl" /> </target> - - <target name="declare.macosx" if="isOSX"> - <echo message="MacOSX" /> - <!-- Set platform configuration files. --> - <property name="gl.cfg" value="${config}/gl-macosx.cfg" /> - <property name="gl.cfg.nsig" value="${config}/gl-macosx-nsig.cfg" /> - <property name="glext.platform.cfg" value="${config}/cglext.cfg" /> - <property name="glu.cfg" value="${config}/glu-macosx.cfg" /> - <property name="jawt.cfg" value="${config}/jawt-macosx.cfg" /> - <property name="window.cfg" value="${config}/cgl-macosx.cfg" /> - - <!-- Set platform headers. --> - <property name="glext.platform.header" value="${stub.includes.dir}/macosx/cglext.c" /> - - <!-- Set platform directories. --> - <property name="stub.includes.platform" value="${stub.includes}/macosx" /> - <property name="java.includes.dir.platform" value="${java.includes.dir.macosx}" /> - <property name="java.lib.dir.platform" value="${java.lib.dir.macosx}" /> - <property name="java.excludes.platform" value="${java.excludes.macosx}" /> - <property name="stub.includes.fileset.platform.params" value="${stub.includes.dir}/macosx/** ${stub.includes.dir}/common/** ${stub.includes.dir}/opengl/**" /> - - <!-- Set Javadoc properties. --> - <property name="javadoc.dev.packagenames.platform" value="${javadoc.dev.packagenames.macosx}" /> - - <property name="compiler.cfg.id" value="compiler.cfg.macosx" /> - <property name="linker.cfg.id.core" value="linker.cfg.macosx.jogl" /> - </target> - <target name="declare.freebsd" depends="declare.x11" if="isFreeBSD"> <echo message="FreeBSD" /> <property name="java.includes.dir.platform" value="${java.includes.dir.freebsd}" /> @@ -587,12 +590,28 @@ <property name="linker.cfg.id.core" value="linker.cfg.hpux.jogl" /> </target> + <target name="declare.win32" depends="declare.win32.vc6,declare.win32.vc7,declare.win32.vc8,declare.win32.vc8_x64,declare.win32.mingw" if="isWindows"> + <property name="java.includes.dir.platform" value="${java.includes.dir.win32}" /> + <property name="java.lib.dir.platform" value="${java.lib.dir.win32}" /> + </target> + + <target name="declare.x11" depends="init" if="isX11"> + </target> + + <target name="declare.macosx" depends="init" if="isOSX"> + <property name="java.includes.dir.platform" value="${java.includes.dir.macosx}" /> + <property name="java.lib.dir.platform" value="${java.lib.dir.macosx}" /> + + <property name="compiler.cfg.id" value="compiler.cfg.macosx" /> + <property name="linker.cfg.id.core" value="linker.cfg.macosx.jogl" /> + </target> + <!-- ================================================================== --> <!-- - Initialize all parameters required for the build and create any - required directories. --> - <target name="init" depends="declare.common, declare.gl.gles, declare.gl.desktop, declare.common.2"> + <target name="init" depends="declare.common, declare.gl.gles, declare.gl.gl2, declare.common.2"> <!-- Call the external config validator script to make sure the config is ok and consistent --> <ant antfile="${validate.user.properties}" inheritall="true"/> @@ -620,8 +639,8 @@ <ant antfile="${gluegen.build.xml}" dir="${gluegen.make.dir}" target="all" inheritAll="false"> <propertyset> <propertyref name="antlr.jar" /> - <propertyref name="gluegen.nsig" /> - <propertyref name="isCDCFP" /> + <!--propertyref name="gluegen.nsig" /--> + <propertyref name="jogl.cdcfp" /> </propertyset> </ant> </target> @@ -632,6 +651,7 @@ <target name="java.generate.check"> <!-- Blow away all target files if any dependencies are violated (the uptodate task doesn't allow arbitrary source and target filesets but should) --> + <!-- <dependset> <srcfileset refid="stub.includes.dependencies.fileset.1" /> <srcfileset refid="stub.includes.dependencies.fileset.2" /> @@ -641,97 +661,222 @@ <include name="**/*.c" /> </targetfileset> </dependset> + --> <!-- Now check for the presence of one well-known file --> - <uptodate property="java.generate.skip" - targetfile="${src.generated.java}/javax/media/opengl/GL.java"> + <uptodate property="java.generate.skip.es1" + targetfile="${src.generated.java}/javax/media/opengl/GLES1.java"> + <srcfiles refid="stub.includes.dependencies.fileset.1" /> + <srcfiles refid="stub.includes.dependencies.fileset.2" /> + <srcfiles refid="stub.includes.dependencies.fileset.3" /> + </uptodate> + <uptodate property="java.generate.skip.es2" + targetfile="${src.generated.java}/javax/media/opengl/GLES2.java"> + <srcfiles refid="stub.includes.dependencies.fileset.1" /> + <srcfiles refid="stub.includes.dependencies.fileset.2" /> + <srcfiles refid="stub.includes.dependencies.fileset.3" /> + </uptodate> + <uptodate property="java.generate.skip.gl2" + targetfile="${src.generated.java}/javax/media/opengl/GL2.java"> <srcfiles refid="stub.includes.dependencies.fileset.1" /> <srcfiles refid="stub.includes.dependencies.fileset.2" /> <srcfiles refid="stub.includes.dependencies.fileset.3" /> </uptodate> + <uptodate property="java.generate.skip.glu" + targetfile="${src.generated.java}/javax/media/opengl/glu/GLU.java"> + <srcfiles refid="stub.includes.dependencies.fileset.1" /> + <srcfiles refid="stub.includes.dependencies.fileset.2" /> + <srcfiles refid="stub.includes.dependencies.fileset.3" /> + </uptodate> + + <condition property="java.generate.skip"> + <and> + <isset property="java.generate.skip.es1"/> + <isset property="java.generate.skip.es2"/> + <isset property="java.generate.skip.gl2"/> + <isset property="java.generate.skip.glu"/> + </and> + </condition> + + <!--property name="java.generate.skip" value="true"/--> </target> - <target name="java.generate.gl" unless="gluegen.nsig"> - <!-- Generate GL interface and implementation --> - <echo message="Generating GL interface and implementation" /> - <gluegen src="${gl.c}" - config="${gl.cfg}" - includeRefid="stub.includes.fileset.all" + <target name="java.generate.gl_if"> + <echo message="Generating GL interface" /> + <gluegen src="${stub.includes.common}/gles2.c" + config="${config}/gl-if-gl.cfg" + includeRefid="stub.includes.fileset.all.gl2" + emitter="com.sun.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> + </target> + + <target name="java.generate.gl2_es1_if"> + <echo message="Generating GL2_ES1 interface" /> + <gluegen src="${stub.includes.common}/gles1.c" + config="${config}/gl-if-gl2_es1.cfg" + includeRefid="stub.includes.fileset.all.gl2" emitter="com.sun.gluegen.opengl.GLEmitter"> <classpath refid="gluegen.classpath" /> </gluegen> </target> - <target name="java.generate.gl.nsig" if="gluegen.nsig"> - <!-- Generate GL interface and implementation --> + <target name="java.generate.gl2_es2_if"> + <echo message="Generating GL2_ES2 interface" /> + <gluegen src="${stub.includes.common}/gles2.c" + config="${config}/gl-if-gl2_es2.cfg" + includeRefid="stub.includes.fileset.all.gl2" + emitter="com.sun.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> + </target> + + <target name="java.generate.gl2" unless="jogl.nogl2"> + <echo message="Generating GL2 interface and implementation" /> + <gluegen src="${stub.includes.common}/gl.c" + config="${config}/gl-gl2.cfg" + includeRefid="stub.includes.fileset.all.gl2" + emitter="com.sun.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> + </target> + + <target name="java.generate.gles1" unless="jogl.noes1"> + <echo message="Generating GLES1 interface and implementation" /> + <gluegen src="${stub.includes.common}/gles1.c" + config="${config}/gl-es1.cfg" + includeRefid="stub.includes.fileset.all.gl2" + emitter="com.sun.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> + </target> + + <target name="java.generate.gles2" unless="jogl.noes2"> + <echo message="Generating GLES2 interface and implementation" /> + <gluegen src="${stub.includes.common}/gles2.c" + config="${config}/gl-es2.cfg" + includeRefid="stub.includes.fileset.all.gl2" + emitter="com.sun.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen.classpath" /> + </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, java.generate.gles1, java.generate.gles2"/> + + <!-- target name="java.generate.gl.nsig" if="gluegen.nsig"> <echo message="Generating GL interface and implementation" /> <gluegen src="${gl.c}" config="${gl.cfg.nsig}" - includeRefid="stub.includes.fileset.all" + includeRefid="stub.includes.fileset.all.gl2" emitter="com.sun.gluegen.nativesig.NativeSignatureEmitter"> <classpath refid="gluegen.classpath" /> </gluegen> + </target> --> + + <target name="java.generate.glu.If"> + <echo message="Generating GLU class" /> + <gluegen src="${stub.includes.common}/glu.c" + config="${config}/glu-es1_if.cfg" + includeRefid="stub.includes.fileset.all.gl2" + emitter="com.sun.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> </target> - <target name="java.generate.glu"> + <target name="java.generate.glu.ES1" unless="jogl.noes1"> <echo message="Generating GLU class" /> <gluegen src="${stub.includes.common}/glu.c" - config="${glu.cfg}" - includeRefid="stub.includes.fileset.all" + config="${config}/glu-es1.cfg" + includeRefid="stub.includes.fileset.all.gl2" emitter="com.sun.gluegen.opengl.GLEmitter"> <classpath refid="gluegen.classpath" /> </gluegen> </target> - <target name="java.generate.platform.glext" unless="isGLES"> - <!-- Generate platform-specific extension class (WGLExt, GLXExt, etc.) --> + <target name="java.generate.glu.GL2" unless="jogl.nogl2"> + <echo message="Generating GLU class" /> + <gluegen src="${stub.includes.common}/glu.c" + config="${config}/glu-gl2.cfg" + includeRefid="stub.includes.fileset.all.gl2" + emitter="com.sun.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> + </target> + + <target name="java.generate.platform.glext" unless="jogl.nogl2"> <echo message="Generating platform-specific OpenGL extension class" /> <gluegen src="${glext.platform.header}" config="${glext.platform.cfg}" - includeRefid="stub.includes.fileset.all" + includeRefid="stub.includes.fileset.all.gl2" + emitter="com.sun.gluegen.opengl.GLEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> + </target> + + <target name="java.generate.window.lib" if="windowlib.os.cfg"> + <echo message="Generating Windowing Lib implementation class" /> + <gluegen src="${stub.includes.dir}/${window.os.system}/window-lib.c" + config="${windowlib.os.cfg}" + includeRefid="stub.includes.fileset.platform" + emitter="com.sun.gluegen.JavaEmitter"> + <classpath refid="gluegen.classpath" /> + </gluegen> + </target> + + <target name="java.generate.window.system.es" if="window.es.cfg" unless="jogl.noes"> + <echo message="Generating EGL implementation class" /> + <gluegen src="${stub.includes.dir}/${window.es.system}/window-system.c" + config="${window.es.cfg}" + includeRefid="stub.includes.fileset.platform" emitter="com.sun.gluegen.opengl.GLEmitter"> <classpath refid="gluegen.classpath" /> </gluegen> </target> - <target name="java.generate.window.system"> - <!-- Generate WGL/GLX/CGL/EGL implementation class --> - <!-- FIXME: should probably always generate the EGL binding at this point --> + <target name="java.generate.window.system.os" if="window.os.cfg" unless="jogl.nogl2"> <echo message="Generating WGL/GLX/CGL/EGL implementation class" /> - <dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes.fileset.platform.params}" /> - <gluegen src="${stub.includes.platform}/window-system.c" - config="${window.cfg}" + <gluegen src="${stub.includes.dir}/${window.os.system}/window-system.c" + config="${window.os.cfg}" includeRefid="stub.includes.fileset.platform" emitter="com.sun.gluegen.opengl.GLEmitter"> <classpath refid="gluegen.classpath" /> </gluegen> </target> - <target name="java.generate.jawt" unless="isGLES"> + <target name="java.generate.jawt" unless="jogl.noAWT"> <!-- NOTE: the "literalInclude" in this GlueGen call is simply to - get around the fact that neither FileSet nor DirSet can - handle different drives in an effective manner. --> <echo message="Generating JAWT interface class" /> <echo message="java.home.dir=${java.home.dir}" /> - <gluegen src="${java.includes.dir.platform}/jawt_md.h" + <gluegen src="${jawt.platform.header}" config="${jawt.cfg}" - literalInclude="${java.includes.dir}" + literalInclude="${stub.includes.dir}/jni" includeRefid="stub.includes.fileset.platform" emitter="com.sun.gluegen.JavaEmitter"> <classpath refid="gluegen.classpath" /> </gluegen> </target> - <target name="java.generate.BufferUtil.javame_cdc_fp" if="isCDCFP"> - <copy file="../src/classes/com/sun/opengl/util/BufferUtil.java.javame_cdc_fp" tofile="../build/gensrc/classes/com/sun/opengl/util/BufferUtil.java" /> + <target name="java.generate.BufferUtil.javame_cdc_fp" if="jogl.cdcfp"> + <copy file="../src/classes/javax/media/opengl/util/BufferUtil.java.javame_cdc_fp" tofile="../build/gensrc/classes/javax/media/opengl/util/BufferUtil.java" /> </target> - <target name="java.generate.BufferUtil.javase" unless="isCDCFP"> - <copy file="../src/classes/com/sun/opengl/util/BufferUtil.java.javase" tofile="../build/gensrc/classes/com/sun/opengl/util/BufferUtil.java" /> + <target name="java.generate.BufferUtil.javase" unless="jogl.cdcfp"> + <copy file="../src/classes/javax/media/opengl/util/BufferUtil.java.javase" tofile="../build/gensrc/classes/javax/media/opengl/util/BufferUtil.java" /> </target> <target name="java.generate.BufferUtil" depends="java.generate.BufferUtil.javase, java.generate.BufferUtil.javame_cdc_fp" /> + <target name="java.generate.gl.platforms" > + <dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes.dir}/${window.os.system}/** ${stub.includes.dir}/${window.es.system}/** ${stub.includes.dir}/common/** ${stub.includes.dir}/opengl/**" /> + + <antcall target="java.generate.platform.glext" inheritRefs="true" /> + <antcall target="java.generate.window.lib" inheritRefs="true" /> + <antcall target="java.generate.window.system.os" inheritRefs="true" /> + <antcall target="java.generate.jawt" inheritRefs="true" /> + </target> + <!-- - Setup the generating ANT tasks and use it to generate the Java files - from the C GL headers. This involves setting the taskdef and creating @@ -747,36 +892,59 @@ <!-- Use the GlueGen and BuildStaticGLInfo tasks to generate the - Java files --> - <!-- Generate GL interface and implementation --> - <antcall target="java.generate.gl" inheritRefs="true" /> - <antcall target="java.generate.gl.nsig" inheritRefs="true" /> - - <!-- Generate platform-specific extension class (WGLExt, GLXExt, etc.) --> - <antcall target="java.generate.platform.glext" inheritRefs="true" /> - - <!-- Generate WGL/GLX/CGL implementation class --> - <antcall target="java.generate.window.system" inheritRefs="true" /> - - <!-- Generate JAWT class --> - <antcall target="java.generate.jawt" inheritRefs="true" /> + <echo message="Generating GL interface and implementation" /> + <antcall target="java.generate.gl.all" inheritRefs="true" /> + <!--antcall target="java.generate.gl.nsig" inheritRefs="true" /--> + + <echo message="Generating EGL implementation class" /> + <antcall target="java.generate.window.system.es" inheritRefs="true" /> + + <echo message="Generating platform-specifics: X11" /> + <antcall target="java.generate.gl.platforms" inheritRefs="true"> + <param name="window.os.system" value="x11"/> + <param name="window.os.cfg" value="${config}/glx-x11.cfg" /> + <param name="windowlib.os.cfg" value="${config}/x11-lib.cfg" /> + <param name="glext.platform.cfg" value="${config}/glxext.cfg" /> + <param name="glext.platform.header" value="${stub.includes.dir}/x11/glxext.c" /> + <param name="jawt.cfg" value="${config}/jawt-x11.cfg" /> + <param name="jawt.platform.header" value="${stub.includes.dir}/jni/x11/jawt_md.h" /> + </antcall> - <!-- Generate StaticGLInfo class --> + <echo message="Generating platform-specifics: Win32" /> + <antcall target="java.generate.gl.platforms" inheritRefs="true"> + <param name="window.os.system" value="win32"/> + <param name="window.os.cfg" value="${config}/wgl-win32.cfg" /> + <param name="glext.platform.cfg" value="${config}/wglext.cfg" /> + <param name="glext.platform.header" value="${stub.includes.dir}/win32/wglext.c" /> + <param name="jawt.cfg" value="${config}/jawt-win32.cfg" /> + <param name="jawt.platform.header" value="${stub.includes.dir}/jni/win32/jawt_md.h" /> + </antcall> + + <echo message="Generating platform-specifics: MaxOsX" /> + <antcall target="java.generate.gl.platforms" inheritRefs="true"> + <param name="window.os.system" value="macosx"/> + <param name="window.os.cfg" value="${config}/cgl-macosx.cfg" /> + <param name="glext.platform.cfg" value="${config}/cglext.cfg" /> + <param name="glext.platform.header" value="${stub.includes.dir}/macosx/cglext.c" /> + <param name="jawt.cfg" value="${config}/jawt-macosx.cfg" /> + <param name="jawt.platform.header" value="${stub.includes.dir}/jni/macosx/jawt_md.h" /> + </antcall> + <echo message="Generating StaticGLInfo class" /> <staticglgen package="com.sun.opengl.impl" - headers="${gl.headers}" + headers="${gl2.headers} ${gles1.headers} ${gles2.headers}" outputdir="${src.generated.java}/com/sun/opengl/impl"> <classpath refid="gluegen.classpath" /> </staticglgen> - <!-- Generate GLU class --> - <!-- NOTE: massively stripped down for embedded OpenGL - because the implementation uses immediate mode calls not - available on GLES1 or GLES2 --> - <antcall target="java.generate.glu" inheritrefs="true" /> - <!-- Generate the BufferUtil class for this particular profile --> <antcall target="java.generate.BufferUtil" inheritrefs="true" /> + <!-- Generate GLU class --> + <antcall target="java.generate.glu.If" inheritrefs="true" /> + <antcall target="java.generate.glu.ES1" inheritrefs="true" /> + <antcall target="java.generate.glu.GL2" inheritrefs="true" /> + <!-- Inform the user that the generators have successfully created - the necessary Java files --> <echo message="" /> @@ -827,29 +995,91 @@ <!-- - Build and dependency rules for the composable pipeline --> - <target name="java.generate.composable.pipeline.check"> - <!-- Blow away the DebugGL.java and TraceGL.java sources if GL.class has changed + <target name="java.generate.composable.pipeline.check.es1" unless="jogl.noes1"> + <!-- 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="GL.class" /> + <srcfilelist dir="${classes}/javax/media/opengl" files="GLES1.class" /> <targetfileset dir="${src.generated.java}/javax/media/opengl" - includes="DebugGL.java,TraceGL.java" /> + includes="DebugGLES1.java,TraceGLES1.java" /> </dependset> <!-- Now choose one of the two to test to see if we have to regenerate --> - <uptodate property="java.generate.composable.pipeline.skip" - srcfile="${classes}/javax/media/opengl/GL.class" - targetfile="${src.generated.java}/javax/media/opengl/DebugGL.java" /> + <uptodate property="java.generate.composable.pipeline.skip.es1" + srcfile="${classes}/javax/media/opengl/GLES1.class" + targetfile="${src.generated.java}/javax/media/opengl/DebugGLES1.java" /> + </target> - <target name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.check" unless="java.generate.composable.pipeline.skip"> + <target name="java.generate.composable.pipeline.check.es2" unless="jogl.noes2"> + <!-- 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="GLES2.class" /> + <targetfileset dir="${src.generated.java}/javax/media/opengl" + includes="DebugGLES2.java,TraceGLES2.java" /> + </dependset> + + <!-- Now choose one of the two to test to see if we have to regenerate --> + <uptodate property="java.generate.composable.pipeline.skip.es2" + srcfile="${classes}/javax/media/opengl/GLES2.class" + targetfile="${src.generated.java}/javax/media/opengl/DebugGLES2.java" /> + + </target> + + <target name="java.generate.composable.pipeline.check.gl2" unless="jogl.nogl2"> + <!-- 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="GL2.class" /> + <targetfileset dir="${src.generated.java}/javax/media/opengl" + includes="DebugGL2.java,TraceGL2.java" /> + </dependset> + + <!-- Now choose one of the two to test to see if we have to regenerate --> + <uptodate property="java.generate.composable.pipeline.skip.gl2" + srcfile="${classes}/javax/media/opengl/GL2.class" + targetfile="${src.generated.java}/javax/media/opengl/DebugGL2.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.GL" /> + <arg value="javax.media.opengl.GLES1" /> <arg value="${src.generated.java}/javax/media/opengl" /> <classpath refid="pipeline.classpath" /> </java> </target> + <target name="java.generate.composable.pipeline.es2" depends="java.generate.composable.pipeline.check.es2" unless="java.generate.composable.pipeline.skip.es2"> + <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true"> + <arg value="javax.media.opengl.GLES2" /> + <arg value="${src.generated.java}/javax/media/opengl" /> + <classpath refid="pipeline.classpath" /> + </java> + </target> + + <target name="java.generate.composable.pipeline.gl2" depends="java.generate.composable.pipeline.check.gl2" unless="java.generate.composable.pipeline.skip.gl2"> + <java classname="com.sun.gluegen.opengl.BuildComposablePipeline" fork="yes" failonerror="true"> + <arg value="javax.media.opengl.GL2" /> + <arg value="${src.generated.java}/javax/media/opengl" /> + <classpath refid="pipeline.classpath" /> + </java> + </target> + + <target name="java.generate.composable.pipeline.check"> + <condition property="java.generate.composable.pipeline.skip.es1"> + <isset property="jogl.noes1"/> + </condition> + <condition property="java.generate.composable.pipeline.skip.es2"> + <isset property="jogl.noes2"/> + </condition> + <condition property="java.generate.composable.pipeline.skip.gl2"> + <isset property="jogl.nogl2"/> + </condition> + </target> + <target name="java.generate.composable.pipeline" depends="java.generate.composable.pipeline.check, java.generate.composable.pipeline.es1, java.generate.composable.pipeline.es2, java.generate.composable.pipeline.gl2"> + </target> + <!-- ================================================================== --> <!-- - Compile the original and generated source. The composable pipelines @@ -857,20 +1087,21 @@ --> <target name="java.compile.firstpass" depends="java.generate,java.generate.cg"> <!-- Perform the first pass Java compile. --> - <javac srcdir="${src.generated.java}" - destdir="${classes}" + <javac destdir="${classes}" classpath="${gluegen-rt.jar}" - includes="javax/media/opengl/GL.java" + includes="javax/media/opengl/GLDrawableFactory.java javax/media/opengl/GLDrawable.java javax/media/opengl/GLContext.java javax/media/opengl/GL.java javax/media/opengl/GL2ES1.java javax/media/opengl/GL2ES2.java javax/media/opengl/GL2.java javax/media/opengl/GLES1.java javax/media/opengl/GLES2.java" fork="yes" memoryMaximumSize="128m" source="1.4" debug="true" debuglevel="source,lines"> + <src path="${src.java}" /> + <src path="${src.generated.java}" /> </javac> </target> <target name="java.compile.secondpass" depends="java.generate.composable.pipeline"> <!-- Perform the second pass Java compile; everything. --> <javac destdir="${classes}" - excludes="${java.excludes.platform}" + excludes="${java.excludes.all}" source="${jogl.sourcelevel}" classpath="${gluegen-rt.jar}" bootclasspath="${javac.bootclasspath.jar}" @@ -940,7 +1171,7 @@ <linker id="linker.cfg.win32.msvc.jogl" extends="linker.cfg.win32.msvc"> <syslibset libs="opengl32, gdi32, user32, kernel32" /> <syslibset dir="${windows.cg.lib}" libs="cg, cgGL" if="c.compiler.use-cglib"/> - <!-- This is temporary --> + <!-- This is temporary --> <syslibset libs="winmm" /> </linker> @@ -1030,7 +1261,7 @@ <sysincludepath path="${java.includes.dir}"/> <sysincludepath path="${java.includes.dir.platform}"/> <includepath path="stub_includes/opengl"/> - <includepath path="stub_includes/egl" if="isGLES"/> + <includepath path="stub_includes/egl" if="jogl.es"/> <includepath path="stub_includes/cg" if="c.compiler.use-cglib"/> <!-- This is for the generated headers for handwritten C code --> @@ -1081,15 +1312,15 @@ <target name="c.build.jogl.core"> <!-- Generate the EGLDrawableFactory header --> <!-- FIXME: this is temporary until we fully autogenerate the EGL interface --> - <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.jar}" class="com.sun.opengl.impl.egl.EGLDrawableFactory" /> + <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.all.jar}" class="com.sun.opengl.impl.egl.EGLDrawableFactory" /> <!-- Generate the waveout Mixer header --> <!-- FIXME: this is temporary until we move this to another workspace --> - <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.jar}" class="com.sun.javafx.audio.windows.waveout.Mixer" /> + <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.all.jar}" class="com.sun.javafx.audio.windows.waveout.Mixer" /> <!-- FIXME: this is temporary until we move this to another workspace --> - <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.jar}" class="com.sun.javafx.newt.windows.WindowsWindow" /> + <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.all.jar}" class="com.sun.javafx.newt.windows.WindowsWindow" /> <!-- FIXME: this is temporary until we move this to another workspace --> - <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.jar}" class="com.sun.javafx.newt.x11.X11Window" /> + <javah destdir="../build/gensrc/native/jogl" classpath="${jogl.all.jar}" class="com.sun.javafx.newt.x11.X11Window" /> <!-- Compile stuff --> <antcall target="c.build" inheritRefs="true"> @@ -1148,7 +1379,7 @@ <!-- ================================================================== --> <!-- - - Build the jogl.jar file. + - Build the jogl.jar files. --> <target name="jar" depends="java.compile,cond-if-RImanifest,cond-else-RImanifest"/> @@ -1167,7 +1398,57 @@ <filter token="BASEVERSION" value="${base_version}"/> </filterset> </copy> - <jar manifest="tempversion" destfile="${jogl.jar}"> + + <jar manifest="tempversion" destfile="${jogl.core.jar}"> + <fileset dir="${classes}" + includes="javax/media/opengl/**, com/sun/gluegen/runtime/**, com/sun/opengl/**" + excludes="${java.excludes.fixme} ${java.part.egl}, ${java.part.gl2}, ${java.part.es1}, ${java.part.es2}, ${java.part.awt}, ${java.part.glugl2}, ${java.part.util} ${java.part.util.awt} ${java.part.util.gl2}, ${java.part.x11}, ${java.part.win}, ${java.part.macosx}, ${java.part.newt}, com/sun/opengl/impl/awt/**"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.gles1.jar}"> + <fileset dir="${classes}" + includes="${java.part.es1}"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.gles2.jar}"> + <fileset dir="${classes}" + includes="${java.part.es2}"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.egl.jar}"> + <fileset dir="${classes}" + includes="${java.part.egl}"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.gl2.jar}"> + <fileset dir="${classes}" + includes="${java.part.gl2} ${java.part.glugl2}"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.awt.jar}"> + <fileset dir="${classes}" + includes="${java.part.awt}" + excludes="com/sun/opengl/impl/x11/**, com/sun/opengl/impl/windows/**, com/sun/opengl/impl/macosx/**, com/sun/opengl/impl/awt/**"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.newt.jar}"> + <fileset dir="${classes}" + includes="${java.part.newt}"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.oswin.jar}"> + <fileset dir="${classes}" + includes="${java.part.x11}, ${java.part.win}, ${java.part.macosx}, com/sun/opengl/impl/awt/**" + excludes="com/sun/opengl/impl/**/glx/**, com/sun/opengl/impl/**/wgl/**, com/sun/opengl/impl/**/cgl/**"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.util.jar}"> + <fileset dir="${classes}" + includes="${java.part.util}" + excludes="com/sun/opengl/**/awt/**, com/sun/opengl/**/j2d/**, com/sun/opengl/**/gl2/**"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.util.gl2.jar}"> + <fileset dir="${classes}" + includes="${java.part.util.gl2}" + excludes="com/sun/opengl/**/awt/**, com/sun/opengl/**/j2d/**"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.util.awt.jar}"> + <fileset dir="${classes}" + includes="${java.part.util.awt}"/> + </jar> + <jar manifest="tempversion" destfile="${jogl.all.jar}"> <fileset dir="${classes}"> <include name="javax/media/opengl/**" /> <include name="com/sun/gluegen/runtime/**" /> @@ -1213,12 +1494,14 @@ <target name="javadoc.nocg" depends="setup.java.home.dir,init" unless="jogl.cg"> <!-- Build the general Javadoc --> <javadoc packagenames="${javadoc.packagenames}" + excludepackagenames="${java.excludes.javadoc.packagenames}" sourcepath="${src.java};${src.generated.java}" + classpath="${gluegen-rt.jar}" destdir="${javadoc}" windowtitle="${javadoc.windowtitle}" overview="${javadoc.overview}" source="1.4" linkoffline="${javadoc.link} 142-packages" - bottom="${javadoc.bottom}" > + bottom="${javadoc.bottom}" > <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" /> </javadoc> </target> @@ -1227,12 +1510,14 @@ <target name="javadoc.cg" depends="setup.java.home.dir,init" if="jogl.cg"> <!-- Build the general Javadoc --> <javadoc packagenames="${javadoc.packagenames},com.sun.opengl.cg" + excludepackagenames="${java.excludes.javadoc.packagenames}" sourcepath="${src.java};${src.generated.java}" + classpath="${gluegen-rt.jar}" destdir="${javadoc}" windowtitle="${javadoc.windowtitle}" overview="${javadoc.overview}" source="1.4" linkoffline="${javadoc.link} 142-packages" - bottom="${javadoc.bottom}" > + bottom="${javadoc.bottom}" > <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" /> </javadoc> </target> @@ -1242,7 +1527,9 @@ <target name="javadoc.spec.nocg" depends="setup.java.home.dir,init" unless="jogl.cg"> <!-- Build the general Javadoc --> <javadoc packagenames="${javadoc.spec.packagenames}" + excludepackagenames="${java.excludes.javadoc.packagenames}" sourcepath="${src.java};${src.generated.java}" + classpath="${gluegen-rt.jar}" destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}" overview="${javadoc.overview}" source="1.4" @@ -1256,7 +1543,9 @@ <target name="javadoc.spec.cg" depends="setup.java.home.dir,init" if="jogl.cg"> <!-- Build the general Javadoc --> <javadoc packagenames="${javadoc.spec.packagenames}" + excludepackagenames="${java.excludes.javadoc.packagenames}" sourcepath="${src.java};${src.generated.java}" + classpath="${gluegen-rt.jar}" destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}" overview="${javadoc.overview}" source="1.4" @@ -1270,13 +1559,15 @@ <target name="javadoc.dev.nocg" unless="jogl.cg"> <!-- Build the internal developer Javadoc --> - <javadoc packagenames="${javadoc.dev.packagenames},${javadoc.dev.packagenames.platform}" + <javadoc packagenames="${javadoc.dev.packagenames}" + excludepackagenames="${java.excludes.javadoc.packagenames}" sourcepath="${src.java};${src.generated.java}" + classpath="${gluegen-rt.jar}" destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}" overview="${javadoc.overview}" source="1.4" linkoffline="${javadoc.link} 142-packages" - bottom="${javadoc.bottom}" > + bottom="${javadoc.bottom}" > <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" /> </javadoc> </target> @@ -1284,20 +1575,20 @@ <!-- Same as above but with Cg directories added --> <target name="javadoc.dev.cg" if="jogl.cg"> <!-- Build the internal developer Javadoc --> - <javadoc packagenames="${javadoc.dev.packagenames},${javadoc.dev.packagenames.platform},com.sun.opengl.cg" + <javadoc packagenames="${javadoc.dev.packagenames},com.sun.opengl.cg" + excludepackagenames="${java.excludes.javadoc.packagenames}" sourcepath="${src.java};${src.generated.java}" + classpath="${gluegen-rt.jar}" destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}" overview="${javadoc.overview}" source="1.4" linkoffline="${javadoc.link} 142-packages" - bottom="${javadoc.bottom}" > + bottom="${javadoc.bottom}" > <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" /> </javadoc> </target> - <target name="javadoc.dev.win32" depends="setup.java.home.dir,init,declare.win32,javadoc.dev.nocg,javadoc.dev.cg" /> - <target name="javadoc.dev.x11" depends="setup.java.home.dir,init,declare.x11,javadoc.dev.nocg,javadoc.dev.cg" /> - <target name="javadoc.dev.macosx" depends="setup.java.home.dir,init,declare.macosx,javadoc.dev.nocg,javadoc.dev.cg" /> + <target name="javadoc.dev.all" depends="setup.java.home.dir,init,declare,javadoc.dev.nocg,javadoc.dev.cg" /> <!-- ================================================================== --> <!-- @@ -1326,18 +1617,18 @@ <target name="dist.check.windows" if="jogl.dist.dir"> <condition property="windows.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-win/jogl.jar" /> - <available file="${jogl.dist.dir}/jogl-win/32/jogl.dll" /> - <available file="${jogl.dist.dir}/jogl-win/32/jogl_awt.dll" /> - <available file="${jogl.dist.dir}/jogl-win/32/jogl_cg.dll" /> - <available file="${jogl.dist.dir}/jogl-win/32/gluegen-rt.dll" /> - <available file="${jogl.dist.dir}/jogl-win/32/gluegen-rt-natives-windows-i586.jar" /> - </and> - </condition> - <fail unless="windows.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-win/jogl.jar" /> + <available file="${jogl.dist.dir}/jogl-win/32/jogl.dll" /> + <available file="${jogl.dist.dir}/jogl-win/32/jogl_awt.dll" /> + <available file="${jogl.dist.dir}/jogl-win/32/jogl_cg.dll" /> + <available file="${jogl.dist.dir}/jogl-win/32/gluegen-rt.dll" /> + <available file="${jogl.dist.dir}/jogl-win/32/gluegen-rt-natives-windows-i586.jar" /> + </and> + </condition> + <fail unless="windows.complete"> ****************************************************************** - ** Files are missing from the Windows build. This will cause ** + ** Files are missing from the Windows build. This will cause ** ** the distribution to be incomplete. Please check the status ** ** of the Windows build and try again. ** ****************************************************************** @@ -1346,17 +1637,17 @@ <target name="dist.check.windows-amd64" if="jogl.dist.dir"> <condition property="windows-amd64.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-win/64/jogl.dll" /> - <available file="${jogl.dist.dir}/jogl-win/64/jogl_awt.dll" /> - <available file="${jogl.dist.dir}/jogl-win/64/jogl_cg.dll" /> - <available file="${jogl.dist.dir}/jogl-win/64/gluegen-rt.dll" /> - <available file="${jogl.dist.dir}/jogl-win/64/gluegen-rt-natives-windows-amd64.jar" /> - </and> - </condition> - <fail unless="windows-amd64.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-win/64/jogl.dll" /> + <available file="${jogl.dist.dir}/jogl-win/64/jogl_awt.dll" /> + <available file="${jogl.dist.dir}/jogl-win/64/jogl_cg.dll" /> + <available file="${jogl.dist.dir}/jogl-win/64/gluegen-rt.dll" /> + <available file="${jogl.dist.dir}/jogl-win/64/gluegen-rt-natives-windows-amd64.jar" /> + </and> + </condition> + <fail unless="windows-amd64.complete"> ********************************************************************* - ** Files are missing from the Windows/AMD64 build. This will cause ** + ** Files are missing from the Windows/AMD64 build. This will cause ** ** the distribution to be incomplete. Please check the status ** ** of the Windows/AMD64 build and try again. ** ********************************************************************* @@ -1365,25 +1656,25 @@ <target name="dist.check.linux" if="jogl.dist.dir"> <condition property="linux.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-linux/jogl.jar" /> - <available file="${jogl.dist.dir}/jogl-linux/32/libjogl.so" /> - <available file="${jogl.dist.dir}/jogl-linux/32/libjogl_awt.so" /> - <available file="${jogl.dist.dir}/jogl-linux/32/libjogl_cg.so" /> - <available file="${jogl.dist.dir}/jogl-linux/32/libgluegen-rt.so" /> - <available file="${jogl.dist.dir}/jogl-linux/32/gluegen-rt-natives-linux-i586.jar" /> - <!-- Assume we also copy over these generated files in the Linux build --> - <!-- in order to satisfy requests from end users that we provide these --> - <!-- files for easier source browsing in IDEs --> - <available file="${jogl.dist.dir}/jogl-linux/DebugGL.java" /> - <available file="${jogl.dist.dir}/jogl-linux/TraceGL.java" /> - <available file="${jogl.dist.dir}/jogl-linux/GL.java" /> - <available file="${jogl.dist.dir}/jogl-linux/GLU.java" /> - </and> - </condition> - <fail unless="linux.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-linux/jogl.jar" /> + <available file="${jogl.dist.dir}/jogl-linux/32/libjogl.so" /> + <available file="${jogl.dist.dir}/jogl-linux/32/libjogl_awt.so" /> + <available file="${jogl.dist.dir}/jogl-linux/32/libjogl_cg.so" /> + <available file="${jogl.dist.dir}/jogl-linux/32/libgluegen-rt.so" /> + <available file="${jogl.dist.dir}/jogl-linux/32/gluegen-rt-natives-linux-i586.jar" /> + <!-- Assume we also copy over these generated files in the Linux build --> + <!-- in order to satisfy requests from end users that we provide these --> + <!-- files for easier source browsing in IDEs --> + <available file="${jogl.dist.dir}/jogl-linux/DebugGL2.java" /> + <available file="${jogl.dist.dir}/jogl-linux/TraceGL2.java" /> + <available file="${jogl.dist.dir}/jogl-linux/GL.java" /> + <available file="${jogl.dist.dir}/jogl-linux/GLU.java" /> + </and> + </condition> + <fail unless="linux.complete"> ****************************************************************** - ** Files are missing from the Linux build. This will cause ** + ** Files are missing from the Linux build. This will cause ** ** the distribution to be incomplete. Please check the status ** ** of the Linux build and try again. ** ****************************************************************** @@ -1392,17 +1683,17 @@ <target name="dist.check.linux-amd64" if="jogl.dist.dir"> <condition property="linux-amd64.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-linux/64/libjogl.so" /> - <available file="${jogl.dist.dir}/jogl-linux/64/libjogl_awt.so" /> - <available file="${jogl.dist.dir}/jogl-linux/64/libjogl_cg.so" /> - <available file="${jogl.dist.dir}/jogl-linux/64/libgluegen-rt.so" /> - <available file="${jogl.dist.dir}/jogl-linux/64/gluegen-rt-natives-linux-amd64.jar" /> - </and> - </condition> - <fail unless="linux-amd64.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-linux/64/libjogl.so" /> + <available file="${jogl.dist.dir}/jogl-linux/64/libjogl_awt.so" /> + <available file="${jogl.dist.dir}/jogl-linux/64/libjogl_cg.so" /> + <available file="${jogl.dist.dir}/jogl-linux/64/libgluegen-rt.so" /> + <available file="${jogl.dist.dir}/jogl-linux/64/gluegen-rt-natives-linux-amd64.jar" /> + </and> + </condition> + <fail unless="linux-amd64.complete"> ******************************************************************* - ** Files are missing from the Linux/AMD64 build. This will cause ** + ** Files are missing from the Linux/AMD64 build. This will cause ** ** the distribution to be incomplete. Please check the status ** ** of the Linux/AMD64 build and try again. ** ******************************************************************* @@ -1411,18 +1702,18 @@ <target name="dist.check.macosx" if="jogl.dist.dir"> <condition property="macosx.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-macosx/jogl.jar" /> - <available file="${jogl.dist.dir}/jogl-macosx/ppc/libjogl.jnilib" /> - <available file="${jogl.dist.dir}/jogl-macosx/ppc/libjogl_awt.jnilib" /> - <available file="${jogl.dist.dir}/jogl-macosx/ppc/libjogl_cg.jnilib" /> - <available file="${jogl.dist.dir}/jogl-macosx/ppc/libgluegen-rt.jnilib" /> - <available file="${jogl.dist.dir}/jogl-macosx/ppc/gluegen-rt-natives-macosx-ppc.jar" /> - </and> - </condition> - <fail unless="macosx.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-macosx/jogl.jar" /> + <available file="${jogl.dist.dir}/jogl-macosx/ppc/libjogl.jnilib" /> + <available file="${jogl.dist.dir}/jogl-macosx/ppc/libjogl_awt.jnilib" /> + <available file="${jogl.dist.dir}/jogl-macosx/ppc/libjogl_cg.jnilib" /> + <available file="${jogl.dist.dir}/jogl-macosx/ppc/libgluegen-rt.jnilib" /> + <available file="${jogl.dist.dir}/jogl-macosx/ppc/gluegen-rt-natives-macosx-ppc.jar" /> + </and> + </condition> + <fail unless="macosx.complete"> ****************************************************************** - ** Files are missing from the Mac OS X build. This will cause ** + ** Files are missing from the Mac OS X build. This will cause ** ** the distribution to be incomplete. Please check the status ** ** of the Mac OS X build and try again. ** ****************************************************************** @@ -1432,18 +1723,18 @@ <target name="dist.check.macosxfat" if="jogl.dist.dir"> <condition property="macosxfat.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-macosx/jogl.jar" /> - <available file="${jogl.dist.dir}/jogl-macosx/fat/libjogl.jnilib" /> - <available file="${jogl.dist.dir}/jogl-macosx/fat/libjogl_awt.jnilib" /> - <available file="${jogl.dist.dir}/jogl-macosx/fat/libjogl_cg.jnilib" /> - <available file="${jogl.dist.dir}/jogl-macosx/fat/libgluegen-rt.jnilib" /> - <available file="${jogl.dist.dir}/jogl-macosx/fat/gluegen-rt-natives-macosx-universal.jar" /> - </and> - </condition> - <fail unless="macosxfat.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-macosx/jogl.jar" /> + <available file="${jogl.dist.dir}/jogl-macosx/fat/libjogl.jnilib" /> + <available file="${jogl.dist.dir}/jogl-macosx/fat/libjogl_awt.jnilib" /> + <available file="${jogl.dist.dir}/jogl-macosx/fat/libjogl_cg.jnilib" /> + <available file="${jogl.dist.dir}/jogl-macosx/fat/libgluegen-rt.jnilib" /> + <available file="${jogl.dist.dir}/jogl-macosx/fat/gluegen-rt-natives-macosx-universal.jar" /> + </and> + </condition> + <fail unless="macosxfat.complete"> ****************************************************************** - ** Files are missing from the Mac OS X build. This will cause ** + ** Files are missing from the Mac OS X build. This will cause ** ** the distribution to be incomplete. Please check the status ** ** of the Mac OS X build and try again. ** ****************************************************************** @@ -1454,17 +1745,17 @@ <target name="dist.check.solsparc" if="jogl.dist.dir"> <condition property="solsparc.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-solsparc/jogl.jar" /> - <available file="${jogl.dist.dir}/jogl-solsparc/32/libjogl.so" /> - <available file="${jogl.dist.dir}/jogl-solsparc/32/libjogl_awt.so" /> - <available file="${jogl.dist.dir}/jogl-solsparc/32/libgluegen-rt.so" /> - <available file="${jogl.dist.dir}/jogl-solsparc/32/gluegen-rt-natives-solaris-sparc.jar" /> - </and> - </condition> - <fail unless="solsparc.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-solsparc/jogl.jar" /> + <available file="${jogl.dist.dir}/jogl-solsparc/32/libjogl.so" /> + <available file="${jogl.dist.dir}/jogl-solsparc/32/libjogl_awt.so" /> + <available file="${jogl.dist.dir}/jogl-solsparc/32/libgluegen-rt.so" /> + <available file="${jogl.dist.dir}/jogl-solsparc/32/gluegen-rt-natives-solaris-sparc.jar" /> + </and> + </condition> + <fail unless="solsparc.complete"> ****************************************************************** - ** Files are missing from the Solaris/SPARC build. This will ** + ** Files are missing from the Solaris/SPARC build. This will ** ** cause the distribution to be incomplete. Please check the ** ** status of the Solaris/SPARC build and try again. ** ****************************************************************** @@ -1473,17 +1764,17 @@ <target name="dist.check.solsparcv9" if="jogl.dist.dir"> <condition property="solsparcv9.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-solsparc/jogl.jar" /> - <available file="${jogl.dist.dir}/jogl-solsparc/64/libjogl.so" /> - <available file="${jogl.dist.dir}/jogl-solsparc/64/libjogl_awt.so" /> - <available file="${jogl.dist.dir}/jogl-solsparc/64/libgluegen-rt.so" /> - <available file="${jogl.dist.dir}/jogl-solsparc/64/gluegen-rt-natives-solaris-sparcv9.jar" /> - </and> - </condition> - <fail unless="solsparcv9.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-solsparc/jogl.jar" /> + <available file="${jogl.dist.dir}/jogl-solsparc/64/libjogl.so" /> + <available file="${jogl.dist.dir}/jogl-solsparc/64/libjogl_awt.so" /> + <available file="${jogl.dist.dir}/jogl-solsparc/64/libgluegen-rt.so" /> + <available file="${jogl.dist.dir}/jogl-solsparc/64/gluegen-rt-natives-solaris-sparcv9.jar" /> + </and> + </condition> + <fail unless="solsparcv9.complete"> ****************************************************************** - ** Files are missing from the Solaris/SPARCv9 build. This will ** + ** Files are missing from the Solaris/SPARCv9 build. This will ** ** cause the distribution to be incomplete. Please check the ** ** status of the Solaris/SPARCv9 build and try again. ** ****************************************************************** @@ -1492,18 +1783,18 @@ <target name="dist.check.solx86" if="jogl.dist.dir"> <condition property="solx86.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-solx86/jogl.jar" /> - <available file="${jogl.dist.dir}/jogl-solx86/32/libjogl.so" /> - <available file="${jogl.dist.dir}/jogl-solx86/32/libjogl_awt.so" /> - <available file="${jogl.dist.dir}/jogl-solx86/32/libjogl_cg.so" /> - <available file="${jogl.dist.dir}/jogl-solx86/32/libgluegen-rt.so" /> - <available file="${jogl.dist.dir}/jogl-solx86/32/gluegen-rt-natives-solaris-i586.jar" /> - </and> - </condition> - <fail unless="solx86.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-solx86/jogl.jar" /> + <available file="${jogl.dist.dir}/jogl-solx86/32/libjogl.so" /> + <available file="${jogl.dist.dir}/jogl-solx86/32/libjogl_awt.so" /> + <available file="${jogl.dist.dir}/jogl-solx86/32/libjogl_cg.so" /> + <available file="${jogl.dist.dir}/jogl-solx86/32/libgluegen-rt.so" /> + <available file="${jogl.dist.dir}/jogl-solx86/32/gluegen-rt-natives-solaris-i586.jar" /> + </and> + </condition> + <fail unless="solx86.complete"> ****************************************************************** - ** Files are missing from the Solaris/x86 build. This will ** + ** Files are missing from the Solaris/x86 build. This will ** ** cause the distribution to be incomplete. Please check the ** ** status of the Solaris/x86 build and try again. ** ****************************************************************** @@ -1512,14 +1803,14 @@ <target name="dist.check.solamd64" if="jogl.dist.dir"> <condition property="solamd64.complete"> - <and> - <available file="${jogl.dist.dir}/jogl-solx86/64/libjogl.so" /> - <available file="${jogl.dist.dir}/jogl-solx86/64/libjogl_awt.so" /> - <available file="${jogl.dist.dir}/jogl-solx86/64/libgluegen-rt.so" /> - <available file="${jogl.dist.dir}/jogl-solx86/64/gluegen-rt-natives-solaris-amd64.jar" /> - </and> - </condition> - <fail unless="solamd64.complete"> + <and> + <available file="${jogl.dist.dir}/jogl-solx86/64/libjogl.so" /> + <available file="${jogl.dist.dir}/jogl-solx86/64/libjogl_awt.so" /> + <available file="${jogl.dist.dir}/jogl-solx86/64/libgluegen-rt.so" /> + <available file="${jogl.dist.dir}/jogl-solx86/64/gluegen-rt-natives-solaris-amd64.jar" /> + </and> + </condition> + <fail unless="solamd64.complete"> ****************************************************************** ** Files are missing from the Solaris/x86/64 (amd64) build. This * ** will cause the distribution ** @@ -1557,8 +1848,8 @@ <copy file="../doc/userguide/index.html" tofile="${jogl.dist.dir}/tmp/${jogl.tmp.version}/Userguide.html" /> <!-- zip it up --> <zip destfile="${jogl.dist.dir}/${jogl.tmp.version}.zip" - basedir="${jogl.dist.dir}/tmp" - includes="${jogl.tmp.version}/**" /> + basedir="${jogl.dist.dir}/tmp" + includes="${jogl.tmp.version}/**" /> </target> <target name="setup-version-RI" if="RImanifestfile"> @@ -1589,8 +1880,8 @@ </unjar> <!-- Build jar files suitable for Java Web Start --> <jar manifest="${jogl.dist.dir}/META-INF/MANIFEST.MF" destfile="${jogl.dist.dir}/jogl.jar" duplicate="preserve"> - <zipgroupfileset dir="${jogl.dist.dir}" - includes="jogl-win/jogl.jar, jogl-linux/jogl.jar, jogl-macosx/jogl.jar" /> + <zipgroupfileset dir="${jogl.dist.dir}" + includes="jogl-win/jogl.jar, jogl-linux/jogl.jar, jogl-macosx/jogl.jar" /> </jar> <!-- Apply Pack200 repacking to allow later compression by that mechanism --> <apply executable="pack200" verbose="true" > @@ -1661,20 +1952,21 @@ <fileset dir="${jogl.dist.dir}/jogl-solx86/64" includes="gluegen-natives-*.jar" /> </copy> - <!-- Build a source archive as well --> - <!-- First copy the generated files out of the Linux build results into the appropriate --> - <!-- directory of this source tree (so that they'll be blown away properly with an --> - <!-- "ant clean") --> - <mkdir dir="../build/gensrc/classes/javax/media/opengl/glu" /> - <copy file="${jogl.dist.dir}/jogl-linux/DebugGL.java" todir="../build/gensrc/classes/javax/media/opengl" /> - <copy file="${jogl.dist.dir}/jogl-linux/TraceGL.java" todir="../build/gensrc/classes/javax/media/opengl" /> - <copy file="${jogl.dist.dir}/jogl-linux/GL.java" todir="../build/gensrc/classes/javax/media/opengl" /> - <copy file="${jogl.dist.dir}/jogl-linux/GLU.java" todir="../build/gensrc/classes/javax/media/opengl/glu" /> + <!-- Build a source archive as well --> + <!-- First copy the generated files out of the Linux build results into the appropriate --> + <!-- directory of this source tree (so that they'll be blown away properly with an --> + <!-- "ant clean") --> + <mkdir dir="../build/gensrc/classes/javax/media/opengl/glu" /> + <copy file="${jogl.dist.dir}/jogl-linux/DebugGL2.java" todir="../build/gensrc/classes/javax/media/opengl" /> + <copy file="${jogl.dist.dir}/jogl-linux/TraceGL2.java" todir="../build/gensrc/classes/javax/media/opengl" /> + <copy file="${jogl.dist.dir}/jogl-linux/GL.java" todir="../build/gensrc/classes/javax/media/opengl" /> + <copy file="${jogl.dist.dir}/jogl-linux/GLU.java" todir="../build/gensrc/classes/javax/media/opengl/glu" /> + <copy file="${jogl.dist.dir}/jogl-linux/GLUquadric.java" todir="../build/gensrc/classes/javax/media/opengl/glu" /> <zip destfile="${jogl.dist.dir}/jogl-${tmp.version}-src.zip" - basedir="../.." - includes="gluegen/LICENSE.txt,gluegen/doc/**,gluegen/make/**,gluegen/src/**,jogl/*.txt,jogl/build/gensrc/classes/javax/media/opengl/**,jogl/doc/**,jogl/make/**,jogl/src/**" - excludes="**/*.class,**/*~" - /> + basedir="../.." + includes="gluegen/LICENSE.txt,gluegen/doc/**,gluegen/make/**,gluegen/src/**,jogl/*.txt,jogl/build/gensrc/classes/javax/media/opengl/**,jogl/doc/**,jogl/make/**,jogl/src/**" + excludes="**/*.class,**/*~" + /> <!-- Create zip archives suitable for developers --> <!-- Unfortunately, we have to replicate the os/arch name combinations from gluegen-cpptasks.xml. The reason for this is that we can't generate these @@ -1733,8 +2025,8 @@ <!-- Create one last zip archive by hand, this one containing all of the --> <!-- Java Web Start jar files (for easier redistribution) --> <zip destfile="${jogl.dist.dir}/jogl-${tmp.version}-webstart.zip" - basedir="${jogl.dist.dir}" - includes="*.jar" /> + basedir="${jogl.dist.dir}" + includes="*.jar" /> <!-- Create a version.txt file indicating which version we just built --> <echo message="${tmp.version}" file="${jogl.dist.dir}/version.txt" /> </target> diff --git a/make/cgl-macosx.cfg b/make/cgl-macosx.cfg index 33613ecaf..21409e84a 100644 --- a/make/cgl-macosx.cfg +++ b/make/cgl-macosx.cfg @@ -1,11 +1,11 @@ # This .cfg file is used to generate the interface to the CGL routines # used internally by the MacOSXGLContext implementation. -Package com.sun.opengl.impl.macosx -JavaOutputDir ..\build\gensrc\classes -NativeOutputDir ..\build\gensrc\native\jogl +Package com.sun.opengl.impl.macosx.cgl +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl JavaClass CGL Style allstatic -Include gl-common-macosx.cfg +Include gl-common-gl2.cfg Include gl-desktop.cfg Opaque long void * diff --git a/make/cglext.cfg b/make/cglext.cfg index cf930c17f..b37cdfc6c 100755 --- a/make/cglext.cfg +++ b/make/cglext.cfg @@ -3,12 +3,12 @@ # Note that there are currently no such extensions exposed on Mac OS # X, but if in the future there are, this structure will allow them to # be easily exposed. -Package com.sun.opengl.impl.macosx +Package com.sun.opengl.impl.macosx.cgl Style InterfaceAndImpl JavaClass CGLExt -ImplPackage com.sun.opengl.impl.macosx +ImplPackage com.sun.opengl.impl.macosx.cgl ImplJavaClass CGLExtImpl -Include gl-common-macosx.cfg +Include gl-common-gl2.cfg Include gl-desktop.cfg EmitProcAddressTable true @@ -37,7 +37,7 @@ CustomCCode typedef unsigned int* PUINT; CustomJavaCode CGLExt public boolean isFunctionAvailable(String glFunctionName); CustomJavaCode CGLExt public boolean isExtensionAvailable(String glExtensionName); -CustomJavaCode CGLExtImpl public CGLExtImpl(MacOSXGLContext context) { +CustomJavaCode CGLExtImpl public CGLExtImpl(MacOSXCGLContext context) { CustomJavaCode CGLExtImpl this._context = context; CustomJavaCode CGLExtImpl } @@ -51,4 +51,4 @@ CustomJavaCode CGLExtImpl { CustomJavaCode CGLExtImpl return _context.isExtensionAvailable(glExtensionName); CustomJavaCode CGLExtImpl } -CustomJavaCode CGLExtImpl private MacOSXGLContext _context; +CustomJavaCode CGLExtImpl private MacOSXCGLContext _context; diff --git a/make/egl.cfg b/make/egl.cfg index 9733114f2..2ba4addd5 100755 --- a/make/egl.cfg +++ b/make/egl.cfg @@ -1,8 +1,8 @@ # This .cfg file is used to generate the interface to the EGL routines # used internally by the EGLContext implementation. Package com.sun.opengl.impl.egl -JavaOutputDir ..\build\gensrc\classes -NativeOutputDir ..\build\gensrc\native\jogl +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl JavaClass EGL Style allstatic # Shouldn't matter which one of these we pick up diff --git a/make/gl-common-extensions.cfg b/make/gl-common-extensions.cfg new file mode 100644 index 000000000..da5542cb4 --- /dev/null +++ b/make/gl-common-extensions.cfg @@ -0,0 +1,62 @@ +# There are a few routines we don't handle yet +Ignore glGetBufferPointerivNV +Ignore glGetBufferPointervOES + +# multiple function entries (extension and clean) +Ignore glClearDepthfOES +Ignore glClipPlanefOES +Ignore glDepthRangefOES +Ignore glFrustumfOES +Ignore glOrthofOES +Ignore glMapBufferARB +Ignore glUnmapBufferARB +Ignore GL_RGB8_OES +Ignore GL_RGBA8_OES +Ignore GL_RGB8 +Ignore GL_RGBA8 + +# normalise extensions +RenameJavaMethod glBindFramebufferEXT glBindFramebuffer +RenameJavaMethod glBindFramebufferOES glBindFramebuffer +RenameJavaMethod glBindRenderbufferEXT glBindRenderbuffer +RenameJavaMethod glBindRenderbufferOES glBindRenderbuffer +RenameJavaMethod glBlendEquationOES glBlendEquation +RenameJavaMethod glBlendEquationSeparateOES glBlendEquationSeparate +RenameJavaMethod glBlendFuncSeparateOES glBlendFuncSeparate +RenameJavaMethod glCheckFramebufferStatusEXT glCheckFramebufferStatus +RenameJavaMethod glCheckFramebufferStatusOES glCheckFramebufferStatus +RenameJavaMethod glClipPlanefOES glClipPlanef +RenameJavaMethod glDeleteFramebuffersEXT glDeleteFramebuffers +RenameJavaMethod glDeleteFramebuffersOES glDeleteFramebuffers +RenameJavaMethod glDeleteRenderbuffersEXT glDeleteRenderbuffers +RenameJavaMethod glDeleteRenderbuffersOES glDeleteRenderbuffers +RenameJavaMethod glFramebufferRenderbufferEXT glFramebufferRenderbuffer +RenameJavaMethod glFramebufferRenderbufferOES glFramebufferRenderbuffer +RenameJavaMethod glFramebufferTexture2DEXT glFramebufferTexture2D +RenameJavaMethod glFramebufferTexture2DOES glFramebufferTexture2D +RenameJavaMethod glGenerateMipmapEXT glGenerateMipmap +RenameJavaMethod glGenerateMipmapOES glGenerateMipmap +RenameJavaMethod glGenFramebuffersEXT glGenFramebuffers +RenameJavaMethod glGenFramebuffersOES glGenFramebuffers +RenameJavaMethod glGenRenderbuffersEXT glGenRenderbuffers +RenameJavaMethod glGenRenderbuffersOES glGenRenderbuffers +RenameJavaMethod glGetFramebufferAttachmentParameterivEXT glGetFramebufferAttachmentParameteriv +RenameJavaMethod glGetFramebufferAttachmentParameterivOES glGetFramebufferAttachmentParameteriv +RenameJavaMethod glGetRenderbufferParameterivEXT glGetRenderbufferParameteriv +RenameJavaMethod glGetRenderbufferParameterivOES glGetRenderbufferParameteriv +RenameJavaMethod glGetTexGenfvOES glGetTexGenfv +RenameJavaMethod glGetTexGenivOES glGetTexGeniv +RenameJavaMethod glIsFramebufferEXT glIsFramebuffer +RenameJavaMethod glIsFramebufferOES glIsFramebuffer +RenameJavaMethod glIsRenderbufferEXT glIsRenderbuffer +RenameJavaMethod glIsRenderbufferOES glIsRenderbuffer +RenameJavaMethod glMatrixIndexPointerARB glMatrixIndexPointer +RenameJavaMethod glMatrixIndexPointerOES glMatrixIndexPointer +RenameJavaMethod glRenderbufferStorageEXT glRenderbufferStorage +RenameJavaMethod glRenderbufferStorageOES glRenderbufferStorage +RenameJavaMethod glTexGenfOES glTexGenf +RenameJavaMethod glTexGenfvOES glTexGenfv +RenameJavaMethod glTexGeniOES glTexGeni +RenameJavaMethod glTexGenivOES glTexGeniv +RenameJavaMethod glMapBufferOES glMapBuffer +RenameJavaMethod glUnmapBufferOES glUnmapBuffer diff --git a/make/gl-common-gl2.cfg b/make/gl-common-gl2.cfg new file mode 100644 index 000000000..599793b74 --- /dev/null +++ b/make/gl-common-gl2.cfg @@ -0,0 +1,10 @@ +# This .cfg file provides common options used among all GL glue code +# generated for Jogl on Windows. + +HierarchicalNativeOutput false +Include gl-common.cfg +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl + +# XID needs to be treated as a long for 32/64 bit compatibility +Opaque long XID diff --git a/make/gl-common.cfg b/make/gl-common.cfg index bdec29490..56939cd89 100644 --- a/make/gl-common.cfg +++ b/make/gl-common.cfg @@ -1,6 +1,8 @@ # This .cfg file provides common options used among all glue code # generated for Jogl on all platforms. +Include gl-common-extensions.cfg + # Raise GLException instead of RuntimeException in glue code RuntimeExceptionType GLException @@ -13,6 +15,7 @@ Import com.sun.opengl.impl.* ##################################################################### # Mostly desktop OpenGL stuff below # +Ignore GL_INVALID_FRAMEBUFFER_OPERATION.* # Don't output #defines of GL version identifier strings as constants, # because we don't need them java-side. @@ -59,14 +62,14 @@ Ignore glGetVertexAttribPointervARB Ignore glGetVertexAttribPointervNV Ignore glTracePointerRangeMESA -# Manually implement glMapBuffer and glMapBufferARB as the size of the returned buffer +# Manually implement glMapBuffer as the size of the returned buffer # can only be computed by calling another routine ManuallyImplement glMapBuffer -ManuallyImplement glMapBufferARB +ManuallyImplement glMapBufferOES # Ignore the ATI_map_object_buffer extension for now unless someone # claims they need it, as it will undoubtedly require a similar -# construct to glMapBuffer/glMapBufferARB +# construct to glMapBuffer Ignore glMapObjectBufferATI Ignore glUnmapObjectBufferATI diff --git a/make/gl-desktop-tracker.cfg b/make/gl-desktop-tracker.cfg new file mode 100644 index 000000000..e169cbaed --- /dev/null +++ b/make/gl-desktop-tracker.cfg @@ -0,0 +1,45 @@ + +# Track server-side object creation and deletion when necessary +# Note that this is only necessary when the Java 2D / JOGL bridge is active, +# so will never be needed for the embedded OpenGL variants +JavaEpilogue glGenBuffers if (tracker != null) tracker.addBuffers({0}, {1}); +JavaEpilogue glGenBuffersARB if (tracker != null) tracker.addBuffersARB({0}, {1}); +JavaEpilogue glGenFencesAPPLE if (tracker != null) tracker.addFencesAPPLE({0}, {1}); +JavaEpilogue glGenFencesNV if (tracker != null) tracker.addFencesNV({0}, {1}); +JavaEpilogue glGenFragmentShadersATI if (tracker != null) tracker.addFragmentShadersATI(_res, {0}); +JavaEpilogue glGenFramebuffersEXT if (tracker != null) tracker.addFramebuffersEXT({0}, {1}); +JavaEpilogue glGenLists if (tracker != null) tracker.addLists(_res, {0}); +JavaEpilogue glGenOcclusionQueriesNV if (tracker != null) tracker.addOcclusionQueriesNV({0}, {1}); +JavaEpilogue glCreateProgram if (tracker != null) tracker.addProgramObject(_res); +JavaEpilogue glCreateProgramObjectARB if (tracker != null) tracker.addProgramObjectARB(_res); +JavaEpilogue glGenProgramsARB if (tracker != null) tracker.addProgramsARB({0}, {1}); +JavaEpilogue glGenProgramsNV if (tracker != null) tracker.addProgramsNV({0}, {1}); +JavaEpilogue glGenQueries if (tracker != null) tracker.addQueries({0}, {1}); +JavaEpilogue glGenQueriesARB if (tracker != null) tracker.addQueriesARB({0}, {1}); +JavaEpilogue glGenRenderbuffersEXT if (tracker != null) tracker.addRenderbuffersEXT({0}, {1}); +JavaEpilogue glCreateShader if (tracker != null) tracker.addShaderObject(_res); +JavaEpilogue glCreateShaderObjectARB if (tracker != null) tracker.addShaderObjectARB(_res); +JavaEpilogue glGenTextures if (tracker != null) tracker.addTextures({0}, {1}); +JavaEpilogue glGenVertexArraysAPPLE if (tracker != null) tracker.addVertexArraysAPPLE({0}, {1}); +JavaEpilogue glGenVertexShadersEXT if (tracker != null) tracker.addVertexShadersEXT(_res, {0}); + +JavaEpilogue glDeleteBuffers if (tracker != null) tracker.removeBuffers({0}, {1}); +JavaEpilogue glDeleteBuffersARB if (tracker != null) tracker.removeBuffersARB({0}, {1}); +JavaEpilogue glDeleteFencesAPPLE if (tracker != null) tracker.removeFencesAPPLE({0}, {1}); +JavaEpilogue glDeleteFencesNV if (tracker != null) tracker.removeFencesNV({0}, {1}); +JavaEpilogue glDeleteFragmentShaderATI if (tracker != null) tracker.removeFragmentShaderATI({0}); +JavaEpilogue glDeleteFramebuffersEXT if (tracker != null) tracker.removeFramebuffersEXT({0}, {1}); +JavaEpilogue glDeleteLists if (tracker != null) tracker.removeLists({0}, {1}); +JavaEpilogue glDeleteOcclusionQueriesNV if (tracker != null) tracker.removeOcclusionQueriesNV({0}, {1}); +JavaEpilogue glDeleteProgram if (tracker != null) tracker.removeProgramObject({0}); +JavaEpilogue glDeleteObjectARB if (tracker != null) tracker.removeProgramOrShaderObjectARB({0}); +JavaEpilogue glDeleteProgramsARB if (tracker != null) tracker.removeProgramsARB({0}, {1}); +JavaEpilogue glDeleteProgramsNV if (tracker != null) tracker.removeProgramsNV({0}, {1}); +JavaEpilogue glDeleteQueries if (tracker != null) tracker.removeQueries({0}, {1}); +JavaEpilogue glDeleteQueriesARB if (tracker != null) tracker.removeQueriesARB({0}, {1}); +JavaEpilogue glDeleteRenderbuffersEXT if (tracker != null) tracker.removeRenderbuffersEXT({0}, {1}); +JavaEpilogue glDeleteShader if (tracker != null) tracker.removeShaderObject({0}); +JavaEpilogue glDeleteTextures if (tracker != null) tracker.removeTextures({0}, {1}); +JavaEpilogue glDeleteVertexArraysAPPLE if (tracker != null) tracker.removeVertexArraysAPPLE({0}, {1}); +JavaEpilogue glDeleteVertexShaderEXT if (tracker != null) tracker.removeVertexShaderEXT({0}); + diff --git a/make/gl-desktop.cfg b/make/gl-desktop.cfg index c2e713d69..16996b913 100755 --- a/make/gl-desktop.cfg +++ b/make/gl-desktop.cfg @@ -51,49 +51,8 @@ BufferObjectKind PackPixel glGetSeparableFilter BufferObjectKind PackPixel glGetTexImage BufferObjectKind PackPixel glReadPixels -# Track server-side object creation and deletion when necessary -# Note that this is only necessary when the Java 2D / JOGL bridge is active, -# so will never be needed for the embedded OpenGL variants -JavaEpilogue glGenBuffers if (tracker != null) tracker.addBuffers({0}, {1}); -JavaEpilogue glGenBuffersARB if (tracker != null) tracker.addBuffersARB({0}, {1}); -JavaEpilogue glGenFencesAPPLE if (tracker != null) tracker.addFencesAPPLE({0}, {1}); -JavaEpilogue glGenFencesNV if (tracker != null) tracker.addFencesNV({0}, {1}); -JavaEpilogue glGenFragmentShadersATI if (tracker != null) tracker.addFragmentShadersATI(_res, {0}); -JavaEpilogue glGenFramebuffersEXT if (tracker != null) tracker.addFramebuffersEXT({0}, {1}); -JavaEpilogue glGenLists if (tracker != null) tracker.addLists(_res, {0}); -JavaEpilogue glGenOcclusionQueriesNV if (tracker != null) tracker.addOcclusionQueriesNV({0}, {1}); -JavaEpilogue glCreateProgram if (tracker != null) tracker.addProgramObject(_res); -JavaEpilogue glCreateProgramObjectARB if (tracker != null) tracker.addProgramObjectARB(_res); -JavaEpilogue glGenProgramsARB if (tracker != null) tracker.addProgramsARB({0}, {1}); -JavaEpilogue glGenProgramsNV if (tracker != null) tracker.addProgramsNV({0}, {1}); -JavaEpilogue glGenQueries if (tracker != null) tracker.addQueries({0}, {1}); -JavaEpilogue glGenQueriesARB if (tracker != null) tracker.addQueriesARB({0}, {1}); -JavaEpilogue glGenRenderbuffersEXT if (tracker != null) tracker.addRenderbuffersEXT({0}, {1}); -JavaEpilogue glCreateShader if (tracker != null) tracker.addShaderObject(_res); -JavaEpilogue glCreateShaderObjectARB if (tracker != null) tracker.addShaderObjectARB(_res); -JavaEpilogue glGenTextures if (tracker != null) tracker.addTextures({0}, {1}); -JavaEpilogue glGenVertexArraysAPPLE if (tracker != null) tracker.addVertexArraysAPPLE({0}, {1}); -JavaEpilogue glGenVertexShadersEXT if (tracker != null) tracker.addVertexShadersEXT(_res, {0}); +#Include gl-desktop-tracker.cfg -JavaEpilogue glDeleteBuffers if (tracker != null) tracker.removeBuffers({0}, {1}); -JavaEpilogue glDeleteBuffersARB if (tracker != null) tracker.removeBuffersARB({0}, {1}); -JavaEpilogue glDeleteFencesAPPLE if (tracker != null) tracker.removeFencesAPPLE({0}, {1}); -JavaEpilogue glDeleteFencesNV if (tracker != null) tracker.removeFencesNV({0}, {1}); -JavaEpilogue glDeleteFragmentShaderATI if (tracker != null) tracker.removeFragmentShaderATI({0}); -JavaEpilogue glDeleteFramebuffersEXT if (tracker != null) tracker.removeFramebuffersEXT({0}, {1}); -JavaEpilogue glDeleteLists if (tracker != null) tracker.removeLists({0}, {1}); -JavaEpilogue glDeleteOcclusionQueriesNV if (tracker != null) tracker.removeOcclusionQueriesNV({0}, {1}); -JavaEpilogue glDeleteProgram if (tracker != null) tracker.removeProgramObject({0}); -JavaEpilogue glDeleteObjectARB if (tracker != null) tracker.removeProgramOrShaderObjectARB({0}); -JavaEpilogue glDeleteProgramsARB if (tracker != null) tracker.removeProgramsARB({0}, {1}); -JavaEpilogue glDeleteProgramsNV if (tracker != null) tracker.removeProgramsNV({0}, {1}); -JavaEpilogue glDeleteQueries if (tracker != null) tracker.removeQueries({0}, {1}); -JavaEpilogue glDeleteQueriesARB if (tracker != null) tracker.removeQueriesARB({0}, {1}); -JavaEpilogue glDeleteRenderbuffersEXT if (tracker != null) tracker.removeRenderbuffersEXT({0}, {1}); -JavaEpilogue glDeleteShader if (tracker != null) tracker.removeShaderObject({0}); -JavaEpilogue glDeleteTextures if (tracker != null) tracker.removeTextures({0}, {1}); -JavaEpilogue glDeleteVertexArraysAPPLE if (tracker != null) tracker.removeVertexArraysAPPLE({0}, {1}); -JavaEpilogue glDeleteVertexShaderEXT if (tracker != null) tracker.removeVertexShaderEXT({0}); # # Directives needed when processing wglext.h on Windows and other platforms diff --git a/make/gl-es1.cfg b/make/gl-es1.cfg index 19f33f3c4..4dcad5bed 100755 --- a/make/gl-es1.cfg +++ b/make/gl-es1.cfg @@ -1,23 +1,24 @@ # This .cfg file is used to generate the GL interface and implementing class. Package javax.media.opengl Style InterfaceAndImpl -JavaClass GL -ImplPackage com.sun.opengl.impl -ImplJavaClass GLImpl +JavaClass GLES1 +Extends GLES1 GL +Extends GLES1 GL2ES1 +ImplPackage com.sun.opengl.impl.es1 +ImplJavaClass GLES1Impl Include gl-common-es1.cfg +Include gl-ignore-gl2_es-enums.cfg +Include gl-ignore-gl2_es1-enums.cfg EmitProcAddressTable true -ProcAddressTableClassName GLProcAddressTable -GetProcAddressTableExpr _context.getGLProcAddressTable() +ProcAddressTableClassName GLES1ProcAddressTable +GetProcAddressTableExpr ((GLES1ProcAddressTable)_context.getGLProcAddressTable()) # Inform the glue code generator of the association between #defines # and functions and the extensions in which they are defined GLHeader GLES/gl.h GLHeader GLES/glext.h -# For the time being, ignore glMapBufferOES (FIXME) -Ignore glMapBufferOES - # 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 @@ -170,6 +171,14 @@ ForceProcAddressGen glPointSizePointerOES # Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums TagNativeBinding true +CustomJavaCode GLES1 public void glClearDepth(double depth); +CustomJavaCode GLES1Impl public void glClearDepth(double depth) { +CustomJavaCode GLES1Impl glClearDepthf((float)depth); } + +CustomJavaCode GLES1 public void glDepthRange(double zNear, double zFar); +CustomJavaCode GLES1Impl public void glDepthRange(double zNear, double zFar) { +CustomJavaCode GLES1Impl glDepthRangef((float)zNear, (float)zFar); } + CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in CustomCCode "glext.h" are parsed. */ CustomCCode #define GL_GLEXT_PROTOTYPES @@ -184,5 +193,11 @@ CustomCCode #include <stdlib.h> CustomCCode typedef int intptr_t; -IncludeAs CustomJavaCode GLImpl gl-impl-CustomJavaCode-gles1.java +IncludeAs CustomJavaCode GLES1Impl gl-impl-CustomJavaCode-common.java +IncludeAs CustomJavaCode GLES1Impl gl-impl-CustomJavaCode-gles1.java IncludeAs CustomCCode gl-impl-CustomCCode.c + +Import javax.media.opengl.GLES1 +Import javax.media.opengl.GLES2 +Import javax.media.opengl.GL2 + diff --git a/make/gl-es2.cfg b/make/gl-es2.cfg index f2e2194f3..f190bebbe 100755 --- a/make/gl-es2.cfg +++ b/make/gl-es2.cfg @@ -1,26 +1,24 @@ # This .cfg file is used to generate the GL interface and implementing class. Package javax.media.opengl Style InterfaceAndImpl -JavaClass GL -ImplPackage com.sun.opengl.impl -ImplJavaClass GLImpl +JavaClass GLES2 +Extends GLES2 GL +Extends GLES2 GL2ES2 +ImplPackage com.sun.opengl.impl.es2 +ImplJavaClass GLES2Impl Include gl-common-es2.cfg +Include gl-ignore-gl2_es-enums.cfg +Include gl-ignore-gl2_es2-enums.cfg EmitProcAddressTable true -ProcAddressTableClassName GLProcAddressTable -GetProcAddressTableExpr _context.getGLProcAddressTable() +ProcAddressTableClassName GLES2ProcAddressTable +GetProcAddressTableExpr ((GLES2ProcAddressTable)_context.getGLProcAddressTable()) # Inform the glue code generator of the association between #defines # and functions and the extensions in which they are defined GLHeader GLES2/gl2.h GLHeader GLES2/gl2ext.h -# For the time being, ignore glMapBufferOES (FIXME) -Ignore glMapBufferOES - -# Don't know how to handle glGetBufferPointerivNV yet (FIXME) -Ignore glGetBufferPointerivNV - # 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 @@ -170,6 +168,14 @@ ForceProcAddressGen glViewport # Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums TagNativeBinding true +CustomJavaCode GLES2 public void glClearDepth(double depth); +CustomJavaCode GLES2Impl public void glClearDepth(double depth) { +CustomJavaCode GLES2Impl glClearDepthf((float)depth); } + +CustomJavaCode GLES2 public void glDepthRange(double zNear, double zFar); +CustomJavaCode GLES2Impl public void glDepthRange(double zNear, double zFar) { +CustomJavaCode GLES2Impl glDepthRangef((float)zNear, (float)zFar); } + CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in CustomCCode "glext.h" are parsed. */ CustomCCode #define GL_GLEXT_PROTOTYPES @@ -183,5 +189,11 @@ CustomCCode typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GL CustomCCode typedef int intptr_t; -IncludeAs CustomJavaCode GLImpl gl-impl-CustomJavaCode-gles2.java +IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-common.java +IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-gles2.java IncludeAs CustomCCode gl-impl-CustomCCode.c + +Import javax.media.opengl.GLES1 +Import javax.media.opengl.GLES2 +Import javax.media.opengl.GL2 + diff --git a/make/gl-gl2.cfg b/make/gl-gl2.cfg new file mode 100644 index 000000000..c99a4cefa --- /dev/null +++ b/make/gl-gl2.cfg @@ -0,0 +1,88 @@ +# This .cfg file is used to generate the GL interface and implementing class. +Package javax.media.opengl +Style InterfaceAndImpl +JavaClass GL2 +Extends GL2 GL +Extends GL2 GL2ES1 +Extends GL2 GL2ES2 +ImplPackage com.sun.opengl.impl.gl2 +ImplJavaClass GL2Impl +Include gl-common-gl2.cfg +Include gl-desktop.cfg +Include gl-ignore-gl2_es-enums.cfg +Include gl-ignore-gl2_es1-enums.cfg +Include gl-ignore-gl2_es2-enums.cfg + +EmitProcAddressTable true +ProcAddressTableClassName GL2ProcAddressTable +GetProcAddressTableExpr ((GL2ProcAddressTable)_context.getGLProcAddressTable()) + +# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums +TagNativeBinding true + +CustomJavaCode GL2 public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar); +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 GL2 public void glOrthof(float left, float right, float bottom, float top, float zNear, float 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 GL2 public void glClearDepthf(float depth); +CustomJavaCode GL2Impl public void glClearDepthf(float depth) { +CustomJavaCode GL2Impl glClearDepth((double)depth); } + +CustomJavaCode GL2 public void glDepthRangef(float zNear, float zFar); +CustomJavaCode GL2Impl public void glDepthRangef(float zNear, float zFar) { +CustomJavaCode GL2Impl glDepthRange((double)zNear, (double)zFar); } + +CustomCCode #if defined(WIN32) +CustomCCode #define WIN32_LEAN_AND_MEAN +CustomCCode #include <windows.h> +CustomCCode #undef WIN32_LEAN_AND_MEAN +CustomCCode #include <stdlib.h> +CustomCCode #include <stddef.h> +CustomCCode #include <malloc.h> +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 #include <GL/gl.h> +CustomCCode #elif defined(macosx) +CustomCCode #include <inttypes.h> +CustomCCode #include <stdlib.h> +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 #include <GL/gl.h> +CustomCCode #include </usr/include/machine/types.h> +CustomCCode /* Provide Windows typedefs */ +CustomCCode typedef void* LPVOID; +CustomCCode typedef unsigned int* PUINT; +CustomCCode #elif defined(linux) || defined(__sun) || defined(__FreeBSD__) || defined(_HPUX) +CustomCCode #include <inttypes.h> +CustomCCode #include <stdlib.h> +CustomCCode #include <X11/Xlib.h> +CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in +CustomCCode "glext.h" are parsed. */ +CustomCCode #define GL_GLEXT_PROTOTYPES +CustomCCode /* Define GLX_GLXEXT_PROTOTYPES so that the OpenGL extension prototypes in +CustomCCode "glxext.h" are parsed. */ +CustomCCode #define GLX_GLXEXT_PROTOTYPES +CustomCCode /* Include the OpenGL headers */ +CustomCCode #include <GL/gl.h> +CustomCCode #include <GL/glx.h> +CustomCCode #include <GL/glxext.h> +CustomCCode #endif + +Include intptr.cfg + +IncludeAs CustomJavaCode GL2Impl gl-impl-CustomJavaCode-common.java +IncludeAs CustomJavaCode GL2Impl gl-impl-CustomJavaCode-gl2.java +IncludeAs CustomCCode gl-impl-CustomCCode.c + +Import javax.media.opengl.GLES1 +Import javax.media.opengl.GLES2 +Import javax.media.opengl.GL2 + diff --git a/make/gl-if-CustomJavaCode-gl.java b/make/gl-if-CustomJavaCode-gl.java new file mode 100644 index 000000000..5ac1a8cbe --- /dev/null +++ b/make/gl-if-CustomJavaCode-gl.java @@ -0,0 +1,27 @@ + + public boolean isGL2(); + + public boolean isGLES1(); + + public boolean isGLES2(); + + public boolean isGLES(); + + public boolean isGL2ES1(); + + public boolean isGL2ES2(); + + public GL2 getGL2() throws GLException; + + public GLES1 getGLES1() throws GLException; + + public GLES2 getGLES2() throws GLException; + + public GL2ES1 getGL2ES1() throws GLException; + + public GL2ES2 getGL2ES2() throws GLException; + + public boolean matchesProfile(); + + public boolean matchesProfile(String test_profile); + diff --git a/make/gl-if-gl.cfg b/make/gl-if-gl.cfg new file mode 100755 index 000000000..6c312ba2a --- /dev/null +++ b/make/gl-if-gl.cfg @@ -0,0 +1,42 @@ +# This .cfg file is used to generate the GL interface and implementing class. +Package javax.media.opengl +Style InterfaceOnly +JavaClass GL + +HierarchicalNativeOutput false +Include gl-common.cfg +Include gl-ignore-gl2_es12-special.cfg + +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl + +Import javax.media.opengl.GLES1 +Import javax.media.opengl.GLES2 +Import javax.media.opengl.GL2 + +# Ignore all ES 2.X only stuff .. +Ignore ^gl.*x +Ignore ^gl.*xOES +Ignore glEGL.* + +CustomJavaCode GL public static final int GL_RGB8 = 0x8051; +CustomJavaCode GL public static final int GL_RGBA8 = 0x8058; +CustomJavaCode GL public String toString(); +CustomJavaCode GL public GLContext getContext(); +CustomJavaCode GL public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506; +CustomJavaCode GL public void glClearDepth( double depth ); +CustomJavaCode GL public void glDepthRange(double zNear, double zFar); + +EmitProcAddressTable false +ProcAddressTableClassName DontGenerateProcAddressTableStuff +GetProcAddressTableExpr DontGenerateProcAddressTableStuff + +# Inform the glue code generator of the association between #defines +# and functions and the extensions in which they are defined +GLHeader GLES2/gl2.h +GLHeader GLES2/gl2ext.h + +# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums +TagNativeBinding true + +IncludeAs CustomJavaCode GL gl-if-CustomJavaCode-gl.java diff --git a/make/gl-if-gl2_es1.cfg b/make/gl-if-gl2_es1.cfg new file mode 100755 index 000000000..73b2d2510 --- /dev/null +++ b/make/gl-if-gl2_es1.cfg @@ -0,0 +1,44 @@ +# This .cfg file is used to generate the GL interface and implementing class. +Package javax.media.opengl +Style InterfaceOnly +JavaClass GL2ES1 +Extends GL2ES1 GL + +HierarchicalNativeOutput false +Include gl-common.cfg +Include gl-ignore-gl2_es-enums.cfg + +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl + +# Ignore all ES 1.X only stuff to GL2 +Ignore glWeightPointerOES +Ignore glUnmapBufferOES +Ignore glPointSizePointerOES +Ignore glGetFixedvOES +Ignore glDrawTex.*OES + +#heavy float/double array diff to GL2 +Ignore glClipPlanef +Ignore glGetClipPlanef(OES)? + +#impl diff +Ignore ^gl.*x(v)?(OES)? +Ignore glGetFixedv +Ignore glEGL.* + +CustomJavaCode GL2ES1 public void glClearDepth( double depth ); +CustomJavaCode GL2ES1 public void glDepthRange(double zNear, double zFar); + +EmitProcAddressTable false +ProcAddressTableClassName DontGenerateProcAddressTableStuff +GetProcAddressTableExpr DontGenerateProcAddressTableStuff + +# Inform the glue code generator of the association between #defines +# and functions and the extensions in which they are defined +GLHeader GLES/gl.h +GLHeader GLES/glext.h + +# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums +TagNativeBinding true + diff --git a/make/gl-if-gl2_es2.cfg b/make/gl-if-gl2_es2.cfg new file mode 100755 index 000000000..b5b738d6f --- /dev/null +++ b/make/gl-if-gl2_es2.cfg @@ -0,0 +1,38 @@ +# This .cfg file is used to generate the GL interface and implementing class. +Package javax.media.opengl +Style InterfaceOnly +JavaClass GL2ES2 +Extends GL2ES2 GL + +HierarchicalNativeOutput false +Include gl-common.cfg +Include gl-ignore-gl2_es-enums.cfg + +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl + +# Ignore all ES 2.X only stuff .. +Ignore ^gl.*x(v)?(OES)? +Ignore glShaderBinary +Ignore glReleaseShaderCompiler +Ignore glGetShaderPrecisionFormat +Ignore glEGL.* +Ignore glFramebufferVertexAttribArrayNV +Ignore glCoverageOperationNV +Ignore glCoverageMaskNV + +CustomJavaCode GL2ES2 public void glClearDepth( double depth ); +CustomJavaCode GL2ES2 public void glDepthRange(double zNear, double zFar); + +EmitProcAddressTable false +ProcAddressTableClassName DontGenerateProcAddressTableStuff +GetProcAddressTableExpr DontGenerateProcAddressTableStuff + +# Inform the glue code generator of the association between #defines +# and functions and the extensions in which they are defined +GLHeader GLES2/gl2.h +GLHeader GLES2/gl2ext.h + +# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums +TagNativeBinding true + diff --git a/make/gl-ignore-gl2_es-enums.cfg b/make/gl-ignore-gl2_es-enums.cfg new file mode 100644 index 000000000..e3b555fa0 --- /dev/null +++ b/make/gl-ignore-gl2_es-enums.cfg @@ -0,0 +1,187 @@ +Ignore GL_ACTIVE_TEXTURE +Ignore GL_ALIASED_LINE_WIDTH_RANGE +Ignore GL_ALIASED_POINT_SIZE_RANGE +Ignore GL_ALPHA +Ignore GL_ALPHA_BITS +Ignore GL_ALWAYS +Ignore GL_ARRAY_BUFFER +Ignore GL_ARRAY_BUFFER_BINDING +Ignore GL_BACK +Ignore GL_BLEND +Ignore GL_BLUE_BITS +Ignore GL_BUFFER_MAPPED_OES +Ignore GL_BUFFER_MAP_POINTER_OES +Ignore GL_BUFFER_SIZE +Ignore GL_BUFFER_USAGE +Ignore GL_BYTE +Ignore GL_CCW +Ignore GL_CLAMP_TO_EDGE +Ignore GL_COLOR_BUFFER_BIT +Ignore GL_COLOR_CLEAR_VALUE +Ignore GL_COLOR_WRITEMASK +Ignore GL_COMPRESSED_RGBA_S3TC_DXT1_EXT +Ignore GL_COMPRESSED_RGBA_S3TC_DXT3_EXT +Ignore GL_COMPRESSED_RGBA_S3TC_DXT5_EXT +Ignore GL_COMPRESSED_RGB_S3TC_DXT1_EXT +Ignore GL_COMPRESSED_TEXTURE_FORMATS +Ignore GL_CULL_FACE +Ignore GL_CULL_FACE_MODE +Ignore GL_CW +Ignore GL_DECR +Ignore GL_DEPTH_BITS +Ignore GL_DEPTH_BUFFER_BIT +Ignore GL_DEPTH_CLEAR_VALUE +Ignore GL_DEPTH_FUNC +Ignore GL_DEPTH_RANGE +Ignore GL_DEPTH_TEST +Ignore GL_DEPTH_WRITEMASK +Ignore GL_DITHER +Ignore GL_DONT_CARE +Ignore GL_DST_ALPHA +Ignore GL_DST_COLOR +Ignore GL_DYNAMIC_DRAW +Ignore GL_ELEMENT_ARRAY_BUFFER +Ignore GL_ELEMENT_ARRAY_BUFFER_BINDING +Ignore GL_EQUAL +Ignore GL_EXTENSIONS +Ignore GL_FALSE +Ignore GL_FASTEST +Ignore GL_FIXED +Ignore GL_FLOAT +Ignore GL_FRONT +Ignore GL_FRONT_AND_BACK +Ignore GL_FRONT_FACE +Ignore GL_GENERATE_MIPMAP_HINT +Ignore GL_GEQUAL +Ignore GL_GREATER +Ignore GL_GREEN_BITS +Ignore GL_HALF_FLOAT_OES +Ignore GL_INCR +Ignore GL_INVALID_ENUM +Ignore GL_INVALID_OPERATION +Ignore GL_INVALID_VALUE +Ignore GL_INVERT +Ignore GL_KEEP +Ignore GL_LEQUAL +Ignore GL_LESS +Ignore GL_LINEAR +Ignore GL_LINEAR_MIPMAP_LINEAR +Ignore GL_LINEAR_MIPMAP_NEAREST +Ignore GL_LINE_LOOP +Ignore GL_LINES +Ignore GL_LINE_STRIP +Ignore GL_LINE_WIDTH +Ignore GL_LUMINANCE +Ignore GL_LUMINANCE_ALPHA +Ignore GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT +Ignore GL_MAX_TEXTURE_SIZE +Ignore GL_MAX_VIEWPORT_DIMS +Ignore GL_NEAREST +Ignore GL_NEAREST_MIPMAP_LINEAR +Ignore GL_NEAREST_MIPMAP_NEAREST +Ignore GL_NEVER +Ignore GL_NICEST +Ignore GL_NO_ERROR +Ignore GL_NOTEQUAL +Ignore GL_NUM_COMPRESSED_TEXTURE_FORMATS +Ignore GL_OES_EGL_image +Ignore GL_OES_mapbuffer +Ignore GL_OES_rgb8_rgba8 +Ignore GL_ONE +Ignore GL_ONE_MINUS_DST_ALPHA +Ignore GL_ONE_MINUS_DST_COLOR +Ignore GL_ONE_MINUS_SRC_ALPHA +Ignore GL_ONE_MINUS_SRC_COLOR +Ignore GL_OUT_OF_MEMORY +Ignore GL_PACK_ALIGNMENT +Ignore GL_POINTS +Ignore GL_POLYGON_OFFSET_FACTOR +Ignore GL_POLYGON_OFFSET_FILL +Ignore GL_POLYGON_OFFSET_UNITS +Ignore GL_RED_BITS +Ignore GL_RENDERER +Ignore GL_REPEAT +Ignore GL_REPLACE +Ignore GL_RGB +Ignore GL_RGB8_OES +Ignore GL_RGBA +Ignore GL_RGBA8_OES +Ignore GL_SAMPLE_ALPHA_TO_COVERAGE +Ignore GL_SAMPLE_BUFFERS +Ignore GL_SAMPLE_COVERAGE +Ignore GL_SAMPLE_COVERAGE_INVERT +Ignore GL_SAMPLE_COVERAGE_VALUE +Ignore GL_SAMPLES +Ignore GL_SCISSOR_BOX +Ignore GL_SCISSOR_TEST +Ignore GL_SHORT +Ignore GL_SRC_ALPHA +Ignore GL_SRC_ALPHA_SATURATE +Ignore GL_SRC_COLOR +Ignore GL_STATIC_DRAW +Ignore GL_STENCIL_BITS +Ignore GL_STENCIL_BUFFER_BIT +Ignore GL_STENCIL_CLEAR_VALUE +Ignore GL_STENCIL_FAIL +Ignore GL_STENCIL_FUNC +Ignore GL_STENCIL_PASS_DEPTH_FAIL +Ignore GL_STENCIL_PASS_DEPTH_PASS +Ignore GL_STENCIL_REF +Ignore GL_STENCIL_TEST +Ignore GL_STENCIL_VALUE_MASK +Ignore GL_STENCIL_WRITEMASK +Ignore GL_SUBPIXEL_BITS +Ignore GL_TEXTURE0 +Ignore GL_TEXTURE +Ignore GL_TEXTURE10 +Ignore GL_TEXTURE1 +Ignore GL_TEXTURE11 +Ignore GL_TEXTURE12 +Ignore GL_TEXTURE13 +Ignore GL_TEXTURE14 +Ignore GL_TEXTURE15 +Ignore GL_TEXTURE16 +Ignore GL_TEXTURE17 +Ignore GL_TEXTURE18 +Ignore GL_TEXTURE19 +Ignore GL_TEXTURE20 +Ignore GL_TEXTURE2 +Ignore GL_TEXTURE21 +Ignore GL_TEXTURE22 +Ignore GL_TEXTURE23 +Ignore GL_TEXTURE24 +Ignore GL_TEXTURE25 +Ignore GL_TEXTURE26 +Ignore GL_TEXTURE27 +Ignore GL_TEXTURE28 +Ignore GL_TEXTURE29 +Ignore GL_TEXTURE_2D +Ignore GL_TEXTURE30 +Ignore GL_TEXTURE3 +Ignore GL_TEXTURE31 +Ignore GL_TEXTURE4 +Ignore GL_TEXTURE5 +Ignore GL_TEXTURE6 +Ignore GL_TEXTURE7 +Ignore GL_TEXTURE8 +Ignore GL_TEXTURE9 +Ignore GL_TEXTURE_BINDING_2D +Ignore GL_TEXTURE_MAG_FILTER +Ignore GL_TEXTURE_MAX_ANISOTROPY_EXT +Ignore GL_TEXTURE_MIN_FILTER +Ignore GL_TEXTURE_WRAP_S +Ignore GL_TEXTURE_WRAP_T +Ignore GL_TRIANGLE_FAN +Ignore GL_TRIANGLES +Ignore GL_TRIANGLE_STRIP +Ignore GL_TRUE +Ignore GL_UNPACK_ALIGNMENT +Ignore GL_UNSIGNED_BYTE +Ignore GL_UNSIGNED_SHORT +Ignore GL_UNSIGNED_SHORT_4_4_4_4 +Ignore GL_UNSIGNED_SHORT_5_5_5_1 +Ignore GL_UNSIGNED_SHORT_5_6_5 +Ignore GL_VENDOR +Ignore GL_VERSION +Ignore GL_VIEWPORT +Ignore GL_ZERO diff --git a/make/gl-ignore-gl2_es1-enums.cfg b/make/gl-ignore-gl2_es1-enums.cfg new file mode 100644 index 000000000..06b55b511 --- /dev/null +++ b/make/gl-ignore-gl2_es1-enums.cfg @@ -0,0 +1,487 @@ +Ignore ^GL_DEPTH_BUFFER_BIT +Ignore ^GL_STENCIL_BUFFER_BIT +Ignore ^GL_COLOR_BUFFER_BIT +Ignore ^GL_FALSE +Ignore ^GL_TRUE +Ignore ^GL_POINTS +Ignore ^GL_LINES +Ignore ^GL_LINE_LOOP +Ignore ^GL_LINE_STRIP +Ignore ^GL_TRIANGLES +Ignore ^GL_TRIANGLE_STRIP +Ignore ^GL_TRIANGLE_FAN +Ignore ^GL_NEVER +Ignore ^GL_LESS +Ignore ^GL_EQUAL +Ignore ^GL_LEQUAL +Ignore ^GL_GREATER +Ignore ^GL_NOTEQUAL +Ignore ^GL_GEQUAL +Ignore ^GL_ALWAYS +Ignore ^GL_ZERO +Ignore ^GL_ONE +Ignore ^GL_SRC_COLOR +Ignore ^GL_ONE_MINUS_SRC_COLOR +Ignore ^GL_SRC_ALPHA +Ignore ^GL_ONE_MINUS_SRC_ALPHA +Ignore ^GL_DST_ALPHA +Ignore ^GL_ONE_MINUS_DST_ALPHA +Ignore ^GL_DST_COLOR +Ignore ^GL_ONE_MINUS_DST_COLOR +Ignore ^GL_SRC_ALPHA_SATURATE +Ignore ^GL_CLIP_PLANE0 +Ignore ^GL_CLIP_PLANE1 +Ignore ^GL_CLIP_PLANE2 +Ignore ^GL_CLIP_PLANE3 +Ignore ^GL_CLIP_PLANE4 +Ignore ^GL_CLIP_PLANE5 +Ignore ^GL_FRONT +Ignore ^GL_BACK +Ignore ^GL_FRONT_AND_BACK +Ignore ^GL_FOG +Ignore ^GL_LIGHTING +Ignore ^GL_TEXTURE_2D +Ignore ^GL_CULL_FACE +Ignore ^GL_ALPHA_TEST +Ignore ^GL_BLEND +Ignore ^GL_COLOR_LOGIC_OP +Ignore ^GL_DITHER +Ignore ^GL_STENCIL_TEST +Ignore ^GL_DEPTH_TEST +Ignore ^GL_POINT_SMOOTH +Ignore ^GL_LINE_SMOOTH +Ignore ^GL_SCISSOR_TEST +Ignore ^GL_COLOR_MATERIAL +Ignore ^GL_NORMALIZE +Ignore ^GL_RESCALE_NORMAL +Ignore ^GL_POLYGON_OFFSET_FILL +Ignore ^GL_VERTEX_ARRAY +Ignore ^GL_NORMAL_ARRAY +Ignore ^GL_COLOR_ARRAY +Ignore ^GL_TEXTURE_COORD_ARRAY +Ignore ^GL_MULTISAMPLE +Ignore ^GL_SAMPLE_ALPHA_TO_COVERAGE +Ignore ^GL_SAMPLE_ALPHA_TO_ONE +Ignore ^GL_SAMPLE_COVERAGE +Ignore ^GL_NO_ERROR +Ignore ^GL_INVALID_ENUM +Ignore ^GL_INVALID_VALUE +Ignore ^GL_INVALID_OPERATION +Ignore ^GL_STACK_OVERFLOW +Ignore ^GL_STACK_UNDERFLOW +Ignore ^GL_OUT_OF_MEMORY +Ignore ^GL_EXP +Ignore ^GL_EXP2 +Ignore ^GL_FOG_DENSITY +Ignore ^GL_FOG_START +Ignore ^GL_FOG_END +Ignore ^GL_FOG_MODE +Ignore ^GL_FOG_COLOR +Ignore ^GL_CW +Ignore ^GL_CCW +Ignore ^GL_CURRENT_COLOR +Ignore ^GL_CURRENT_NORMAL +Ignore ^GL_CURRENT_TEXTURE_COORDS +Ignore ^GL_POINT_SIZE +Ignore ^GL_POINT_SIZE_MIN +Ignore ^GL_POINT_SIZE_MAX +Ignore ^GL_POINT_FADE_THRESHOLD_SIZE +Ignore ^GL_POINT_DISTANCE_ATTENUATION +Ignore ^GL_SMOOTH_POINT_SIZE_RANGE +Ignore ^GL_LINE_WIDTH +Ignore ^GL_SMOOTH_LINE_WIDTH_RANGE +Ignore ^GL_ALIASED_POINT_SIZE_RANGE +Ignore ^GL_ALIASED_LINE_WIDTH_RANGE +Ignore ^GL_CULL_FACE_MODE +Ignore ^GL_FRONT_FACE +Ignore ^GL_SHADE_MODEL +Ignore ^GL_DEPTH_RANGE +Ignore ^GL_DEPTH_WRITEMASK +Ignore ^GL_DEPTH_CLEAR_VALUE +Ignore ^GL_DEPTH_FUNC +Ignore ^GL_STENCIL_CLEAR_VALUE +Ignore ^GL_STENCIL_FUNC +Ignore ^GL_STENCIL_VALUE_MASK +Ignore ^GL_STENCIL_FAIL +Ignore ^GL_STENCIL_PASS_DEPTH_FAIL +Ignore ^GL_STENCIL_PASS_DEPTH_PASS +Ignore ^GL_STENCIL_REF +Ignore ^GL_STENCIL_WRITEMASK +Ignore ^GL_MATRIX_MODE +Ignore ^GL_VIEWPORT +Ignore ^GL_MODELVIEW_STACK_DEPTH +Ignore ^GL_PROJECTION_STACK_DEPTH +Ignore ^GL_TEXTURE_STACK_DEPTH +Ignore ^GL_MODELVIEW_MATRIX +Ignore ^GL_PROJECTION_MATRIX +Ignore ^GL_TEXTURE_MATRIX +Ignore ^GL_ALPHA_TEST_FUNC +Ignore ^GL_ALPHA_TEST_REF +Ignore ^GL_BLEND_DST +Ignore ^GL_BLEND_SRC +Ignore ^GL_LOGIC_OP_MODE +Ignore ^GL_SCISSOR_BOX +Ignore ^GL_COLOR_CLEAR_VALUE +Ignore ^GL_COLOR_WRITEMASK +Ignore ^GL_UNPACK_ALIGNMENT +Ignore ^GL_PACK_ALIGNMENT +Ignore ^GL_MAX_LIGHTS +Ignore ^GL_MAX_CLIP_PLANES +Ignore ^GL_MAX_TEXTURE_SIZE +Ignore ^GL_MAX_MODELVIEW_STACK_DEPTH +Ignore ^GL_MAX_PROJECTION_STACK_DEPTH +Ignore ^GL_MAX_TEXTURE_STACK_DEPTH +Ignore ^GL_MAX_VIEWPORT_DIMS +Ignore ^GL_MAX_TEXTURE_UNITS +Ignore ^GL_SUBPIXEL_BITS +Ignore ^GL_RED_BITS +Ignore ^GL_GREEN_BITS +Ignore ^GL_BLUE_BITS +Ignore ^GL_ALPHA_BITS +Ignore ^GL_DEPTH_BITS +Ignore ^GL_STENCIL_BITS +Ignore ^GL_POLYGON_OFFSET_UNITS +Ignore ^GL_POLYGON_OFFSET_FACTOR +Ignore ^GL_TEXTURE_BINDING_2D +Ignore ^GL_VERTEX_ARRAY_SIZE +Ignore ^GL_VERTEX_ARRAY_TYPE +Ignore ^GL_VERTEX_ARRAY_STRIDE +Ignore ^GL_NORMAL_ARRAY_TYPE +Ignore ^GL_NORMAL_ARRAY_STRIDE +Ignore ^GL_COLOR_ARRAY_SIZE +Ignore ^GL_COLOR_ARRAY_TYPE +Ignore ^GL_COLOR_ARRAY_STRIDE +Ignore ^GL_TEXTURE_COORD_ARRAY_SIZE +Ignore ^GL_TEXTURE_COORD_ARRAY_TYPE +Ignore ^GL_TEXTURE_COORD_ARRAY_STRIDE +Ignore ^GL_VERTEX_ARRAY_POINTER +Ignore ^GL_NORMAL_ARRAY_POINTER +Ignore ^GL_COLOR_ARRAY_POINTER +Ignore ^GL_TEXTURE_COORD_ARRAY_POINTER +Ignore ^GL_SAMPLE_BUFFERS +Ignore ^GL_SAMPLES +Ignore ^GL_SAMPLE_COVERAGE_VALUE +Ignore ^GL_SAMPLE_COVERAGE_INVERT +Ignore ^GL_NUM_COMPRESSED_TEXTURE_FORMATS +Ignore ^GL_COMPRESSED_TEXTURE_FORMATS +Ignore ^GL_DONT_CARE +Ignore ^GL_FASTEST +Ignore ^GL_NICEST +Ignore ^GL_PERSPECTIVE_CORRECTION_HINT +Ignore ^GL_POINT_SMOOTH_HINT +Ignore ^GL_LINE_SMOOTH_HINT +Ignore ^GL_FOG_HINT +Ignore ^GL_GENERATE_MIPMAP_HINT +Ignore ^GL_LIGHT_MODEL_AMBIENT +Ignore ^GL_LIGHT_MODEL_TWO_SIDE +Ignore ^GL_AMBIENT +Ignore ^GL_DIFFUSE +Ignore ^GL_SPECULAR +Ignore ^GL_POSITION +Ignore ^GL_SPOT_DIRECTION +Ignore ^GL_SPOT_EXPONENT +Ignore ^GL_SPOT_CUTOFF +Ignore ^GL_CONSTANT_ATTENUATION +Ignore ^GL_LINEAR_ATTENUATION +Ignore ^GL_QUADRATIC_ATTENUATION +Ignore ^GL_BYTE +Ignore ^GL_UNSIGNED_BYTE +Ignore ^GL_SHORT +Ignore ^GL_UNSIGNED_SHORT +Ignore ^GL_FLOAT +Ignore ^GL_FIXED +Ignore ^GL_CLEAR +Ignore ^GL_AND +Ignore ^GL_AND_REVERSE +Ignore ^GL_COPY +Ignore ^GL_AND_INVERTED +Ignore ^GL_NOOP +Ignore ^GL_XOR +Ignore ^GL_OR +Ignore ^GL_NOR +Ignore ^GL_EQUIV +Ignore ^GL_INVERT +Ignore ^GL_OR_REVERSE +Ignore ^GL_COPY_INVERTED +Ignore ^GL_OR_INVERTED +Ignore ^GL_NAND +Ignore ^GL_SET +Ignore ^GL_EMISSION +Ignore ^GL_SHININESS +Ignore ^GL_AMBIENT_AND_DIFFUSE +Ignore ^GL_MODELVIEW +Ignore ^GL_PROJECTION +Ignore ^GL_TEXTURE +Ignore ^GL_ALPHA +Ignore ^GL_RGB +Ignore ^GL_RGBA +Ignore ^GL_LUMINANCE +Ignore ^GL_LUMINANCE_ALPHA +Ignore ^GL_UNSIGNED_SHORT_4_4_4_4 +Ignore ^GL_UNSIGNED_SHORT_5_5_5_1 +Ignore ^GL_UNSIGNED_SHORT_5_6_5 +Ignore ^GL_FLAT +Ignore ^GL_SMOOTH +Ignore ^GL_KEEP +Ignore ^GL_REPLACE +Ignore ^GL_INCR +Ignore ^GL_DECR +Ignore ^GL_VENDOR +Ignore ^GL_RENDERER +Ignore ^GL_VERSION +Ignore ^GL_EXTENSIONS +Ignore ^GL_MODULATE +Ignore ^GL_DECAL +Ignore ^GL_ADD +Ignore ^GL_TEXTURE_ENV_MODE +Ignore ^GL_TEXTURE_ENV_COLOR +Ignore ^GL_TEXTURE_ENV +Ignore ^GL_NEAREST +Ignore ^GL_LINEAR +Ignore ^GL_NEAREST_MIPMAP_NEAREST +Ignore ^GL_LINEAR_MIPMAP_NEAREST +Ignore ^GL_NEAREST_MIPMAP_LINEAR +Ignore ^GL_LINEAR_MIPMAP_LINEAR +Ignore ^GL_TEXTURE_MAG_FILTER +Ignore ^GL_TEXTURE_MIN_FILTER +Ignore ^GL_TEXTURE_WRAP_S +Ignore ^GL_TEXTURE_WRAP_T +Ignore ^GL_GENERATE_MIPMAP +Ignore ^GL_TEXTURE0 +Ignore ^GL_TEXTURE1 +Ignore ^GL_TEXTURE2 +Ignore ^GL_TEXTURE3 +Ignore ^GL_TEXTURE4 +Ignore ^GL_TEXTURE5 +Ignore ^GL_TEXTURE6 +Ignore ^GL_TEXTURE7 +Ignore ^GL_TEXTURE8 +Ignore ^GL_TEXTURE9 +Ignore ^GL_TEXTURE10 +Ignore ^GL_TEXTURE11 +Ignore ^GL_TEXTURE12 +Ignore ^GL_TEXTURE13 +Ignore ^GL_TEXTURE14 +Ignore ^GL_TEXTURE15 +Ignore ^GL_TEXTURE16 +Ignore ^GL_TEXTURE17 +Ignore ^GL_TEXTURE18 +Ignore ^GL_TEXTURE19 +Ignore ^GL_TEXTURE20 +Ignore ^GL_TEXTURE21 +Ignore ^GL_TEXTURE22 +Ignore ^GL_TEXTURE23 +Ignore ^GL_TEXTURE24 +Ignore ^GL_TEXTURE25 +Ignore ^GL_TEXTURE26 +Ignore ^GL_TEXTURE27 +Ignore ^GL_TEXTURE28 +Ignore ^GL_TEXTURE29 +Ignore ^GL_TEXTURE30 +Ignore ^GL_TEXTURE31 +Ignore ^GL_ACTIVE_TEXTURE +Ignore ^GL_CLIENT_ACTIVE_TEXTURE +Ignore ^GL_REPEAT +Ignore ^GL_CLAMP_TO_EDGE +Ignore ^GL_LIGHT0 +Ignore ^GL_LIGHT1 +Ignore ^GL_LIGHT2 +Ignore ^GL_LIGHT3 +Ignore ^GL_LIGHT4 +Ignore ^GL_LIGHT5 +Ignore ^GL_LIGHT6 +Ignore ^GL_LIGHT7 +Ignore ^GL_ARRAY_BUFFER +Ignore ^GL_ELEMENT_ARRAY_BUFFER +Ignore ^GL_ARRAY_BUFFER_BINDING +Ignore ^GL_ELEMENT_ARRAY_BUFFER_BINDING +Ignore ^GL_VERTEX_ARRAY_BUFFER_BINDING +Ignore ^GL_NORMAL_ARRAY_BUFFER_BINDING +Ignore ^GL_COLOR_ARRAY_BUFFER_BINDING +Ignore ^GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING +Ignore ^GL_STATIC_DRAW +Ignore ^GL_DYNAMIC_DRAW +Ignore ^GL_BUFFER_SIZE +Ignore ^GL_BUFFER_USAGE +Ignore ^GL_SUBTRACT +Ignore ^GL_COMBINE +Ignore ^GL_COMBINE_RGB +Ignore ^GL_COMBINE_ALPHA +Ignore ^GL_RGB_SCALE +Ignore ^GL_ADD_SIGNED +Ignore ^GL_INTERPOLATE +Ignore ^GL_CONSTANT +Ignore ^GL_PRIMARY_COLOR +Ignore ^GL_PREVIOUS +Ignore ^GL_OPERAND0_RGB +Ignore ^GL_OPERAND1_RGB +Ignore ^GL_OPERAND2_RGB +Ignore ^GL_OPERAND0_ALPHA +Ignore ^GL_OPERAND1_ALPHA +Ignore ^GL_OPERAND2_ALPHA +Ignore ^GL_ALPHA_SCALE +Ignore ^GL_SRC0_RGB +Ignore ^GL_SRC1_RGB +Ignore ^GL_SRC2_RGB +Ignore ^GL_SRC0_ALPHA +Ignore ^GL_SRC1_ALPHA +Ignore ^GL_SRC2_ALPHA +Ignore ^GL_DOT3_RGB +Ignore ^GL_DOT3_RGBA +Ignore ^GL_IMPLEMENTATION_COLOR_READ_TYPE_OES +Ignore ^GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES +Ignore ^GL_PALETTE4_RGB8_OES +Ignore ^GL_PALETTE4_RGBA8_OES +Ignore ^GL_PALETTE4_R5_G6_B5_OES +Ignore ^GL_PALETTE4_RGBA4_OES +Ignore ^GL_PALETTE4_RGB5_A1_OES +Ignore ^GL_PALETTE8_RGB8_OES +Ignore ^GL_PALETTE8_RGBA8_OES +Ignore ^GL_PALETTE8_R5_G6_B5_OES +Ignore ^GL_PALETTE8_RGBA4_OES +Ignore ^GL_PALETTE8_RGB5_A1_OES +Ignore ^GL_POINT_SIZE_ARRAY_OES +Ignore ^GL_POINT_SIZE_ARRAY_TYPE_OES +Ignore ^GL_POINT_SIZE_ARRAY_STRIDE_OES +Ignore ^GL_POINT_SIZE_ARRAY_POINTER_OES +Ignore ^GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES +Ignore ^GL_POINT_SPRITE_OES +Ignore ^GL_COORD_REPLACE_OES +Ignore ^GL_OES_read_format +Ignore ^GL_OES_compressed_paletted_texture +Ignore ^GL_OES_point_size_array +Ignore ^GL_OES_point_sprite +Ignore ^GL_BLEND_EQUATION_RGB_OES +Ignore ^GL_BLEND_EQUATION_ALPHA_OES +Ignore ^GL_BLEND_DST_RGB_OES +Ignore ^GL_BLEND_SRC_RGB_OES +Ignore ^GL_BLEND_DST_ALPHA_OES +Ignore ^GL_BLEND_SRC_ALPHA_OES +Ignore ^GL_BLEND_EQUATION_OES +Ignore ^GL_FUNC_ADD_OES +Ignore ^GL_FUNC_SUBTRACT_OES +Ignore ^GL_FUNC_REVERSE_SUBTRACT_OES +Ignore ^GL_ETC1_RGB8_OES +Ignore ^GL_TEXTURE_CROP_RECT_OES +Ignore ^GL_FIXED_OES +Ignore ^GL_NONE_OES +Ignore ^GL_FRAMEBUFFER_OES +Ignore ^GL_RENDERBUFFER_OES +Ignore ^GL_RGBA4_OES +Ignore ^GL_RGB5_A1_OES +Ignore ^GL_RGB565_OES +Ignore ^GL_DEPTH_COMPONENT16_OES +Ignore ^GL_RENDERBUFFER_WIDTH_OES +Ignore ^GL_RENDERBUFFER_HEIGHT_OES +Ignore ^GL_RENDERBUFFER_INTERNAL_FORMAT_OES +Ignore ^GL_RENDERBUFFER_RED_SIZE_OES +Ignore ^GL_RENDERBUFFER_GREEN_SIZE_OES +Ignore ^GL_RENDERBUFFER_BLUE_SIZE_OES +Ignore ^GL_RENDERBUFFER_ALPHA_SIZE_OES +Ignore ^GL_RENDERBUFFER_DEPTH_SIZE_OES +Ignore ^GL_RENDERBUFFER_STENCIL_SIZE_OES +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES +Ignore ^GL_COLOR_ATTACHMENT0_OES +Ignore ^GL_DEPTH_ATTACHMENT_OES +Ignore ^GL_STENCIL_ATTACHMENT_OES +Ignore ^GL_FRAMEBUFFER_COMPLETE_OES +Ignore ^GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES +Ignore ^GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES +Ignore ^GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES +Ignore ^GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES +Ignore ^GL_FRAMEBUFFER_UNSUPPORTED_OES +Ignore ^GL_FRAMEBUFFER_BINDING_OES +Ignore ^GL_RENDERBUFFER_BINDING_OES +Ignore ^GL_MAX_RENDERBUFFER_SIZE_OES +Ignore ^GL_INVALID_FRAMEBUFFER_OPERATION_OES +Ignore ^GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES +Ignore ^GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES +Ignore ^GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES +Ignore ^GL_MAX_VERTEX_UNITS_OES +Ignore ^GL_MAX_PALETTE_MATRICES_OES +Ignore ^GL_MATRIX_PALETTE_OES +Ignore ^GL_MATRIX_INDEX_ARRAY_OES +Ignore ^GL_WEIGHT_ARRAY_OES +Ignore ^GL_CURRENT_PALETTE_MATRIX_OES +Ignore ^GL_MATRIX_INDEX_ARRAY_SIZE_OES +Ignore ^GL_MATRIX_INDEX_ARRAY_TYPE_OES +Ignore ^GL_MATRIX_INDEX_ARRAY_STRIDE_OES +Ignore ^GL_MATRIX_INDEX_ARRAY_POINTER_OES +Ignore ^GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES +Ignore ^GL_WEIGHT_ARRAY_SIZE_OES +Ignore ^GL_WEIGHT_ARRAY_TYPE_OES +Ignore ^GL_WEIGHT_ARRAY_STRIDE_OES +Ignore ^GL_WEIGHT_ARRAY_POINTER_OES +Ignore ^GL_WEIGHT_ARRAY_BUFFER_BINDING_OES +Ignore ^GL_INCR_WRAP_OES +Ignore ^GL_DECR_WRAP_OES +Ignore ^GL_NORMAL_MAP_OES +Ignore ^GL_REFLECTION_MAP_OES +Ignore ^GL_TEXTURE_CUBE_MAP_OES +Ignore ^GL_TEXTURE_BINDING_CUBE_MAP_OES +Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES +Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES +Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES +Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES +Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES +Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES +Ignore ^GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES +Ignore ^GL_TEXTURE_GEN_MODE_OES +Ignore ^GL_TEXTURE_GEN_STR_OES +Ignore ^GL_MIRRORED_REPEAT_OES +Ignore ^GL_DEPTH_COMPONENT24_OES +Ignore ^GL_DEPTH_COMPONENT32_OES +Ignore ^GL_WRITE_ONLY_OES +Ignore ^GL_BUFFER_ACCESS_OES +Ignore ^GL_BUFFER_MAPPED_OES +Ignore ^GL_BUFFER_MAP_POINTER_OES +Ignore ^GL_RGB8_OES +Ignore ^GL_RGBA8_OES +Ignore ^GL_STENCIL_INDEX1_OES +Ignore ^GL_STENCIL_INDEX4_OES +Ignore ^GL_STENCIL_INDEX8_OES +Ignore ^GL_HALF_FLOAT_OES +Ignore ^GL_3DC_X_AMD +Ignore ^GL_3DC_XY_AMD +Ignore ^GL_ATC_RGB_AMD +Ignore ^GL_ATC_RGBA_EXPLICIT_ALPHA_AMD +Ignore ^GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD +Ignore ^GL_TEXTURE_MAX_ANISOTROPY_EXT +Ignore ^GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT +Ignore ^GL_COMPRESSED_RGB_S3TC_DXT1_EXT +Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT1_EXT +Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT3_EXT +Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT5_EXT +Ignore ^GL_OES_blend_equation_separate +Ignore ^GL_OES_blend_func_separate +Ignore ^GL_OES_blend_subtract +Ignore ^GL_OES_byte_coordinates +Ignore ^GL_OES_compressed_ETC1_RGB8_texture +Ignore ^GL_OES_draw_texture +Ignore ^GL_OES_extended_matrix_palette +Ignore ^GL_OES_fixed_point +Ignore ^GL_OES_framebuffer_object +Ignore ^GL_OES_matrix_get +Ignore ^GL_OES_matrix_palette +Ignore ^GL_OES_query_matrix +Ignore ^GL_OES_single_precision +Ignore ^GL_OES_stencil_wrap +Ignore ^GL_OES_texture_cube_map +Ignore ^GL_OES_texture_env_crossbar +Ignore ^GL_OES_texture_mirrored_repeat +Ignore ^GL_OES_EGL_image +Ignore ^GL_OES_depth24 +Ignore ^GL_OES_depth32 +Ignore ^GL_OES_element_index_uint +Ignore ^GL_OES_fbo_render_mipmap +Ignore ^GL_OES_mapbuffer +Ignore ^GL_OES_rgb8_rgba8 +Ignore ^GL_OES_stencil1 +Ignore ^GL_OES_stencil4 +Ignore ^GL_OES_stencil8 +Ignore ^GL_OES_vertex_half_float +Ignore ^GL_AMD_compressed_3DC_texture +Ignore ^GL_AMD_compressed_ATC_texture diff --git a/make/gl-ignore-gl2_es12-special.cfg b/make/gl-ignore-gl2_es12-special.cfg new file mode 100644 index 000000000..2e5d16ba8 --- /dev/null +++ b/make/gl-ignore-gl2_es12-special.cfg @@ -0,0 +1,766 @@ +Ignore GL_3DC_X_AMD +Ignore GL_3DC_XY_AMD +Ignore GL_ACTIVE_ATTRIBUTE_MAX_LENGTH +Ignore GL_ACTIVE_ATTRIBUTES +Ignore GL_ACTIVE_UNIFORM_MAX_LENGTH +Ignore GL_ACTIVE_UNIFORMS +Ignore GL_ADD +Ignore GL_ADD_SIGNED +Ignore GL_ALPHA_SCALE +Ignore GL_ALPHA_TEST +Ignore GL_ALPHA_TEST_FUNC +Ignore GL_ALPHA_TEST_REF +Ignore GL_AMBIENT +Ignore GL_AMBIENT_AND_DIFFUSE +Ignore GL_AMD_compressed_3DC_texture +Ignore GL_AMD_compressed_ATC_texture +Ignore GL_AND +Ignore GL_AND_INVERTED +Ignore GL_AND_REVERSE +Ignore GL_ATC_RGBA_EXPLICIT_ALPHA_AMD +Ignore GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD +Ignore GL_ATC_RGB_AMD +Ignore GL_ATTACHED_SHADERS +Ignore GL_BLEND_COLOR +Ignore GL_BLEND_DST +Ignore GL_BLEND_DST_ALPHA +Ignore GL_BLEND_DST_ALPHA_OES +Ignore GL_BLEND_DST_RGB +Ignore GL_BLEND_DST_RGB_OES +Ignore GL_BLEND_EQUATION +Ignore GL_BLEND_EQUATION_ALPHA +Ignore GL_BLEND_EQUATION_ALPHA_OES +Ignore GL_BLEND_EQUATION_OES +Ignore GL_BLEND_EQUATION_RGB +Ignore GL_BLEND_EQUATION_RGB_OES +Ignore GL_BLEND_SRC +Ignore GL_BLEND_SRC_ALPHA +Ignore GL_BLEND_SRC_ALPHA_OES +Ignore GL_BLEND_SRC_RGB +Ignore GL_BLEND_SRC_RGB_OES +Ignore GL_BOOL +Ignore GL_BOOL_VEC2 +Ignore GL_BOOL_VEC3 +Ignore GL_BOOL_VEC4 +Ignore GL_BUFFER_ACCESS_OES +Ignore GL_CLEAR +Ignore GL_CLIENT_ACTIVE_TEXTURE +Ignore GL_CLIP_PLANE0 +Ignore GL_CLIP_PLANE1 +Ignore GL_CLIP_PLANE2 +Ignore GL_CLIP_PLANE3 +Ignore GL_CLIP_PLANE4 +Ignore GL_CLIP_PLANE5 +Ignore GL_COLOR_ARRAY +Ignore GL_COLOR_ARRAY_BUFFER_BINDING +Ignore GL_COLOR_ARRAY_POINTER +Ignore GL_COLOR_ARRAY_SIZE +Ignore GL_COLOR_ARRAY_STRIDE +Ignore GL_COLOR_ARRAY_TYPE +Ignore GL_COLOR_ATTACHMENT0 +Ignore GL_COLOR_ATTACHMENT0_OES +Ignore GL_COLOR_LOGIC_OP +Ignore GL_COLOR_MATERIAL +Ignore GL_COMBINE +Ignore GL_COMBINE_ALPHA +Ignore GL_COMBINE_RGB +Ignore GL_COMPILE_STATUS +Ignore GL_CONSTANT +Ignore GL_CONSTANT_ALPHA +Ignore GL_CONSTANT_ATTENUATION +Ignore GL_CONSTANT_COLOR +Ignore GL_COORD_REPLACE_OES +Ignore GL_COPY +Ignore GL_COPY_INVERTED +Ignore GL_COVERAGE_ALL_FRAGMENTS_NV +Ignore GL_COVERAGE_ATTACHMENT_NV +Ignore GL_COVERAGE_AUTOMATIC_NV +Ignore GL_COVERAGE_BUFFER_BIT_NV +Ignore GL_COVERAGE_BUFFERS_NV +Ignore GL_COVERAGE_COMPONENT4_NV +Ignore GL_COVERAGE_COMPONENT_NV +Ignore GL_COVERAGE_EDGE_FRAGMENTS_NV +Ignore GL_COVERAGE_SAMPLES_NV +Ignore GL_CURRENT_COLOR +Ignore GL_CURRENT_NORMAL +Ignore GL_CURRENT_PALETTE_MATRIX_OES +Ignore GL_CURRENT_PROGRAM +Ignore GL_CURRENT_TEXTURE_COORDS +Ignore GL_CURRENT_VERTEX_ATTRIB +Ignore GL_DECAL +Ignore GL_DECR_WRAP +Ignore GL_DECR_WRAP_OES +Ignore GL_DELETE_STATUS +Ignore GL_DEPTH_ATTACHMENT +Ignore GL_DEPTH_ATTACHMENT_OES +Ignore GL_DEPTH_COMPONENT +Ignore GL_DEPTH_COMPONENT16 +Ignore GL_DEPTH_COMPONENT16_OES +Ignore GL_DEPTH_COMPONENT24_OES +Ignore GL_DEPTH_COMPONENT32_OES +Ignore GL_DIFFUSE +Ignore GL_DOT3_RGB +Ignore GL_DOT3_RGBA +Ignore GL_EMISSION +Ignore GL_EQUIV +Ignore GL_ES_VERSION_2_0 +Ignore GL_ETC1_RGB8_OES +Ignore GL_EXP +Ignore GL_EXP2 +Ignore GL_FIXED_OES +Ignore GL_FLAT +Ignore GL_FLOAT_MAT2 +Ignore GL_FLOAT_MAT3 +Ignore GL_FLOAT_MAT4 +Ignore GL_FLOAT_VEC2 +Ignore GL_FLOAT_VEC3 +Ignore GL_FLOAT_VEC4 +Ignore GL_FOG +Ignore GL_FOG_COLOR +Ignore GL_FOG_DENSITY +Ignore GL_FOG_END +Ignore GL_FOG_HINT +Ignore GL_FOG_MODE +Ignore GL_FOG_START +Ignore GL_FRAGMENT_SHADER +Ignore GL_FRAGMENT_SHADER_DERIVATIVE_HINT +Ignore GL_FRAMEBUFFER +Ignore GL_FRAMEBUFFER_ATTACHABLE_NV +Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME +Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES +Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE +Ignore GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES +Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE +Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES +Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT +Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL +Ignore GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES +Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_HEIGHT_NV +Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_NORMALIZED_NV +Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_OFFSET_NV +Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_SIZE_NV +Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_STRIDE_NV +Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_TYPE_NV +Ignore GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_WIDTH_NV +Ignore GL_FRAMEBUFFER_BINDING +Ignore GL_FRAMEBUFFER_BINDING_OES +Ignore GL_FRAMEBUFFER_COMPLETE +Ignore GL_FRAMEBUFFER_COMPLETE_OES +Ignore GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT +Ignore GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES +Ignore GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS +Ignore GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES +Ignore GL_FRAMEBUFFER_INCOMPLETE_FORMATS +Ignore GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES +Ignore GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT +Ignore GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES +Ignore GL_FRAMEBUFFER_OES +Ignore GL_FRAMEBUFFER_UNSUPPORTED +Ignore GL_FRAMEBUFFER_UNSUPPORTED_OES +Ignore GL_FUNC_ADD +Ignore GL_FUNC_ADD_OES +Ignore GL_FUNC_REVERSE_SUBTRACT +Ignore GL_FUNC_REVERSE_SUBTRACT_OES +Ignore GL_FUNC_SUBTRACT +Ignore GL_FUNC_SUBTRACT_OES +Ignore GL_GENERATE_MIPMAP +Ignore GL_HIGH_FLOAT +Ignore GL_HIGH_INT +Ignore GL_IMPLEMENTATION_COLOR_READ_FORMAT +Ignore GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES +Ignore GL_IMPLEMENTATION_COLOR_READ_TYPE +Ignore GL_IMPLEMENTATION_COLOR_READ_TYPE_OES +Ignore GL_INCR_WRAP +Ignore GL_INCR_WRAP_OES +Ignore GL_INFO_LOG_LENGTH +Ignore GL_INT +Ignore GL_INTERPOLATE +Ignore GL_INT_VEC2 +Ignore GL_INT_VEC3 +Ignore GL_INT_VEC4 +Ignore GL_INVALID_FRAMEBUFFER_OPERATION +Ignore GL_INVALID_FRAMEBUFFER_OPERATION_OES +Ignore GL_LIGHT0 +Ignore GL_LIGHT1 +Ignore GL_LIGHT2 +Ignore GL_LIGHT3 +Ignore GL_LIGHT4 +Ignore GL_LIGHT5 +Ignore GL_LIGHT6 +Ignore GL_LIGHT7 +Ignore GL_LIGHTING +Ignore GL_LIGHT_MODEL_AMBIENT +Ignore GL_LIGHT_MODEL_TWO_SIDE +Ignore GL_LINEAR_ATTENUATION +Ignore GL_LINE_SMOOTH +Ignore GL_LINE_SMOOTH_HINT +Ignore GL_LINK_STATUS +Ignore GL_LOGIC_OP_MODE +Ignore GL_LOW_FLOAT +Ignore GL_LOW_INT +Ignore GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES +Ignore GL_MATRIX_INDEX_ARRAY_OES +Ignore GL_MATRIX_INDEX_ARRAY_POINTER_OES +Ignore GL_MATRIX_INDEX_ARRAY_SIZE_OES +Ignore GL_MATRIX_INDEX_ARRAY_STRIDE_OES +Ignore GL_MATRIX_INDEX_ARRAY_TYPE_OES +Ignore GL_MATRIX_MODE +Ignore GL_MATRIX_PALETTE_OES +Ignore GL_MAX_ARRAY_TEXTURE_LAYERS_EXT +Ignore GL_MAX_CLIP_PLANES +Ignore GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS +Ignore GL_MAX_CUBE_MAP_TEXTURE_SIZE +Ignore GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES +Ignore GL_MAX_FRAGMENT_UNIFORM_VECTORS +Ignore GL_MAX_LIGHTS +Ignore GL_MAX_MODELVIEW_STACK_DEPTH +Ignore GL_MAX_PALETTE_MATRICES_OES +Ignore GL_MAX_PROJECTION_STACK_DEPTH +Ignore GL_MAX_RENDERBUFFER_SIZE +Ignore GL_MAX_RENDERBUFFER_SIZE_OES +Ignore GL_MAX_TEXTURE_IMAGE_UNITS +Ignore GL_MAX_TEXTURE_STACK_DEPTH +Ignore GL_MAX_TEXTURE_UNITS +Ignore GL_MAX_VARYING_VECTORS +Ignore GL_MAX_VERTEX_ATTRIBS +Ignore GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS +Ignore GL_MAX_VERTEX_UNIFORM_VECTORS +Ignore GL_MAX_VERTEX_UNITS_OES +Ignore GL_MEDIUM_FLOAT +Ignore GL_MEDIUM_INT +Ignore GL_MIRRORED_REPEAT +Ignore GL_MIRRORED_REPEAT_OES +Ignore GL_MODELVIEW +Ignore GL_MODELVIEW_MATRIX +Ignore GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES +Ignore GL_MODELVIEW_STACK_DEPTH +Ignore GL_MODULATE +Ignore GL_MULTISAMPLE +Ignore GL_NAND +Ignore GL_NONE +Ignore GL_NONE_OES +Ignore GL_NOOP +Ignore GL_NOR +Ignore GL_NORMAL_ARRAY +Ignore GL_NORMAL_ARRAY_BUFFER_BINDING +Ignore GL_NORMAL_ARRAY_POINTER +Ignore GL_NORMAL_ARRAY_STRIDE +Ignore GL_NORMAL_ARRAY_TYPE +Ignore GL_NORMALIZE +Ignore GL_NORMAL_MAP_OES +Ignore GL_NUM_SHADER_BINARY_FORMATS +Ignore GL_NVIDIA_PLATFORM_BINARY_NV +Ignore GL_OES_blend_equation_separate +Ignore GL_OES_blend_func_separate +Ignore GL_OES_blend_subtract +Ignore GL_OES_byte_coordinates +Ignore GL_OES_compressed_ETC1_RGB8_texture +Ignore GL_OES_compressed_paletted_texture +Ignore GL_OES_depth24 +Ignore GL_OES_depth32 +Ignore GL_OES_draw_texture +Ignore GL_OES_element_index_uint +Ignore GL_OES_extended_matrix_palette +Ignore GL_OES_fbo_render_mipmap +Ignore GL_OES_fixed_point +Ignore GL_OES_framebuffer_object +Ignore GL_OES_matrix_get +Ignore GL_OES_matrix_palette +Ignore GL_OES_point_size_array +Ignore GL_OES_point_sprite +Ignore GL_OES_query_matrix +Ignore GL_OES_read_format +Ignore GL_OES_single_precision +Ignore GL_OES_stencil1 +Ignore GL_OES_stencil4 +Ignore GL_OES_stencil8 +Ignore GL_OES_stencil_wrap +Ignore GL_OES_texture_cube_map +Ignore GL_OES_texture_env_crossbar +Ignore GL_OES_texture_half_float +Ignore GL_OES_texture_mirrored_repeat +Ignore GL_OES_vertex_half_float +Ignore GL_ONE_MINUS_CONSTANT_ALPHA +Ignore GL_ONE_MINUS_CONSTANT_COLOR +Ignore GL_OPERAND0_ALPHA +Ignore GL_OPERAND0_RGB +Ignore GL_OPERAND1_ALPHA +Ignore GL_OPERAND1_RGB +Ignore GL_OPERAND2_ALPHA +Ignore GL_OPERAND2_RGB +Ignore GL_OR +Ignore GL_OR_INVERTED +Ignore GL_OR_REVERSE +Ignore GL_PALETTE4_R5_G6_B5_OES +Ignore GL_PALETTE4_RGB5_A1_OES +Ignore GL_PALETTE4_RGB8_OES +Ignore GL_PALETTE4_RGBA4_OES +Ignore GL_PALETTE4_RGBA8_OES +Ignore GL_PALETTE8_R5_G6_B5_OES +Ignore GL_PALETTE8_RGB5_A1_OES +Ignore GL_PALETTE8_RGB8_OES +Ignore GL_PALETTE8_RGBA4_OES +Ignore GL_PALETTE8_RGBA8_OES +Ignore GL_PERSPECTIVE_CORRECTION_HINT +Ignore GL_PLATFORM_BINARY +Ignore GL_POINT_DISTANCE_ATTENUATION +Ignore GL_POINT_FADE_THRESHOLD_SIZE +Ignore GL_POINT_SIZE +Ignore GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES +Ignore GL_POINT_SIZE_ARRAY_OES +Ignore GL_POINT_SIZE_ARRAY_POINTER_OES +Ignore GL_POINT_SIZE_ARRAY_STRIDE_OES +Ignore GL_POINT_SIZE_ARRAY_TYPE_OES +Ignore GL_POINT_SIZE_MAX +Ignore GL_POINT_SIZE_MIN +Ignore GL_POINT_SMOOTH +Ignore GL_POINT_SMOOTH_HINT +Ignore GL_POINT_SPRITE_OES +Ignore GL_POSITION +Ignore GL_PREVIOUS +Ignore GL_PRIMARY_COLOR +Ignore GL_PROJECTION +Ignore GL_PROJECTION_MATRIX +Ignore GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES +Ignore GL_PROJECTION_STACK_DEPTH +Ignore GL_QUADRATIC_ATTENUATION +Ignore GL_R11F_G11F_B10F_EXT +Ignore GL_REFLECTION_MAP_OES +Ignore GL_RENDERBUFFER +Ignore GL_RENDERBUFFER_ALPHA_SIZE +Ignore GL_RENDERBUFFER_ALPHA_SIZE_OES +Ignore GL_RENDERBUFFER_BINDING +Ignore GL_RENDERBUFFER_BINDING_OES +Ignore GL_RENDERBUFFER_BLUE_SIZE +Ignore GL_RENDERBUFFER_BLUE_SIZE_OES +Ignore GL_RENDERBUFFER_DEPTH_SIZE +Ignore GL_RENDERBUFFER_DEPTH_SIZE_OES +Ignore GL_RENDERBUFFER_GREEN_SIZE +Ignore GL_RENDERBUFFER_GREEN_SIZE_OES +Ignore GL_RENDERBUFFER_HEIGHT +Ignore GL_RENDERBUFFER_HEIGHT_OES +Ignore GL_RENDERBUFFER_INTERNAL_FORMAT +Ignore GL_RENDERBUFFER_INTERNAL_FORMAT_OES +Ignore GL_RENDERBUFFER_OES +Ignore GL_RENDERBUFFER_OES +Ignore GL_RENDERBUFFER_RED_SIZE +Ignore GL_RENDERBUFFER_RED_SIZE_OES +Ignore GL_RENDERBUFFER_STENCIL_SIZE +Ignore GL_RENDERBUFFER_STENCIL_SIZE_OES +Ignore GL_RENDERBUFFER_WIDTH +Ignore GL_RENDERBUFFER_WIDTH_OES +Ignore GL_RESCALE_NORMAL +Ignore GL_RGB565 +Ignore GL_RGB565_OES +Ignore GL_RGB5_A1 +Ignore GL_RGB5_A1_OES +Ignore GL_RGBA4 +Ignore GL_RGBA4_OES +Ignore GL_RGBA_SIGNED_COMPONENTS_EXT +Ignore GL_RGB_SCALE +Ignore GL_SAMPLE_ALPHA_TO_ONE +Ignore GL_SAMPLER_2D +Ignore GL_SAMPLER_2D_ARRAY_EXT +Ignore GL_SAMPLER_CUBE +Ignore GL_SET +Ignore GL_SHADE_MODEL +Ignore GL_SHADER_BINARY_FORMATS +Ignore GL_SHADER_COMPILER +Ignore GL_SHADER_SOURCE_LENGTH +Ignore GL_SHADER_TYPE +Ignore GL_SHADING_LANGUAGE_VERSION +Ignore GL_SHININESS +Ignore GL_SMOOTH +Ignore GL_SMOOTH_LINE_WIDTH_RANGE +Ignore GL_SMOOTH_POINT_SIZE_RANGE +Ignore GL_SPECULAR +Ignore GL_SPOT_CUTOFF +Ignore GL_SPOT_DIRECTION +Ignore GL_SPOT_EXPONENT +Ignore GL_SRC0_ALPHA +Ignore GL_SRC0_RGB +Ignore GL_SRC1_ALPHA +Ignore GL_SRC1_RGB +Ignore GL_SRC2_ALPHA +Ignore GL_SRC2_RGB +Ignore GL_STACK_OVERFLOW +Ignore GL_STACK_UNDERFLOW +Ignore GL_STENCIL_ATTACHMENT +Ignore GL_STENCIL_ATTACHMENT_OES +Ignore GL_STENCIL_BACK_FAIL +Ignore GL_STENCIL_BACK_FUNC +Ignore GL_STENCIL_BACK_PASS_DEPTH_FAIL +Ignore GL_STENCIL_BACK_PASS_DEPTH_PASS +Ignore GL_STENCIL_BACK_REF +Ignore GL_STENCIL_BACK_VALUE_MASK +Ignore GL_STENCIL_BACK_WRITEMASK +Ignore GL_STENCIL_INDEX +Ignore GL_STENCIL_INDEX1_OES +Ignore GL_STENCIL_INDEX4_OES +Ignore GL_STENCIL_INDEX8 +Ignore GL_STENCIL_INDEX8_OES +Ignore GL_STREAM_DRAW +Ignore GL_SUBTRACT +Ignore GL_TEXTURE_2D_ARRAY_EXT +Ignore GL_TEXTURE_2D_OES +Ignore GL_TEXTURE_BINDING_2D_ARRAY_EXT +Ignore GL_TEXTURE_BINDING_CUBE_MAP +Ignore GL_TEXTURE_BINDING_CUBE_MAP_OES +Ignore GL_TEXTURE_COORD_ARRAY +Ignore GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING +Ignore GL_TEXTURE_COORD_ARRAY_POINTER +Ignore GL_TEXTURE_COORD_ARRAY_SIZE +Ignore GL_TEXTURE_COORD_ARRAY_STRIDE +Ignore GL_TEXTURE_COORD_ARRAY_TYPE +Ignore GL_TEXTURE_CROP_RECT_OES +Ignore GL_TEXTURE_CUBE_MAP +Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_X +Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES +Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES +Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Y +Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES +Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES +Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Z +Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES +Ignore GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES +Ignore GL_TEXTURE_CUBE_MAP_OES +Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_X +Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES +Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES +Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Y +Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES +Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES +Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Z +Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES +Ignore GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES +Ignore GL_TEXTURE_ENV +Ignore GL_TEXTURE_ENV_COLOR +Ignore GL_TEXTURE_ENV_MODE +Ignore GL_TEXTURE_GEN_MODE_OES +Ignore GL_TEXTURE_GEN_STR_OES +Ignore GL_TEXTURE_MATRIX +Ignore GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES +Ignore GL_TEXTURE_MAX_LEVEL_NV +Ignore GL_TEXTURE_RECTANGLE_NV_OES +Ignore GL_TEXTURE_STACK_DEPTH +Ignore GL_UNSIGNED_INT +Ignore GL_UNSIGNED_INT_10F_11F_11F_REV_EXT +Ignore GL_VALIDATE_STATUS +Ignore GL_VERTEX_ARRAY +Ignore GL_VERTEX_ARRAY_BUFFER_BINDING +Ignore GL_VERTEX_ARRAY_POINTER +Ignore GL_VERTEX_ARRAY_SIZE +Ignore GL_VERTEX_ARRAY_STRIDE +Ignore GL_VERTEX_ARRAY_TYPE +Ignore GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING +Ignore GL_VERTEX_ATTRIB_ARRAY_ENABLED +Ignore GL_VERTEX_ATTRIB_ARRAY_NORMALIZED +Ignore GL_VERTEX_ATTRIB_ARRAY_NV +Ignore GL_VERTEX_ATTRIB_ARRAY_POINTER +Ignore GL_VERTEX_ATTRIB_ARRAY_SIZE +Ignore GL_VERTEX_ATTRIB_ARRAY_STRIDE +Ignore GL_VERTEX_ATTRIB_ARRAY_TYPE +Ignore GL_VERTEX_SHADER +Ignore GL_WEIGHT_ARRAY_BUFFER_BINDING_OES +Ignore GL_WEIGHT_ARRAY_OES +Ignore GL_WEIGHT_ARRAY_POINTER_OES +Ignore GL_WEIGHT_ARRAY_SIZE_OES +Ignore GL_WEIGHT_ARRAY_STRIDE_OES +Ignore GL_WEIGHT_ARRAY_TYPE_OES +Ignore GL_WRITE_ONLY_OES +Ignore GL_XOR +Ignore glIsFramebuffer +Ignore glIsFramebufferOES +Ignore glIsProgram +Ignore glIsRenderbuffer +Ignore glIsRenderbufferOES +Ignore glIsShader +Ignore glUnmapBufferOES +Ignore glCheckFramebufferStatus +Ignore glCheckFramebufferStatusOES +Ignore glCreateProgram +Ignore glCreateShader +Ignore glGetAttribLocation +Ignore glGetUniformLocation +Ignore glAlphaFunc +Ignore glAttachShader +Ignore glBindAttribLocation +Ignore glBindFramebuffer +Ignore glBindFramebufferOES +Ignore glBindRenderbuffer +Ignore glBindRenderbufferOES +Ignore glBlendColor +Ignore glBlendEquation +Ignore glBlendEquationOES +Ignore glBlendEquationSeparate +Ignore glBlendEquationSeparateOES +Ignore glBlendFuncSeparate +Ignore glBlendFuncSeparateOES +Ignore glClearDepthfOES +Ignore glClientActiveTexture +Ignore glClipPlanef +Ignore glClipPlanef +Ignore glClipPlanefOES +Ignore glClipPlanefOES +Ignore glColor4f +Ignore glColor4ub +Ignore glColorPointer +Ignore glColorPointer +Ignore glCompileShader +Ignore glCoverageMaskNV +Ignore glCoverageOperationNV +Ignore glDeleteFramebuffers +Ignore glDeleteFramebuffers +Ignore glDeleteFramebuffersOES +Ignore glDeleteFramebuffersOES +Ignore glDeleteProgram +Ignore glDeleteRenderbuffers +Ignore glDeleteRenderbuffers +Ignore glDeleteRenderbuffersOES +Ignore glDeleteRenderbuffersOES +Ignore glDeleteShader +Ignore glDepthRangefOES +Ignore glDetachShader +Ignore glDisableClientState +Ignore glDisableVertexAttribArray +Ignore glDrawTexfOES +Ignore glDrawTexfvOES +Ignore glDrawTexfvOES +Ignore glDrawTexiOES +Ignore glDrawTexivOES +Ignore glDrawTexivOES +Ignore glDrawTexsOES +Ignore glDrawTexsvOES +Ignore glDrawTexsvOES +Ignore glDrawTexxvOES +Ignore glDrawTexxvOES +Ignore glEnableClientState +Ignore glEnableVertexAttribArray +Ignore glFogf +Ignore glFogfv +Ignore glFogfv +Ignore glFogxv +Ignore glFogxv +Ignore glFogxvOES +Ignore glFogxvOES +Ignore glFramebufferRenderbuffer +Ignore glFramebufferRenderbufferOES +Ignore glFramebufferTexture2D +Ignore glFramebufferTexture2DOES +Ignore glFramebufferVertexAttribArrayNV +Ignore glFrustumf +Ignore glFrustumfOES +Ignore glGenerateMipmap +Ignore glGenerateMipmapOES +Ignore glGenFramebuffers +Ignore glGenFramebuffers +Ignore glGenFramebuffersOES +Ignore glGenFramebuffersOES +Ignore glGenRenderbuffers +Ignore glGenRenderbuffers +Ignore glGenRenderbuffersOES +Ignore glGenRenderbuffersOES +Ignore glGetActiveAttrib +Ignore glGetActiveAttrib +Ignore glGetActiveUniform +Ignore glGetActiveUniform +Ignore glGetAttachedShaders +Ignore glGetAttachedShaders +Ignore glGetClipPlanef +Ignore glGetClipPlanef +Ignore glGetClipPlanefOES +Ignore glGetClipPlanefOES +Ignore glGetFixedv +Ignore glGetFixedv +Ignore glGetFixedvOES +Ignore glGetFixedvOES +Ignore glGetFramebufferAttachmentParameteriv +Ignore glGetFramebufferAttachmentParameteriv +Ignore glGetFramebufferAttachmentParameterivOES +Ignore glGetFramebufferAttachmentParameterivOES +Ignore glGetLightfv +Ignore glGetLightfv +Ignore glGetLightxv +Ignore glGetLightxv +Ignore glGetLightxvOES +Ignore glGetLightxvOES +Ignore glGetMaterialfv +Ignore glGetMaterialfv +Ignore glGetMaterialxv +Ignore glGetMaterialxv +Ignore glGetMaterialxvOES +Ignore glGetMaterialxvOES +Ignore glGetProgramInfoLog +Ignore glGetProgramInfoLog +Ignore glGetProgramiv +Ignore glGetProgramiv +Ignore glGetRenderbufferParameteriv +Ignore glGetRenderbufferParameteriv +Ignore glGetRenderbufferParameterivOES +Ignore glGetRenderbufferParameterivOES +Ignore glGetShaderInfoLog +Ignore glGetShaderInfoLog +Ignore glGetShaderiv +Ignore glGetShaderiv +Ignore glGetShaderPrecisionFormat +Ignore glGetShaderPrecisionFormat +Ignore glGetShaderSource +Ignore glGetShaderSource +Ignore glGetTexEnvfv +Ignore glGetTexEnvfv +Ignore glGetTexEnviv +Ignore glGetTexEnviv +Ignore glGetTexEnvxv +Ignore glGetTexEnvxv +Ignore glGetTexEnvxvOES +Ignore glGetTexEnvxvOES +Ignore glGetTexGenfvOES +Ignore glGetTexGenfvOES +Ignore glGetTexGenivOES +Ignore glGetTexGenivOES +Ignore glGetTexGenxvOES +Ignore glGetTexGenxvOES +Ignore glGetTexParameterxv +Ignore glGetTexParameterxv +Ignore glGetTexParameterxvOES +Ignore glGetTexParameterxvOES +Ignore glGetUniformfv +Ignore glGetUniformfv +Ignore glGetUniformiv +Ignore glGetUniformiv +Ignore glGetVertexAttribfv +Ignore glGetVertexAttribfv +Ignore glGetVertexAttribiv +Ignore glGetVertexAttribiv +Ignore glLightf +Ignore glLightfv +Ignore glLightfv +Ignore glLightModelf +Ignore glLightModelfv +Ignore glLightModelfv +Ignore glLightModelxv +Ignore glLightModelxv +Ignore glLightModelxvOES +Ignore glLightModelxvOES +Ignore glLightxv +Ignore glLightxv +Ignore glLightxvOES +Ignore glLightxvOES +Ignore glLinkProgram +Ignore glLoadIdentity +Ignore glLoadMatrixf +Ignore glLoadMatrixf +Ignore glLogicOp +Ignore glMaterialf +Ignore glMaterialfv +Ignore glMaterialfv +Ignore glMaterialxv +Ignore glMaterialxv +Ignore glMaterialxvOES +Ignore glMaterialxvOES +Ignore glMatrixIndexPointerOES +Ignore glMatrixMode +Ignore glMultiTexCoord4f +Ignore glMultMatrixf +Ignore glMultMatrixf +Ignore glNormal3f +Ignore glNormalPointer +Ignore glNormalPointer +Ignore glOrthof +Ignore glOrthofOES +Ignore glPointParameterf +Ignore glPointParameterfv +Ignore glPointParameterfv +Ignore glPointParameterxv +Ignore glPointParameterxv +Ignore glPointParameterxvOES +Ignore glPointParameterxvOES +Ignore glPointSize +Ignore glPointSizePointerOES +Ignore glReleaseShaderCompiler +Ignore glRenderbufferStorage +Ignore glRenderbufferStorageOES +Ignore glRotatef +Ignore glScalef +Ignore glShadeModel +Ignore glShaderBinary +Ignore glShaderBinary +Ignore glShaderSource +Ignore glShaderSource +Ignore glStencilFuncSeparate +Ignore glStencilMaskSeparate +Ignore glStencilOpSeparate +Ignore glTexCoordPointer +Ignore glTexCoordPointer +Ignore glTexEnvf +Ignore glTexEnvfv +Ignore glTexEnvfv +Ignore glTexEnvi +Ignore glTexEnviv +Ignore glTexEnviv +Ignore glTexEnvxv +Ignore glTexEnvxv +Ignore glTexEnvxvOES +Ignore glTexEnvxvOES +Ignore glTexGenfOES +Ignore glTexGenfvOES +Ignore glTexGenfvOES +Ignore glTexGeniOES +Ignore glTexGenivOES +Ignore glTexGenivOES +Ignore glTexGenxvOES +Ignore glTexGenxvOES +Ignore glTexParameterxv +Ignore glTexParameterxv +Ignore glTexParameterxvOES +Ignore glTexParameterxvOES +Ignore glTranslatef +Ignore glUniform1f +Ignore glUniform1fv +Ignore glUniform1fv +Ignore glUniform1i +Ignore glUniform1iv +Ignore glUniform1iv +Ignore glUniform2f +Ignore glUniform2fv +Ignore glUniform2fv +Ignore glUniform2i +Ignore glUniform2iv +Ignore glUniform2iv +Ignore glUniform3f +Ignore glUniform3fv +Ignore glUniform3fv +Ignore glUniform3i +Ignore glUniform3iv +Ignore glUniform3iv +Ignore glUniform4f +Ignore glUniform4fv +Ignore glUniform4fv +Ignore glUniform4i +Ignore glUniform4iv +Ignore glUniform4iv +Ignore glUniformMatrix2fv +Ignore glUniformMatrix2fv +Ignore glUniformMatrix3fv +Ignore glUniformMatrix3fv +Ignore glUniformMatrix4fv +Ignore glUniformMatrix4fv +Ignore glUseProgram +Ignore glValidateProgram +Ignore glVertexAttrib1f +Ignore glVertexAttrib1fv +Ignore glVertexAttrib1fv +Ignore glVertexAttrib2f +Ignore glVertexAttrib2fv +Ignore glVertexAttrib2fv +Ignore glVertexAttrib3f +Ignore glVertexAttrib3fv +Ignore glVertexAttrib3fv +Ignore glVertexAttrib4f +Ignore glVertexAttrib4fv +Ignore glVertexAttrib4fv +Ignore glVertexAttribPointer +Ignore glVertexAttribPointer +Ignore glVertexPointer +Ignore glVertexPointer +Ignore glWeightPointerOES diff --git a/make/gl-ignore-gl2_es2-enums.cfg b/make/gl-ignore-gl2_es2-enums.cfg new file mode 100644 index 000000000..b576c8538 --- /dev/null +++ b/make/gl-ignore-gl2_es2-enums.cfg @@ -0,0 +1,358 @@ +Ignore ^GL_ES_VERSION_2_0 +Ignore ^GL_DEPTH_BUFFER_BIT +Ignore ^GL_STENCIL_BUFFER_BIT +Ignore ^GL_COLOR_BUFFER_BIT +Ignore ^GL_FALSE +Ignore ^GL_TRUE +Ignore ^GL_NONE +Ignore ^GL_POINTS +Ignore ^GL_LINES +Ignore ^GL_LINE_LOOP +Ignore ^GL_LINE_STRIP +Ignore ^GL_TRIANGLES +Ignore ^GL_TRIANGLE_STRIP +Ignore ^GL_TRIANGLE_FAN +Ignore ^GL_ZERO +Ignore ^GL_ONE +Ignore ^GL_SRC_COLOR +Ignore ^GL_ONE_MINUS_SRC_COLOR +Ignore ^GL_SRC_ALPHA +Ignore ^GL_ONE_MINUS_SRC_ALPHA +Ignore ^GL_DST_ALPHA +Ignore ^GL_ONE_MINUS_DST_ALPHA +Ignore ^GL_DST_COLOR +Ignore ^GL_ONE_MINUS_DST_COLOR +Ignore ^GL_SRC_ALPHA_SATURATE +Ignore ^GL_FUNC_ADD +Ignore ^GL_BLEND_EQUATION +Ignore ^GL_BLEND_EQUATION_RGB +Ignore ^GL_BLEND_EQUATION_ALPHA +Ignore ^GL_FUNC_SUBTRACT +Ignore ^GL_FUNC_REVERSE_SUBTRACT +Ignore ^GL_BLEND_DST_RGB +Ignore ^GL_BLEND_SRC_RGB +Ignore ^GL_BLEND_DST_ALPHA +Ignore ^GL_BLEND_SRC_ALPHA +Ignore ^GL_CONSTANT_COLOR +Ignore ^GL_ONE_MINUS_CONSTANT_COLOR +Ignore ^GL_CONSTANT_ALPHA +Ignore ^GL_ONE_MINUS_CONSTANT_ALPHA +Ignore ^GL_BLEND_COLOR +Ignore ^GL_ARRAY_BUFFER +Ignore ^GL_ELEMENT_ARRAY_BUFFER +Ignore ^GL_ARRAY_BUFFER_BINDING +Ignore ^GL_ELEMENT_ARRAY_BUFFER_BINDING +Ignore ^GL_STREAM_DRAW +Ignore ^GL_STATIC_DRAW +Ignore ^GL_DYNAMIC_DRAW +Ignore ^GL_BUFFER_SIZE +Ignore ^GL_BUFFER_USAGE +Ignore ^GL_CURRENT_VERTEX_ATTRIB +Ignore ^GL_FRONT +Ignore ^GL_BACK +Ignore ^GL_FRONT_AND_BACK +Ignore ^GL_TEXTURE_2D +Ignore ^GL_CULL_FACE +Ignore ^GL_BLEND +Ignore ^GL_DITHER +Ignore ^GL_STENCIL_TEST +Ignore ^GL_DEPTH_TEST +Ignore ^GL_SCISSOR_TEST +Ignore ^GL_POLYGON_OFFSET_FILL +Ignore ^GL_SAMPLE_ALPHA_TO_COVERAGE +Ignore ^GL_SAMPLE_COVERAGE +Ignore ^GL_NO_ERROR +Ignore ^GL_INVALID_ENUM +Ignore ^GL_INVALID_VALUE +Ignore ^GL_INVALID_OPERATION +Ignore ^GL_OUT_OF_MEMORY +Ignore ^GL_CW +Ignore ^GL_CCW +Ignore ^GL_LINE_WIDTH +Ignore ^GL_ALIASED_POINT_SIZE_RANGE +Ignore ^GL_ALIASED_LINE_WIDTH_RANGE +Ignore ^GL_CULL_FACE_MODE +Ignore ^GL_FRONT_FACE +Ignore ^GL_DEPTH_RANGE +Ignore ^GL_DEPTH_WRITEMASK +Ignore ^GL_DEPTH_CLEAR_VALUE +Ignore ^GL_DEPTH_FUNC +Ignore ^GL_STENCIL_CLEAR_VALUE +Ignore ^GL_STENCIL_FUNC +Ignore ^GL_STENCIL_FAIL +Ignore ^GL_STENCIL_PASS_DEPTH_FAIL +Ignore ^GL_STENCIL_PASS_DEPTH_PASS +Ignore ^GL_STENCIL_REF +Ignore ^GL_STENCIL_VALUE_MASK +Ignore ^GL_STENCIL_WRITEMASK +Ignore ^GL_STENCIL_BACK_FUNC +Ignore ^GL_STENCIL_BACK_FAIL +Ignore ^GL_STENCIL_BACK_PASS_DEPTH_FAIL +Ignore ^GL_STENCIL_BACK_PASS_DEPTH_PASS +Ignore ^GL_STENCIL_BACK_REF +Ignore ^GL_STENCIL_BACK_VALUE_MASK +Ignore ^GL_STENCIL_BACK_WRITEMASK +Ignore ^GL_VIEWPORT +Ignore ^GL_SCISSOR_BOX +Ignore ^GL_COLOR_CLEAR_VALUE +Ignore ^GL_COLOR_WRITEMASK +Ignore ^GL_UNPACK_ALIGNMENT +Ignore ^GL_PACK_ALIGNMENT +Ignore ^GL_MAX_TEXTURE_SIZE +Ignore ^GL_MAX_VIEWPORT_DIMS +Ignore ^GL_SUBPIXEL_BITS +Ignore ^GL_RED_BITS +Ignore ^GL_GREEN_BITS +Ignore ^GL_BLUE_BITS +Ignore ^GL_ALPHA_BITS +Ignore ^GL_DEPTH_BITS +Ignore ^GL_STENCIL_BITS +Ignore ^GL_POLYGON_OFFSET_UNITS +Ignore ^GL_POLYGON_OFFSET_FACTOR +Ignore ^GL_TEXTURE_BINDING_2D +Ignore ^GL_SAMPLE_BUFFERS +Ignore ^GL_SAMPLES +Ignore ^GL_SAMPLE_COVERAGE_VALUE +Ignore ^GL_SAMPLE_COVERAGE_INVERT +Ignore ^GL_NUM_COMPRESSED_TEXTURE_FORMATS +Ignore ^GL_COMPRESSED_TEXTURE_FORMATS +Ignore ^GL_DONT_CARE +Ignore ^GL_FASTEST +Ignore ^GL_NICEST +Ignore ^GL_GENERATE_MIPMAP_HINT +Ignore ^GL_FRAGMENT_SHADER_DERIVATIVE_HINT +Ignore ^GL_BYTE +Ignore ^GL_UNSIGNED_BYTE +Ignore ^GL_SHORT +Ignore ^GL_UNSIGNED_SHORT +Ignore ^GL_INT +Ignore ^GL_UNSIGNED_INT +Ignore ^GL_FLOAT +Ignore ^GL_FIXED +Ignore ^GL_DEPTH_COMPONENT +Ignore ^GL_ALPHA +Ignore ^GL_RGB +Ignore ^GL_RGBA +Ignore ^GL_LUMINANCE +Ignore ^GL_LUMINANCE_ALPHA +Ignore ^GL_UNSIGNED_SHORT_4_4_4_4 +Ignore ^GL_UNSIGNED_SHORT_5_5_5_1 +Ignore ^GL_UNSIGNED_SHORT_5_6_5 +Ignore ^GL_FRAGMENT_SHADER +Ignore ^GL_VERTEX_SHADER +Ignore ^GL_MAX_VERTEX_ATTRIBS +Ignore ^GL_MAX_VERTEX_UNIFORM_VECTORS +Ignore ^GL_MAX_VARYING_VECTORS +Ignore ^GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS +Ignore ^GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS +Ignore ^GL_MAX_TEXTURE_IMAGE_UNITS +Ignore ^GL_MAX_FRAGMENT_UNIFORM_VECTORS +Ignore ^GL_SHADER_TYPE +Ignore ^GL_DELETE_STATUS +Ignore ^GL_LINK_STATUS +Ignore ^GL_VALIDATE_STATUS +Ignore ^GL_ATTACHED_SHADERS +Ignore ^GL_ACTIVE_UNIFORMS +Ignore ^GL_ACTIVE_UNIFORM_MAX_LENGTH +Ignore ^GL_ACTIVE_ATTRIBUTES +Ignore ^GL_ACTIVE_ATTRIBUTE_MAX_LENGTH +Ignore ^GL_SHADING_LANGUAGE_VERSION +Ignore ^GL_CURRENT_PROGRAM +Ignore ^GL_NEVER +Ignore ^GL_LESS +Ignore ^GL_EQUAL +Ignore ^GL_LEQUAL +Ignore ^GL_GREATER +Ignore ^GL_NOTEQUAL +Ignore ^GL_GEQUAL +Ignore ^GL_ALWAYS +Ignore ^GL_KEEP +Ignore ^GL_REPLACE +Ignore ^GL_INCR +Ignore ^GL_DECR +Ignore ^GL_INVERT +Ignore ^GL_INCR_WRAP +Ignore ^GL_DECR_WRAP +Ignore ^GL_VENDOR +Ignore ^GL_RENDERER +Ignore ^GL_VERSION +Ignore ^GL_EXTENSIONS +Ignore ^GL_NEAREST +Ignore ^GL_LINEAR +Ignore ^GL_NEAREST_MIPMAP_NEAREST +Ignore ^GL_LINEAR_MIPMAP_NEAREST +Ignore ^GL_NEAREST_MIPMAP_LINEAR +Ignore ^GL_LINEAR_MIPMAP_LINEAR +Ignore ^GL_TEXTURE_MAG_FILTER +Ignore ^GL_TEXTURE_MIN_FILTER +Ignore ^GL_TEXTURE_WRAP_S +Ignore ^GL_TEXTURE_WRAP_T +Ignore ^GL_TEXTURE +Ignore ^GL_TEXTURE_CUBE_MAP +Ignore ^GL_TEXTURE_BINDING_CUBE_MAP +Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_X +Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_X +Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Y +Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Y +Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Z +Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Z +Ignore ^GL_MAX_CUBE_MAP_TEXTURE_SIZE +Ignore ^GL_TEXTURE0 +Ignore ^GL_TEXTURE1 +Ignore ^GL_TEXTURE2 +Ignore ^GL_TEXTURE3 +Ignore ^GL_TEXTURE4 +Ignore ^GL_TEXTURE5 +Ignore ^GL_TEXTURE6 +Ignore ^GL_TEXTURE7 +Ignore ^GL_TEXTURE8 +Ignore ^GL_TEXTURE9 +Ignore ^GL_TEXTURE10 +Ignore ^GL_TEXTURE11 +Ignore ^GL_TEXTURE12 +Ignore ^GL_TEXTURE13 +Ignore ^GL_TEXTURE14 +Ignore ^GL_TEXTURE15 +Ignore ^GL_TEXTURE16 +Ignore ^GL_TEXTURE17 +Ignore ^GL_TEXTURE18 +Ignore ^GL_TEXTURE19 +Ignore ^GL_TEXTURE20 +Ignore ^GL_TEXTURE21 +Ignore ^GL_TEXTURE22 +Ignore ^GL_TEXTURE23 +Ignore ^GL_TEXTURE24 +Ignore ^GL_TEXTURE25 +Ignore ^GL_TEXTURE26 +Ignore ^GL_TEXTURE27 +Ignore ^GL_TEXTURE28 +Ignore ^GL_TEXTURE29 +Ignore ^GL_TEXTURE30 +Ignore ^GL_TEXTURE31 +Ignore ^GL_ACTIVE_TEXTURE +Ignore ^GL_REPEAT +Ignore ^GL_CLAMP_TO_EDGE +Ignore ^GL_MIRRORED_REPEAT +Ignore ^GL_FLOAT_VEC2 +Ignore ^GL_FLOAT_VEC3 +Ignore ^GL_FLOAT_VEC4 +Ignore ^GL_INT_VEC2 +Ignore ^GL_INT_VEC3 +Ignore ^GL_INT_VEC4 +Ignore ^GL_BOOL +Ignore ^GL_BOOL_VEC2 +Ignore ^GL_BOOL_VEC3 +Ignore ^GL_BOOL_VEC4 +Ignore ^GL_FLOAT_MAT2 +Ignore ^GL_FLOAT_MAT3 +Ignore ^GL_FLOAT_MAT4 +Ignore ^GL_SAMPLER_2D +Ignore ^GL_SAMPLER_CUBE +Ignore ^GL_VERTEX_ATTRIB_ARRAY_ENABLED +Ignore ^GL_VERTEX_ATTRIB_ARRAY_SIZE +Ignore ^GL_VERTEX_ATTRIB_ARRAY_STRIDE +Ignore ^GL_VERTEX_ATTRIB_ARRAY_TYPE +Ignore ^GL_VERTEX_ATTRIB_ARRAY_NORMALIZED +Ignore ^GL_VERTEX_ATTRIB_ARRAY_POINTER +Ignore ^GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING +Ignore ^GL_IMPLEMENTATION_COLOR_READ_TYPE +Ignore ^GL_IMPLEMENTATION_COLOR_READ_FORMAT +Ignore ^GL_COMPILE_STATUS +Ignore ^GL_INFO_LOG_LENGTH +Ignore ^GL_SHADER_SOURCE_LENGTH +Ignore ^GL_SHADER_COMPILER +Ignore ^GL_PLATFORM_BINARY +Ignore ^GL_SHADER_BINARY_FORMATS +Ignore ^GL_NUM_SHADER_BINARY_FORMATS +Ignore ^GL_LOW_FLOAT +Ignore ^GL_MEDIUM_FLOAT +Ignore ^GL_HIGH_FLOAT +Ignore ^GL_LOW_INT +Ignore ^GL_MEDIUM_INT +Ignore ^GL_HIGH_INT +Ignore ^GL_FRAMEBUFFER +Ignore ^GL_RENDERBUFFER +Ignore ^GL_RGBA4 +Ignore ^GL_RGB5_A1 +Ignore ^GL_RGB565 +Ignore ^GL_DEPTH_COMPONENT16 +Ignore ^GL_STENCIL_INDEX +Ignore ^GL_STENCIL_INDEX8 +Ignore ^GL_RENDERBUFFER_WIDTH +Ignore ^GL_RENDERBUFFER_HEIGHT +Ignore ^GL_RENDERBUFFER_INTERNAL_FORMAT +Ignore ^GL_RENDERBUFFER_RED_SIZE +Ignore ^GL_RENDERBUFFER_GREEN_SIZE +Ignore ^GL_RENDERBUFFER_BLUE_SIZE +Ignore ^GL_RENDERBUFFER_ALPHA_SIZE +Ignore ^GL_RENDERBUFFER_DEPTH_SIZE +Ignore ^GL_RENDERBUFFER_STENCIL_SIZE +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE +Ignore ^GL_COLOR_ATTACHMENT0 +Ignore ^GL_DEPTH_ATTACHMENT +Ignore ^GL_STENCIL_ATTACHMENT +Ignore ^GL_FRAMEBUFFER_COMPLETE +Ignore ^GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT +Ignore ^GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT +Ignore ^GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS +Ignore ^GL_FRAMEBUFFER_INCOMPLETE_FORMATS +Ignore ^GL_FRAMEBUFFER_UNSUPPORTED +Ignore ^GL_FRAMEBUFFER_BINDING +Ignore ^GL_RENDERBUFFER_BINDING +Ignore ^GL_MAX_RENDERBUFFER_SIZE +Ignore ^GL_INVALID_FRAMEBUFFER_OPERATION +Ignore ^GL_NVIDIA_PLATFORM_BINARY_NV +Ignore ^GL_OES_EGL_image +Ignore ^GL_TEXTURE_2D_OES +Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES +Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES +Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES +Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES +Ignore ^GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES +Ignore ^GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES +Ignore ^GL_RENDERBUFFER_OES +Ignore ^GL_TEXTURE_RECTANGLE_NV_OES +Ignore ^GL_OES_texture_half_float +Ignore ^GL_HALF_FLOAT_OES +Ignore ^GL_BUFFER_MAPPED_OES +Ignore ^GL_BUFFER_MAP_POINTER_OES +Ignore ^GL_RGB8_OES +Ignore ^GL_RGBA8_OES +Ignore ^GL_OES_mapbuffer +Ignore ^GL_OES_rgb8_rgba8 +Ignore ^GL_R11F_G11F_B10F_EXT +Ignore ^GL_UNSIGNED_INT_10F_11F_11F_REV_EXT +Ignore ^GL_RGBA_SIGNED_COMPONENTS_EXT +Ignore ^GL_TEXTURE_2D_ARRAY_EXT +Ignore ^GL_SAMPLER_2D_ARRAY_EXT +Ignore ^GL_TEXTURE_BINDING_2D_ARRAY_EXT +Ignore ^GL_MAX_ARRAY_TEXTURE_LAYERS_EXT +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT +Ignore ^GL_COMPRESSED_RGB_S3TC_DXT1_EXT +Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT1_EXT +Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT3_EXT +Ignore ^GL_COMPRESSED_RGBA_S3TC_DXT5_EXT +Ignore ^GL_TEXTURE_MAX_ANISOTROPY_EXT +Ignore ^GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT +Ignore ^GL_TEXTURE_MAX_LEVEL_NV +Ignore ^GL_COVERAGE_COMPONENT_NV +Ignore ^GL_COVERAGE_COMPONENT4_NV +Ignore ^GL_COVERAGE_ATTACHMENT_NV +Ignore ^GL_COVERAGE_BUFFER_BIT_NV +Ignore ^GL_COVERAGE_BUFFERS_NV +Ignore ^GL_COVERAGE_SAMPLES_NV +Ignore ^GL_COVERAGE_ALL_FRAGMENTS_NV +Ignore ^GL_COVERAGE_EDGE_FRAGMENTS_NV +Ignore ^GL_COVERAGE_AUTOMATIC_NV +Ignore ^GL_FRAMEBUFFER_ATTACHABLE_NV +Ignore ^GL_VERTEX_ATTRIB_ARRAY_NV +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_SIZE_NV +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_TYPE_NV +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_NORMALIZED_NV +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_OFFSET_NV +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_WIDTH_NV +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_STRIDE_NV +Ignore ^GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_HEIGHT_NV diff --git a/make/gl-impl-CustomJavaCode-common.java b/make/gl-impl-CustomJavaCode-common.java new file mode 100644 index 000000000..0829d588a --- /dev/null +++ b/make/gl-impl-CustomJavaCode-common.java @@ -0,0 +1,85 @@ + public final boolean isGL2() { + return GLProfile.implementationOfGL2(this); + } + + public final boolean isGLES1() { + return GLProfile.implementationOfGLES1(this); + } + + public final boolean isGLES2() { + return GLProfile.implementationOfGLES2(this); + } + + public final boolean isGLES() { + return GLProfile.implementationOfGLES(this); + } + + public final boolean isGL2ES1() { + return GLProfile.implementationOfGL2ES1(this); + } + + public final boolean isGL2ES2() { + return GLProfile.implementationOfGL2ES2(this); + } + + public final GL2 getGL2() throws GLException { + if(!isGL2()) { + throw new GLException("Not a GL2implementation"); + } + return (GL2)this; + } + + public final GLES1 getGLES1() throws GLException { + if(!isGLES1()) { + throw new GLException("Not a GLES1 implementation"); + } + return (GLES1)this; + } + + public final GLES2 getGLES2() throws GLException { + if(!isGLES2()) { + throw new GLException("Not a GLES2 implementation"); + } + return (GLES2)this; + } + + public final GL2ES1 getGL2ES1() throws GLException { + if(!isGL2ES1()) { + throw new GLException("Not a GL2ES1 implementation"); + } + return (GL2ES1)this; + } + + public final GL2ES2 getGL2ES2() throws GLException { + if(!isGL2ES2()) { + throw new GLException("Not a GL2ES2 implementation"); + } + return (GL2ES2)this; + } + + public final boolean matchesProfile() { + return matchesProfile(GLProfile.getProfile()); + } + + public final boolean matchesProfile(String test_profile) { + if(null==test_profile) { + return false; + } + if(test_profile.equals(GLProfile.GL2)) { + return isGL2(); + } + if(test_profile.equals(GLProfile.GLES1)) { + return isGLES1(); + } + if(test_profile.equals(GLProfile.GLES2)) { + return isGLES2(); + } + return false; + } + + public final String toString() { + return "GL: "+getClass().getName()+ + "(GLContext: "+getContext().getClass().getName()+","+ + " Factory: "+ getContext().getGLDrawable().getFactory().getClass().getName()+")"; + } + diff --git a/make/gl-impl-CustomJavaCode-gl2.java b/make/gl-impl-CustomJavaCode-gl2.java new file mode 100644 index 000000000..6a075a33c --- /dev/null +++ b/make/gl-impl-CustomJavaCode-gl2.java @@ -0,0 +1,338 @@ +// Tracks glBegin/glEnd calls to determine whether it is legal to +// query Vertex Buffer Object state +private boolean inBeginEndPair; + +/* FIXME: refactor dependence on Java 2D / JOGL bridge + +// Tracks creation and destruction of server-side OpenGL objects when +// the Java2D/OpenGL pipeline is enabled and it is using frame buffer +// objects (FBOs) to do its rendering +private GLObjectTracker tracker; + +public void setObjectTracker(GLObjectTracker tracker) { + this.tracker = tracker; +} + +*/ + +public GL2Impl(GLContextImpl context) { + this._context = context; + this.bufferSizeTracker = context.getBufferSizeTracker(); +} + +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. + */ +public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) { + return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3); +} + +public void setSwapInterval(int interval) { + _context.setSwapInterval(interval); +} + +public Object getPlatformGLExtensions() { + return _context.getPlatformGLExtensions(); +} + +// +// Helpers for ensuring the correct amount of texture data +// + +/** Returns the number of bytes required to fill in the appropriate + texture. This is regrettably a lower bound as in certain + circumstances OpenGL state such as unpack alignment can cause more + data to be required. However this should be close enough that it + should catch most crashes. The logic in this routine is based on + code in the SGI OpenGL sample implementation. */ + +private int imageSizeInBytes(int format, int type, int w, int h, int d) { + int elements = 0; + int esize = 0; + + if (w < 0) return 0; + if (h < 0) return 0; + if (d < 0) return 0; + switch (format) { + case GL_COLOR_INDEX: + case GL_STENCIL_INDEX: + elements = 1; + break; + case GL_RED: + case GL_GREEN: + case GL_BLUE: + case GL_ALPHA: + case GL_LUMINANCE: + case GL_DEPTH_COMPONENT: + elements = 1; + break; + case GL_LUMINANCE_ALPHA: + elements = 2; + break; + case GL_RGB: + case GL_BGR: + elements = 3; + break; + case GL_RGBA: + case GL_BGRA: + case GL_ABGR_EXT: + elements = 4; + break; + case GL_HILO_NV: + elements = 2; + break; + default: + return 0; + } + switch (type) { + case GL_BITMAP: + if (format == GL_COLOR_INDEX) { + return (d * (h * ((w+7)/8))); + } else { + return 0; + } + case GL_BYTE: + case GL_UNSIGNED_BYTE: + esize = 1; + break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + esize = 1; + elements = 1; + break; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + esize = 2; + break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + esize = 2; + elements = 1; + break; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + esize = 4; + break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + esize = 4; + elements = 1; + break; + default: + return 0; + } + return (elements * esize * w * h * d); +} + +private boolean bufferObjectExtensionsInitialized = false; +private boolean haveARBPixelBufferObject; +private boolean haveEXTPixelBufferObject; +private boolean haveGL15; +private boolean haveGL21; +private boolean haveARBVertexBufferObject; +private GLBufferStateTracker bufferStateTracker = new GLBufferStateTracker(); +private GLBufferSizeTracker bufferSizeTracker; + +private void initBufferObjectExtensionChecks() { + if (bufferObjectExtensionsInitialized) + return; + bufferObjectExtensionsInitialized = true; + haveARBPixelBufferObject = isExtensionAvailable("GL_ARB_pixel_buffer_object"); + haveEXTPixelBufferObject = isExtensionAvailable("GL_EXT_pixel_buffer_object"); + haveGL15 = isExtensionAvailable("GL_VERSION_1_5"); + haveGL21 = isExtensionAvailable("GL_VERSION_2_1"); + haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object"); +} + +private void checkBufferObject(boolean extension1, + boolean extension2, + boolean extension3, + boolean enabled, + int state, + String kind) { + if (inBeginEndPair) { + throw new GLException("May not call this between glBegin and glEnd"); + } + boolean avail = (extension1 || extension2 || extension3); + if (!avail) { + if (!enabled) + return; + throw new GLException("Required extensions not available to call this function"); + } + int buffer = bufferStateTracker.getBoundBufferObject(state, this); + if (enabled) { + if (buffer == 0) { + throw new GLException(kind + " must be enabled to call this method"); + } + } else { + if (buffer != 0) { + throw new GLException(kind + " must be disabled to call this method"); + } + } +} + +private void checkUnpackPBODisabled() { + initBufferObjectExtensionChecks(); + checkBufferObject(haveARBPixelBufferObject, + haveEXTPixelBufferObject, + haveGL21, + false, + GL2.GL_PIXEL_UNPACK_BUFFER, + "unpack pixel_buffer_object"); +} + +private void checkUnpackPBOEnabled() { + initBufferObjectExtensionChecks(); + checkBufferObject(haveARBPixelBufferObject, + haveEXTPixelBufferObject, + haveGL21, + true, + GL2.GL_PIXEL_UNPACK_BUFFER, + "unpack pixel_buffer_object"); +} + +private void checkPackPBODisabled() { + initBufferObjectExtensionChecks(); + checkBufferObject(haveARBPixelBufferObject, + haveEXTPixelBufferObject, + haveGL21, + false, + GL2.GL_PIXEL_PACK_BUFFER, + "pack pixel_buffer_object"); +} + +private void checkPackPBOEnabled() { + initBufferObjectExtensionChecks(); + checkBufferObject(haveARBPixelBufferObject, + haveEXTPixelBufferObject, + haveGL21, + true, + GL2.GL_PIXEL_PACK_BUFFER, + "pack pixel_buffer_object"); +} + + +private void checkArrayVBODisabled() { + initBufferObjectExtensionChecks(); + checkBufferObject(haveGL15, + haveARBVertexBufferObject, + false, + false, + GL2.GL_ARRAY_BUFFER, + "array vertex_buffer_object"); +} + +private void checkArrayVBOEnabled() { + initBufferObjectExtensionChecks(); + checkBufferObject(haveGL15, + haveARBVertexBufferObject, + false, + true, + GL2.GL_ARRAY_BUFFER, + "array vertex_buffer_object"); +} + +private void checkElementVBODisabled() { + initBufferObjectExtensionChecks(); + checkBufferObject(haveGL15, + haveARBVertexBufferObject, + false, + false, + GL2.GL_ELEMENT_ARRAY_BUFFER, + "element vertex_buffer_object"); +} + +private void checkElementVBOEnabled() { + initBufferObjectExtensionChecks(); + checkBufferObject(haveGL15, + haveARBVertexBufferObject, + false, + true, + GL2.GL_ELEMENT_ARRAY_BUFFER, + "element vertex_buffer_object"); +} + +// Attempt to return the same ByteBuffer object from glMapBuffer if +// the vertex buffer object's base address and size haven't changed +private static class ARBVBOKey { + private long addr; + private int capacity; + + ARBVBOKey(long addr, int capacity) { + this.addr = addr; + this.capacity = capacity; + } + + public int hashCode() { + return (int) addr; + } + + public boolean equals(Object o) { + if ((o == null) || (!(o instanceof ARBVBOKey))) { + return false; + } + + ARBVBOKey other = (ARBVBOKey) o; + return ((addr == other.addr) && (capacity == other.capacity)); + } +} + +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_ = ((GL2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer; + if (__addr_ == 0) { + throw new GLException("Method \"glMapBuffer\" not available"); + } + int sz = bufferSizeTracker.getBufferSize(bufferStateTracker, + target, + this); + long addr; + addr = dispatch_glMapBuffer(target, access, __addr_); + if (addr == 0 || sz == 0) { + return null; + } + ARBVBOKey key = new ARBVBOKey(addr, sz); + ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key); + if (_res == null) { + _res = InternalBufferUtils.newDirectByteBuffer(addr, sz); + _res.order(ByteOrder.nativeOrder()); + arbVBOCache.put(key, _res); + } + _res.position(0); + return _res; +} + +/** Encapsulates function pointer for OpenGL function <br>: <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code> */ +native private long dispatch_glMapBuffer(int target, int access, long glProcAddress); + diff --git a/make/gl-impl-CustomJavaCode-gles1.java b/make/gl-impl-CustomJavaCode-gles1.java index 7f10c661b..b5cd70c6c 100755 --- a/make/gl-impl-CustomJavaCode-gles1.java +++ b/make/gl-impl-CustomJavaCode-gles1.java @@ -2,7 +2,7 @@ // query Vertex Buffer Object state private boolean inBeginEndPair; -public GLImpl(GLContextImpl context) { +public GLES1Impl(GLContextImpl context) { this._context = context; this.bufferSizeTracker = context.getBufferSizeTracker(); } @@ -207,10 +207,6 @@ private void checkElementVBOEnabled() { */ } -// FIXME: bind this up to glMapBufferOES - -/* - // Attempt to return the same ByteBuffer object from glMapBufferARB if // the vertex buffer object's base address and size haven't changed private static class ARBVBOKey { @@ -236,14 +232,11 @@ private static class ARBVBOKey { } } -*/ - -//private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap(); +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_ = _context.getGLProcAddressTable()._addressof_glMapBuffer; + final long __addr_ = ((GLES1ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBufferOES; if (__addr_ == 0) { throw new GLException("Method \"glMapBuffer\" not available"); } @@ -265,37 +258,6 @@ public java.nio.ByteBuffer glMapBuffer(int target, int access) { _res.position(0); return _res; } -*/ - -/** Entry point to C language function: <br> <code> LPVOID glMapBufferARB(GLenum target, GLenum access); </code> */ -/* -public java.nio.ByteBuffer glMapBufferARB(int target, int access) { - final long __addr_ = _context.getGLProcAddressTable()._addressof_glMapBufferARB; - if (__addr_ == 0) { - throw new GLException("Method \"glMapBufferARB\" not available"); - } - int sz = bufferSizeTracker.getBufferSize(bufferStateTracker, - target, - this); - long addr; - addr = dispatch_glMapBufferARB(target, access, __addr_); - if (addr == 0 || sz == 0) { - return null; - } - ARBVBOKey key = new ARBVBOKey(addr, sz); - java.nio.ByteBuffer _res = (java.nio.ByteBuffer) arbVBOCache.get(key); - if (_res == null) { - _res = InternalBufferUtils.newDirectByteBuffer(addr, sz); - _res.order(java.nio.ByteOrder.nativeOrder()); - arbVBOCache.put(key, _res); - } - _res.position(0); - return _res; -} -*/ /** Encapsulates function pointer for OpenGL function <br>: <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code> */ -//native private long dispatch_glMapBuffer(int target, int access, long glProcAddress); - -/** Encapsulates function pointer for OpenGL function <br>: <code> LPVOID glMapBufferARB(GLenum target, GLenum access); </code> */ -//native private long dispatch_glMapBufferARB(int target, int access, long glProcAddress); +native private long dispatch_glMapBuffer(int target, int access, long glProcAddress); diff --git a/make/gl-impl-CustomJavaCode-gles2.java b/make/gl-impl-CustomJavaCode-gles2.java index 99b2b9267..87d5e0cfc 100755 --- a/make/gl-impl-CustomJavaCode-gles2.java +++ b/make/gl-impl-CustomJavaCode-gles2.java @@ -2,7 +2,7 @@ // query Vertex Buffer Object state private boolean inBeginEndPair; -public GLImpl(GLContextImpl context) { +public GLES2Impl(GLContextImpl context) { this._context = context; this.bufferSizeTracker = context.getBufferSizeTracker(); } @@ -196,10 +196,6 @@ private void checkElementVBOEnabled() { "element vertex_buffer_object"); } -// FIXME: bind this up to glMapBufferOES - -/* - // Attempt to return the same ByteBuffer object from glMapBufferARB if // the vertex buffer object's base address and size haven't changed private static class ARBVBOKey { @@ -225,14 +221,11 @@ private static class ARBVBOKey { } } -*/ - -//private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap(); +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_ = _context.getGLProcAddressTable()._addressof_glMapBuffer; + final long __addr_ = ((GLES2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBufferOES; if (__addr_ == 0) { throw new GLException("Method \"glMapBuffer\" not available"); } @@ -254,37 +247,7 @@ public java.nio.ByteBuffer glMapBuffer(int target, int access) { _res.position(0); return _res; } -*/ - -/** Entry point to C language function: <br> <code> LPVOID glMapBufferARB(GLenum target, GLenum access); </code> */ -/* -public java.nio.ByteBuffer glMapBufferARB(int target, int access) { - final long __addr_ = _context.getGLProcAddressTable()._addressof_glMapBufferARB; - if (__addr_ == 0) { - throw new GLException("Method \"glMapBufferARB\" not available"); - } - int sz = bufferSizeTracker.getBufferSize(bufferStateTracker, - target, - this); - long addr; - addr = dispatch_glMapBufferARB(target, access, __addr_); - if (addr == 0 || sz == 0) { - return null; - } - ARBVBOKey key = new ARBVBOKey(addr, sz); - java.nio.ByteBuffer _res = (java.nio.ByteBuffer) arbVBOCache.get(key); - if (_res == null) { - _res = InternalBufferUtils.newDirectByteBuffer(addr, sz); - _res.order(java.nio.ByteOrder.nativeOrder()); - arbVBOCache.put(key, _res); - } - _res.position(0); - return _res; -} -*/ /** Encapsulates function pointer for OpenGL function <br>: <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code> */ -//native private long dispatch_glMapBuffer(int target, int access, long glProcAddress); +native private long dispatch_glMapBuffer(int target, int access, long glProcAddress); -/** Encapsulates function pointer for OpenGL function <br>: <code> LPVOID glMapBufferARB(GLenum target, GLenum access); </code> */ -//native private long dispatch_glMapBufferARB(int target, int access, long glProcAddress); diff --git a/make/glu-CustomJavaCode-gl2.java b/make/glu-CustomJavaCode-gl2.java new file mode 100644 index 000000000..8087d45c9 --- /dev/null +++ b/make/glu-CustomJavaCode-gl2.java @@ -0,0 +1,1401 @@ +private static boolean useJavaMipmapCode = true; + +static { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + String val = System.getProperty("jogl.glu.nojava"); + if (val != null && !val.toLowerCase().equals("false")) { + useJavaMipmapCode = false; + } + return null; + } + }); +} + +/** + * Instantiates a new OpenGL Utility Library object. A GLU object may + * be instantiated at any point in the application and is not + * inherently tied to any particular OpenGL context; however, the GLU + * object may only be used when an OpenGL context is current on the + * current thread. Attempts to call most of the methods in the GLU + * library when no OpenGL context is current will cause an exception + * to be thrown. + * + * <P> + * + * The returned GLU object is not guaranteed to be thread-safe and + * should only be used from one thread at a time. Multiple GLU objects + * may be instantiated to be used from different threads + * simultaneously. + */ + +public GLUgl2() +{ + this.project = new ProjectDouble(); +} + +//---------------------------------------------------------------------- +// Utility routines +// + +public static final GL2 getCurrentGL2() throws GLException { + GLContext curContext = GLContext.getCurrent(); + if (curContext == null) { + throw new GLException("No OpenGL context current on this thread"); + } + return curContext.getGL().getGL2(); +} + +public final String gluErrorString(int errorCode) { + return Error.gluErrorString(errorCode); +} + +/* extName is an extension name. + * extString is a string of extensions separated by blank(s). There may or + * may not be leading or trailing blank(s) in extString. + * This works in cases of extensions being prefixes of another like + * GL_EXT_texture and GL_EXT_texture3D. + * Returns true if extName is found otherwise it returns false. + */ +public final boolean gluCheckExtension(java.lang.String extName, java.lang.String extString) { + return Registry.gluCheckExtension(extName, extString); +} + +public final String gluGetString(int name) { + return Registry.gluGetString(name); +} + +/** + * Returns true if the specified GLU core- or extension-function can be + * successfully used through this GLU instance. By "successfully" we mean + * that the function is both <i>callable</i> on the machine running the + * program and <i>available</i> on the current display.<P> + * + * A GLU function is <i>callable</i> if it is a GLU core- or extension-function + * that is supported by the underlying GLU implementation. The function is + * <i>available</i> if the OpenGL implementation on the display meets the + * requirements of the GLU function being called (because GLU functions utilize + * OpenGL functions). <P> + * + * Whether or not a GLU function is <i>callable</i> is determined as follows: + * <ul> + * <li>If the function is a GLU core function (i.e., not an + * extension), <code>gluGetString(GLU_VERSION)</code> is used to determine the + * version number of the underlying GLU implementation on the host. + * then the function name is cross-referenced with that specification to + * see if it is part of that version's specification. + * + * <li> If the function is a GLU extension, the function name is + * cross-referenced with the list returned by + * <code>gluGetString(GLU_EXTENSIONS)</code> to see if the function is one of + * the extensions that is supported by the underlying GLU implementation. + * </ul> + * + * Whether or not a GLU function is <i>available</i> is determined as follows: + * <ul> + * <li>If the function is a GLU core function then the function is first + * cross-referenced with the GLU specifications to find the minimum GLU + * version required to <i>call</i> that GLU function. Then the following table + * is consulted to determine the minimum GL version required for that version + * of GLU: + * <ul> + * <li> GLU 1.0 requires OpenGL 1.0 + * <li> GLU 1.1 requires OpenGL 1.0 + * <li> GLU 1.2 requires OpenGL 1.1 + * <li> GLU 1.3 requires OpenGL 1.2 + * </ul> + * Finally, <code>glGetString(GL_VERSION)</code> is used to determine the + * highest OpenGL version that both host and display support, and from that it + * is possible to determine if the GL facilities required by the GLU function + * are <i>available</i> on the display. + * + * <li> If the function is a GLU extension, the function name is + * cross-referenced with the list returned by + * <code>gluGetString(GLU_EXTENSIONS)</code> to see if the function is one of + * the extensions that is supported by the underlying GLU implementation. + * </ul> + * + * <b>NOTE:</b>The availability of a function may change at runtime in + * response to changes in the display environment. For example, when a window + * is dragged from one display to another on a multi-display system, or when + * the properties of the display device are modified (e.g., changing the color + * depth of the display). Any application that is concerned with handling + * these situations correctly should confirm availability after a display + * change before calling a questionable OpenGL function. To detect a change in + * the display device, please see {@link + * GLEventListener#displayChanged(GLAutoDrawable,boolean,boolean)}. + * + * @param gluFunctionName the name of the OpenGL function (e.g., use + * "gluNurbsCallbackDataEXT" to check if the <code> + * gluNurbsCallbackDataEXT(GLUnurbs, GLvoid)</code> extension is available). + */ +public final boolean isFunctionAvailable(String gluFunctionName) +{ + if (useJavaMipmapCode) { + // All GLU functions are available in Java port + return true; + } + return (gluProcAddressTable.getAddressFor(gluFunctionName) != 0); +} + +//---------------------------------------------------------------------- +// Tessellation routines +// + +/***************************************************************************** + * <b>gluNewTess</b> creates and returns a new tessellation object. This + * object must be referred to when calling tesselation methods. A return + * value of null means that there was not enough memeory to allocate the + * object. + * + * @return A new tessellation object. + * + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluDeleteTess gluDeleteTess + * @see #gluTessCallback gluTessCallback + ****************************************************************************/ +public final GLUtessellator gluNewTess() { + return GLUtessellatorImpl.gluNewTess(); +} + +/***************************************************************************** + * <b>gluDeleteTess</b> destroys the indicated tessellation object (which was + * created with {@link #gluNewTess gluNewTess}). + * + * @param tessellator + * Specifies the tessellation object to destroy. + * + * @see #gluBeginPolygon gluBeginPolygon + * @see #gluNewTess gluNewTess + * @see #gluTessCallback gluTessCallback + ****************************************************************************/ +public final void gluDeleteTess(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluDeleteTess(); +} + +/***************************************************************************** + * <b>gluTessProperty</b> is used to control properites stored in a + * tessellation object. These properties affect the way that the polygons are + * interpreted and rendered. The legal value for <i>which</i> are as + * follows:<P> + * + * <b>GLU_TESS_WINDING_RULE</b> + * <UL> + * Determines which parts of the polygon are on the "interior". + * <em>value</em> may be set to one of + * <BR><b>GLU_TESS_WINDING_ODD</b>, + * <BR><b>GLU_TESS_WINDING_NONZERO</b>, + * <BR><b>GLU_TESS_WINDING_POSITIVE</b>, or + * <BR><b>GLU_TESS_WINDING_NEGATIVE</b>, or + * <BR><b>GLU_TESS_WINDING_ABS_GEQ_TWO</b>.<P> + * + * To understand how the winding rule works, consider that the input + * contours partition the plane into regions. The winding rule determines + * which of these regions are inside the polygon.<P> + * + * For a single contour C, the winding number of a point x is simply the + * signed number of revolutions we make around x as we travel once around C + * (where CCW is positive). When there are several contours, the individual + * winding numbers are summed. This procedure associates a signed integer + * value with each point x in the plane. Note that the winding number is + * the same for all points in a single region.<P> + * + * The winding rule classifies a region as "inside" if its winding number + * belongs to the chosen category (odd, nonzero, positive, negative, or + * absolute value of at least two). The previous GLU tessellator (prior to + * GLU 1.2) used the "odd" rule. The "nonzero" rule is another common way + * to define the interior. The other three rules are useful for polygon CSG + * operations. + * </UL> + * <BR><b>GLU_TESS_BOUNDARY_ONLY</b> + * <UL> + * Is a boolean value ("value" should be set to GL_TRUE or GL_FALSE). When + * set to GL_TRUE, a set of closed contours separating the polygon interior + * and exterior are returned instead of a tessellation. Exterior contours + * are oriented CCW with respect to the normal; interior contours are + * oriented CW. The <b>GLU_TESS_BEGIN</b> and <b>GLU_TESS_BEGIN_DATA</b> + * callbacks use the type GL_LINE_LOOP for each contour. + * </UL> + * <BR><b>GLU_TESS_TOLERANCE</b> + * <UL> + * Specifies a tolerance for merging features to reduce the size of the + * output. For example, two vertices that are very close to each other + * might be replaced by a single vertex. The tolerance is multiplied by the + * largest coordinate magnitude of any input vertex; this specifies the + * maximum distance that any feature can move as the result of a single + * merge operation. If a single feature takes part in several merge + * operations, the toal distance moved could be larger.<P> + * + * Feature merging is completely optional; the tolerance is only a hint. + * The implementation is free to merge in some cases and not in others, or + * to never merge features at all. The initial tolerance is 0.<P> + * + * The current implementation merges vertices only if they are exactly + * coincident, regardless of the current tolerance. A vertex is spliced + * into an edge only if the implementation is unable to distinguish which + * side of the edge the vertex lies on. Two edges are merged only when both + * endpoints are identical. + * </UL> + * + * @param tessellator + * Specifies the tessellation object created with + * {@link #gluNewTess gluNewTess} + * @param which + * Specifies the property to be set. Valid values are + * <b>GLU_TESS_WINDING_RULE</b>, <b>GLU_TESS_BOUNDARDY_ONLY</b>, + * <b>GLU_TESS_TOLERANCE</b>. + * @param value + * Specifices the value of the indicated property. + * + * @see #gluGetTessProperty gluGetTessProperty + * @see #gluNewTess gluNewTess + ****************************************************************************/ +public final void gluTessProperty(GLUtessellator tessellator, int which, double value) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessProperty(which, value); +} + +/***************************************************************************** + * <b>gluGetTessProperty</b> retrieves properties stored in a tessellation + * object. These properties affect the way that tessellation objects are + * interpreted and rendered. See the + * {@link #gluTessProperty gluTessProperty} reference + * page for information about the properties and what they do. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param which + * Specifies the property whose value is to be fetched. Valid values + * are <b>GLU_TESS_WINDING_RULE</b>, <b>GLU_TESS_BOUNDARY_ONLY</b>, + * and <b>GLU_TESS_TOLERANCES</b>. + * @param value + * Specifices an array into which the value of the named property is + * written. + * + * @see #gluNewTess gluNewTess + * @see #gluTessProperty gluTessProperty + ****************************************************************************/ +public final void gluGetTessProperty(GLUtessellator tessellator, int which, double[] value, int value_offset) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluGetTessProperty(which, value, value_offset); +} + +/***************************************************************************** + * <b>gluTessNormal</b> describes a normal for a polygon that the program is + * defining. All input data will be projected onto a plane perpendicular to + * the one of the three coordinate axes before tessellation and all output + * triangles will be oriented CCW with repsect to the normal (CW orientation + * can be obtained by reversing the sign of the supplied normal). For + * example, if you know that all polygons lie in the x-y plane, call + * <b>gluTessNormal</b>(tess, 0.0, 0.0, 0.0) before rendering any polygons.<P> + * + * If the supplied normal is (0.0, 0.0, 0.0)(the initial value), the normal + * is determined as follows. The direction of the normal, up to its sign, is + * found by fitting a plane to the vertices, without regard to how the + * vertices are connected. It is expected that the input data lies + * approximately in the plane; otherwise, projection perpendicular to one of + * the three coordinate axes may substantially change the geometry. The sign + * of the normal is chosen so that the sum of the signed areas of all input + * contours is nonnegative (where a CCW contour has positive area).<P> + * + * The supplied normal persists until it is changed by another call to + * <b>gluTessNormal</b>. + * + * @param tessellator + * Specifies the tessellation object (created by + * {@link #gluNewTess gluNewTess}). + * @param x + * Specifies the first component of the normal. + * @param y + * Specifies the second component of the normal. + * @param z + * Specifies the third component of the normal. + * + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessNormal(GLUtessellator tessellator, double x, double y, double z) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessNormal(x, y, z); +} + +/***************************************************************************** + * <b>gluTessCallback</b> is used to indicate a callback to be used by a + * tessellation object. If the specified callback is already defined, then it + * is replaced. If <i>aCallback</i> is null, then the existing callback + * becomes undefined.<P> + * + * These callbacks are used by the tessellation object to describe how a + * polygon specified by the user is broken into triangles. Note that there are + * two versions of each callback: one with user-specified polygon data and one + * without. If both versions of a particular callback are specified, then the + * callback with user-specified polygon data will be used. Note that the + * polygonData parameter used by some of the methods is a copy of the + * reference that was specified when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The legal callbacks are as follows:<P> + * + * <b>GLU_TESS_BEGIN</b> + * <UL> + * The begin callback is invoked like {@link javax.media.opengl.GL#glBegin + * glBegin} to indicate the start of a (triangle) primitive. The method + * takes a single argument of type int. If the + * <b>GLU_TESS_BOUNDARY_ONLY</b> property is set to <b>GL_FALSE</b>, then + * the argument is set to either <b>GL_TRIANGLE_FAN</b>, + * <b>GL_TRIANGLE_STRIP</b>, or <b>GL_TRIANGLES</b>. If the + * <b>GLU_TESS_BOUNDARY_ONLY</b> property is set to <b>GL_TRUE</b>, then the + * argument will be set to <b>GL_LINE_LOOP</b>. The method prototype for + * this callback is: + * </UL> + * + * <PRE> + * void begin(int type);</PRE><P> + * + * <b>GLU_TESS_BEGIN_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_BEGIN</b> callback except + * that it takes an additional reference argument. This reference is + * identical to the opaque reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void beginData(int type, Object polygonData);</PRE> + * + * <b>GLU_TESS_EDGE_FLAG</b> + * <UL> + * The edge flag callback is similar to + * {@link javax.media.opengl.GL#glEdgeFlag glEdgeFlag}. The method takes + * a single boolean boundaryEdge that indicates which edges lie on the + * polygon boundary. If the boundaryEdge is <b>GL_TRUE</b>, then each vertex + * that follows begins an edge that lies on the polygon boundary, that is, + * an edge that separates an interior region from an exterior one. If the + * boundaryEdge is <b>GL_FALSE</b>, then each vertex that follows begins an + * edge that lies in the polygon interior. The edge flag callback (if + * defined) is invoked before the first vertex callback.<P> + * + * Since triangle fans and triangle strips do not support edge flags, the + * begin callback is not called with <b>GL_TRIANGLE_FAN</b> or + * <b>GL_TRIANGLE_STRIP</b> if a non-null edge flag callback is provided. + * (If the callback is initialized to null, there is no impact on + * performance). Instead, the fans and strips are converted to independent + * triangles. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void edgeFlag(boolean boundaryEdge);</PRE> + * + * <b>GLU_TESS_EDGE_FLAG_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_EDGE_FLAG</b> callback except that it takes + * an additional reference argument. This reference is identical to the + * opaque reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void edgeFlagData(boolean boundaryEdge, Object polygonData);</PRE> + * + * <b>GLU_TESS_VERTEX</b> + * <UL> + * The vertex callback is invoked between the begin and end callbacks. It is + * similar to {@link javax.media.opengl.GL#glVertex3f glVertex3f}, and it + * defines the vertices of the triangles created by the tessellation + * process. The method takes a reference as its only argument. This + * reference is identical to the opaque reference provided by the user when + * the vertex was described (see + * {@link #gluTessVertex gluTessVertex}). The method + * prototype for this callback is: + * </UL> + * + * <PRE> + * void vertex(Object vertexData);</PRE> + * + * <b>GLU_TESS_VERTEX_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_VERTEX</b> callback except that it takes an + * additional reference argument. This reference is identical to the opaque + * reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void vertexData(Object vertexData, Object polygonData);</PRE> + * + * <b>GLU_TESS_END</b> + * <UL> + * The end callback serves the same purpose as + * {@link javax.media.opengl.GL#glEnd glEnd}. It indicates the end of a + * primitive and it takes no arguments. The method prototype for this + * callback is: + * </UL> + * + * <PRE> + * void end();</PRE> + * + * <b>GLU_TESS_END_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_END</b> callback except that it takes an + * additional reference argument. This reference is identical to the opaque + * reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void endData(Object polygonData);</PRE> + * + * <b>GLU_TESS_COMBINE</b> + * <UL> + * The combine callback is called to create a new vertex when the + * tessellation detects an intersection, or wishes to merge features. The + * method takes four arguments: an array of three elements each of type + * double, an array of four references, an array of four elements each of + * type float, and a reference to a reference. The prototype is: + * </UL> + * + * <PRE> + * void combine(double[] coords, Object[] data, + * float[] weight, Object[] outData);</PRE> + * + * <UL> + * The vertex is defined as a linear combination of up to four existing + * vertices, stored in <i>data</i>. The coefficients of the linear + * combination are given by <i>weight</i>; these weights always add up to 1. + * All vertex pointers are valid even when some of the weights are 0. + * <i>coords</i> gives the location of the new vertex.<P> + * + * The user must allocate another vertex, interpolate parameters using + * <i>data</i> and <i>weight</i>, and return the new vertex pointer + * in <i>outData</i>. This handle is supplied during rendering callbacks. + * The user is responsible for freeing the memory some time after + * {@link #gluTessEndPolygon gluTessEndPolygon} is + * called.<P> + * + * For example, if the polygon lies in an arbitrary plane in 3-space, and a + * color is associated with each vertex, the <b>GLU_TESS_COMBINE</b> + * callback might look like this: + * </UL> + * <PRE> + * void myCombine(double[] coords, Object[] data, + * float[] weight, Object[] outData) + * { + * MyVertex newVertex = new MyVertex(); + * + * newVertex.x = coords[0]; + * newVertex.y = coords[1]; + * newVertex.z = coords[2]; + * newVertex.r = weight[0]*data[0].r + + * weight[1]*data[1].r + + * weight[2]*data[2].r + + * weight[3]*data[3].r; + * newVertex.g = weight[0]*data[0].g + + * weight[1]*data[1].g + + * weight[2]*data[2].g + + * weight[3]*data[3].g; + * newVertex.b = weight[0]*data[0].b + + * weight[1]*data[1].b + + * weight[2]*data[2].b + + * weight[3]*data[3].b; + * newVertex.a = weight[0]*data[0].a + + * weight[1]*data[1].a + + * weight[2]*data[2].a + + * weight[3]*data[3].a; + * outData = newVertex; + * }</PRE> + * + * <UL> + * If the tessellation detects an intersection, then the + * <b>GLU_TESS_COMBINE</b> or <b>GLU_TESS_COMBINE_DATA</b> callback (see + * below) must be defined, and it must write a non-null reference into + * <i>outData</i>. Otherwise the <b>GLU_TESS_NEED_COMBINE_CALLBACK</b> error + * occurs, and no output is generated. + * </UL> + * + * <b>GLU_TESS_COMBINE_DATA</b> + * <UL> + * The same as the <b>GLU_TESS_COMBINE</b> callback except that it takes an + * additional reference argument. This reference is identical to the opaque + * reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void combineData(double[] coords, Object[] data, + float[] weight, Object[] outData, + Object polygonData);</PRE> + * + * <b>GLU_TESS_ERROR</b> + * <UL> + * The error callback is called when an error is encountered. The one + * argument is of type int; it indicates the specific error that occurred + * and will be set to one of <b>GLU_TESS_MISSING_BEGIN_POLYGON</b>, + * <b>GLU_TESS_MISSING_END_POLYGON</b>, + * <b>GLU_TESS_MISSING_BEGIN_CONTOUR</b>, + * <b>GLU_TESS_MISSING_END_CONTOUR</b>, <b>GLU_TESS_COORD_TOO_LARGE</b>, + * <b>GLU_TESS_NEED_COMBINE_CALLBACK</b> or <b>GLU_OUT_OF_MEMORY</b>. + * Character strings describing these errors can be retrieved with the + * {@link #gluErrorString gluErrorString} call. The + * method prototype for this callback is: + * </UL> + * + * <PRE> + * void error(int errnum);</PRE> + * + * <UL> + * The GLU library will recover from the first four errors by inserting the + * missing call(s). <b>GLU_TESS_COORD_TOO_LARGE</b> indicates that some + * vertex coordinate exceeded the predefined constant + * <b>GLU_TESS_MAX_COORD</b> in absolute value, and that the value has been + * clamped. (Coordinate values must be small enough so that two can be + * multiplied together without overflow.) + * <b>GLU_TESS_NEED_COMBINE_CALLBACK</b> indicates that the tessellation + * detected an intersection between two edges in the input data, and the + * <b>GLU_TESS_COMBINE</b> or <b>GLU_TESS_COMBINE_DATA</b> callback was not + * provided. No output is generated. <b>GLU_OUT_OF_MEMORY</b> indicates that + * there is not enough memory so no output is generated. + * </UL> + * + * <b>GLU_TESS_ERROR_DATA</b> + * <UL> + * The same as the GLU_TESS_ERROR callback except that it takes an + * additional reference argument. This reference is identical to the opaque + * reference provided when + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * was called. The method prototype for this callback is: + * </UL> + * + * <PRE> + * void errorData(int errnum, Object polygonData);</PRE> + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param which + * Specifies the callback being defined. The following values are + * valid: <b>GLU_TESS_BEGIN</b>, <b>GLU_TESS_BEGIN_DATA</b>, + * <b>GLU_TESS_EDGE_FLAG</b>, <b>GLU_TESS_EDGE_FLAG_DATA</b>, + * <b>GLU_TESS_VERTEX</b>, <b>GLU_TESS_VERTEX_DATA</b>, + * <b>GLU_TESS_END</b>, <b>GLU_TESS_END_DATA</b>, + * <b>GLU_TESS_COMBINE</b>, <b>GLU_TESS_COMBINE_DATA</b>, + * <b>GLU_TESS_ERROR</b>, and <b>GLU_TESS_ERROR_DATA</b>. + * @param aCallback + * Specifies the callback object to be called. + * + * @see javax.media.opengl.GL#glBegin glBegin + * @see javax.media.opengl.GL#glEdgeFlag glEdgeFlag + * @see javax.media.opengl.GL#glVertex3f glVertex3f + * @see #gluNewTess gluNewTess + * @see #gluErrorString gluErrorString + * @see #gluTessVertex gluTessVertex + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + ****************************************************************************/ +public final void gluTessCallback(GLUtessellator tessellator, int which, GLUtessellatorCallback aCallback) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessCallback(which, aCallback); +} + +/***************************************************************************** + * <b>gluTessVertex</b> describes a vertex on a polygon that the program + * defines. Successive <b>gluTessVertex</b> calls describe a closed contour. + * For example, to describe a quadrilateral <b>gluTessVertex</b> should be + * called four times. <b>gluTessVertex</b> can only be called between + * {@link #gluTessBeginContour gluTessBeginContour} and + * {@link #gluTessBeginContour gluTessEndContour}.<P> + * + * <b>data</b> normally references to a structure containing the vertex + * location, as well as other per-vertex attributes such as color and normal. + * This reference is passed back to the user through the + * <b>GLU_TESS_VERTEX</b> or <b>GLU_TESS_VERTEX_DATA</b> callback after + * tessellation (see the {@link #gluTessCallback + * gluTessCallback} reference page). + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param coords + * Specifies the coordinates of the vertex. + * @param data + * Specifies an opaque reference passed back to the program with the + * vertex callback (as specified by + * {@link #gluTessCallback gluTessCallback}). + * + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluNewTess gluNewTess + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessVertex(GLUtessellator tessellator, double[] coords, int coords_offset, Object data) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessVertex(coords, coords_offset, data); +} + +/***************************************************************************** + * <b>gluTessBeginPolygon</b> and + * {@link #gluTessEndPolygon gluTessEndPolygon} delimit + * the definition of a convex, concave or self-intersecting polygon. Within + * each <b>gluTessBeginPolygon</b>/ + * {@link #gluTessEndPolygon gluTessEndPolygon} pair, + * there must be one or more calls to + * {@link #gluTessBeginContour gluTessBeginContour}/ + * {@link #gluTessEndContour gluTessEndContour}. Within + * each contour, there are zero or more calls to + * {@link #gluTessVertex gluTessVertex}. The vertices + * specify a closed contour (the last vertex of each contour is automatically + * linked to the first). See the {@link #gluTessVertex + * gluTessVertex}, {@link #gluTessBeginContour + * gluTessBeginContour}, and {@link #gluTessEndContour + * gluTessEndContour} reference pages for more details.<P> + * + * <b>data</b> is a reference to a user-defined data structure. If the + * appropriate callback(s) are specified (see + * {@link #gluTessCallback gluTessCallback}), then this + * reference is returned to the callback method(s). Thus, it is a convenient + * way to store per-polygon information.<P> + * + * Once {@link #gluTessEndPolygon gluTessEndPolygon} is + * called, the polygon is tessellated, and the resulting triangles are + * described through callbacks. See + * {@link #gluTessCallback gluTessCallback} for + * descriptions of the callback methods. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param data + * Specifies a reference to user polygon data. + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessVertex gluTessVertex + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessBeginPolygon(GLUtessellator tessellator, Object data) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessBeginPolygon(data); +} + +/***************************************************************************** + * <b>gluTessBeginContour</b> and + * {@link #gluTessEndContour gluTessEndContour} delimit + * the definition of a polygon contour. Within each + * <b>gluTessBeginContour</b>/ + * {@link #gluTessEndContour gluTessEndContour} pair, + * there can be zero or more calls to + * {@link #gluTessVertex gluTessVertex}. The vertices + * specify a closed contour (the last vertex of each contour is automatically + * linked to the first). See the {@link #gluTessVertex + * gluTessVertex} reference page for more details. <b>gluTessBeginContour</b> + * can only be called between + * {@link #gluTessBeginPolygon gluTessBeginPolygon} and + * {@link #gluTessEndPolygon gluTessEndPolygon}. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessVertex gluTessVertex + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessBeginContour(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessBeginContour(); +} + +/***************************************************************************** + * <b>gluTessEndContour</b> and + * {@link #gluTessBeginContour gluTessBeginContour} + * delimit the definition of a polygon contour. Within each + * {@link #gluTessBeginContour gluTessBeginContour}/ + * <b>gluTessEndContour</b> pair, there can be zero or more calls to + * {@link #gluTessVertex gluTessVertex}. The vertices + * specify a closed contour (the last vertex of each contour is automatically + * linked to the first). See the {@link #gluTessVertex + * gluTessVertex} reference page for more details. + * {@link #gluTessBeginContour gluTessBeginContour} can + * only be called between {@link #gluTessBeginPolygon + * gluTessBeginPolygon} and + * {@link #gluTessEndPolygon gluTessEndPolygon}. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessVertex gluTessVertex + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessEndPolygon gluTessEndPolygon + ****************************************************************************/ +public final void gluTessEndContour(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessEndContour(); +} + +/***************************************************************************** + * <b>gluTessEndPolygon</b> and + * {@link #gluTessBeginPolygon gluTessBeginPolygon} + * delimit the definition of a convex, concave or self-intersecting polygon. + * Within each {@link #gluTessBeginPolygon + * gluTessBeginPolygon}/<b>gluTessEndPolygon</b> pair, there must be one or + * more calls to {@link #gluTessBeginContour + * gluTessBeginContour}/{@link #gluTessEndContour + * gluTessEndContour}. Within each contour, there are zero or more calls to + * {@link #gluTessVertex gluTessVertex}. The vertices + * specify a closed contour (the last vertex of each contour is automatically + * linked to the first). See the {@link #gluTessVertex + * gluTessVertex}, {@link #gluTessBeginContour + * gluTessBeginContour} and {@link #gluTessEndContour + * gluTessEndContour} reference pages for more details.<P> + * + * Once <b>gluTessEndPolygon</b> is called, the polygon is tessellated, and + * the resulting triangles are described through callbacks. See + * {@link #gluTessCallback gluTessCallback} for + * descriptions of the callback functions. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessVertex gluTessVertex + * @see #gluTessCallback gluTessCallback + * @see #gluTessProperty gluTessProperty + * @see #gluTessNormal gluTessNormal + * @see #gluTessBeginPolygon gluTessBeginPolygon + ****************************************************************************/ +public final void gluTessEndPolygon(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluTessEndPolygon(); +} + +/***************************************************************************** + + * <b>gluBeginPolygon</b> and {@link #gluEndPolygon gluEndPolygon} + * delimit the definition of a nonconvex polygon. To define such a + * polygon, first call <b>gluBeginPolygon</b>. Then define the + * contours of the polygon by calling {@link #gluTessVertex + * gluTessVertex} for each vertex and {@link #gluNextContour + * gluNextContour} to start each new contour. Finally, call {@link + * #gluEndPolygon gluEndPolygon} to signal the end of the + * definition. See the {@link #gluTessVertex gluTessVertex} and {@link + * #gluNextContour gluNextContour} reference pages for more + * details.<P> + + * + * Once {@link #gluEndPolygon gluEndPolygon} is called, + * the polygon is tessellated, and the resulting triangles are described + * through callbacks. See {@link #gluTessCallback + * gluTessCallback} for descriptions of the callback methods. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluNextContour gluNextContour + * @see #gluTessCallback gluTessCallback + * @see #gluTessVertex gluTessVertex + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessBeginContour gluTessBeginContour + ****************************************************************************/ +public final void gluBeginPolygon(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluBeginPolygon(); +} + +/***************************************************************************** + * <b>gluNextContour</b> is used to describe polygons with multiple + * contours. After you describe the first contour through a series of + * {@link #gluTessVertex gluTessVertex} calls, a + * <b>gluNextContour</b> call indicates that the previous contour is complete + * and that the next contour is about to begin. Perform another series of + * {@link #gluTessVertex gluTessVertex} calls to + * describe the new contour. Repeat this process until all contours have been + * described.<P> + * + * The type parameter defines what type of contour follows. The following + * values are valid. <P> + * + * <b>GLU_EXTERIOR</b> + * <UL> + * An exterior contour defines an exterior boundary of the polygon. + * </UL> + * <b>GLU_INTERIOR</b> + * <UL> + * An interior contour defines an interior boundary of the polygon (such as + * a hole). + * </UL> + * <b>GLU_UNKNOWN</b> + * <UL> + * An unknown contour is analyzed by the library to determine whether it is + * interior or exterior. + * </UL> + * <b>GLU_CCW, GLU_CW</b> + * <UL> + * The first <b>GLU_CCW</b> or <b>GLU_CW</b> contour defined is considered + * to be exterior. All other contours are considered to be exterior if they + * are oriented in the same direction (clockwise or counterclockwise) as the + * first contour, and interior if they are not. If one contour is of type + * <b>GLU_CCW</b> or <b>GLU_CW</b>, then all contours must be of the same + * type (if they are not, then all <b>GLU_CCW</b> and <b>GLU_CW</b> contours + * will be changed to <b>GLU_UNKNOWN</b>). Note that there is no + * real difference between the <b>GLU_CCW</b> and <b>GLU_CW</b> contour + * types. + * </UL><P> + * + * To define the type of the first contour, you can call <b>gluNextContour</b> + * before describing the first contour. If you do not call + * <b>gluNextContour</b> before the first contour, the first contour is marked + * <b>GLU_EXTERIOR</b>.<P> + * + * <UL> + * <b>Note:</b> The <b>gluNextContour</b> function is obsolete and is + * provided for backward compatibility only. The <b>gluNextContour</b> + * function is mapped to {@link #gluTessEndContour + * gluTessEndContour} followed by + * {@link #gluTessBeginContour gluTessBeginContour}. + * </UL> + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * @param type + * The type of the contour being defined. + * + * @see #gluNewTess gluNewTess + * @see #gluTessBeginContour gluTessBeginContour + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessCallback gluTessCallback + * @see #gluTessEndContour gluTessEndContour + * @see #gluTessVertex gluTessVertex + ****************************************************************************/ +public final void gluNextContour(GLUtessellator tessellator, int type) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluNextContour(type); +} + +/***************************************************************************** + * <b>gluEndPolygon</b> and {@link #gluBeginPolygon + * gluBeginPolygon} delimit the definition of a nonconvex polygon. To define + * such a polygon, first call {@link #gluBeginPolygon + * gluBeginPolygon}. Then define the contours of the polygon by calling + * {@link #gluTessVertex gluTessVertex} for each vertex + * and {@link #gluNextContour gluNextContour} to start + * each new contour. Finally, call <b>gluEndPolygon</b> to signal the end of + * the definition. See the {@link #gluTessVertex + * gluTessVertex} and {@link #gluNextContour + * gluNextContour} reference pages for more details.<P> + * + * Once <b>gluEndPolygon</b> is called, the polygon is tessellated, and the + * resulting triangles are described through callbacks. See + * {@link #gluTessCallback gluTessCallback} for + * descriptions of the callback methods. + * + * @param tessellator + * Specifies the tessellation object (created with + * {@link #gluNewTess gluNewTess}). + * + * @see #gluNewTess gluNewTess + * @see #gluNextContour gluNextContour + * @see #gluTessCallback gluTessCallback + * @see #gluTessVertex gluTessVertex + * @see #gluTessBeginPolygon gluTessBeginPolygon + * @see #gluTessBeginContour gluTessBeginContour + ****************************************************************************/ +public final void gluEndPolygon(GLUtessellator tessellator) { + GLUtessellatorImpl tess = (GLUtessellatorImpl) tessellator; + tess.gluEndPolygon(); +} + +//---------------------------------------------------------------------- +// Quadric functionality +// + +/** Interface to C language function: <br> <code> void gluCylinder(GLUquadric * quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); </code> */ +public final void gluCylinder(GLUquadric quad, double base, double top, double height, int slices, int stacks) { + ((GLUquadricImpl) quad).drawCylinder(getCurrentGL2(), (float) base, (float) top, (float) height, slices, stacks); +} + +/** Interface to C language function: <br> <code> void gluDeleteQuadric(GLUquadric * quad); </code> */ +public final void gluDeleteQuadric(GLUquadric quad) { +} + +/** Interface to C language function: <br> <code> void gluDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); </code> */ +public final void gluDisk(GLUquadric quad, double inner, double outer, int slices, int loops) { + ((GLUquadricImpl) quad).drawDisk(getCurrentGL2(), (float) inner, (float) outer, slices, loops); +} + +/** Interface to C language function: <br> <code> GLUquadric * gluNewQuadric(void); </code> */ +public final GLUquadric gluNewQuadric() { + return new GLUquadricImpl(); +} + +/** Interface to C language function: <br> <code> void gluPartialDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); </code> */ +public final void gluPartialDisk(GLUquadric quad, double inner, double outer, int slices, int loops, double start, double sweep) { + ((GLUquadricImpl) quad).drawPartialDisk(getCurrentGL2(), (float) inner, (float) outer, slices, loops, (float) start, (float) sweep); +} + +/** Interface to C language function: <br> <code> void gluQuadricDrawStyle(GLUquadric * quad, GLenum draw); </code> */ +public final void gluQuadricDrawStyle(GLUquadric quad, int draw) { + ((GLUquadricImpl) quad).setDrawStyle(draw); +} + +/** Interface to C language function: <br> <code> void gluQuadricNormals(GLUquadric * quad, GLenum normal); </code> */ +public final void gluQuadricNormals(GLUquadric quad, int normal) { + ((GLUquadricImpl) quad).setNormals(normal); +} + +/** Interface to C language function: <br> <code> void gluQuadricOrientation(GLUquadric * quad, GLenum orientation); </code> */ +public final void gluQuadricOrientation(GLUquadric quad, int orientation) { + ((GLUquadricImpl) quad).setOrientation(orientation); +} + +/** Interface to C language function: <br> <code> void gluQuadricTexture(GLUquadric * quad, GLboolean texture); </code> */ +public final void gluQuadricTexture(GLUquadric quad, boolean texture) { + ((GLUquadricImpl) quad).setTextureFlag(texture); +} + +/** Interface to C language function: <br> <code> void gluSphere(GLUquadric * quad, GLdouble radius, GLint slices, GLint stacks); </code> */ +public final void gluSphere(GLUquadric quad, double radius, int slices, int stacks) { + ((GLUquadricImpl) quad).drawSphere(getCurrentGL2(), (float) radius, slices, stacks); +} + +//---------------------------------------------------------------------- +// Projection routines +// + +private ProjectDouble project; + +public final void gluOrtho2D(double left, double right, double bottom, double top) { + project.gluOrtho2D(getCurrentGL2(), left, right, bottom, top); +} + +public final void gluPerspective(double fovy, double aspect, double zNear, double zFar) { + project.gluPerspective(getCurrentGL2(), fovy, aspect, zNear, zFar); +} + +public final void gluLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) { + project.gluLookAt(getCurrentGL2(), eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ); +} + +/** Interface to C language function: <br> <code> GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ); </code> + * <P> Accepts the outgoing window coordinates as a single array. + */ +public final boolean gluProject(double objX, double objY, double objZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] winPos, int winPos_offset) { + return project.gluProject(objX, objY, objZ, model, model_offset, proj, proj_offset, view, view_offset, winPos, winPos_offset); +} + +/** Interface to C language function: <br> <code> GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ); </code> + * <P> Accepts the outgoing window coordinates as a single buffer. + */ +public final boolean gluProject(double objX, double objY, double objZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer winPos) { + return project.gluProject(objX, objY, objZ, model, proj, view, winPos); +} + +/** Interface to C language function: <br> <code> GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ); </code> + * <P> Accepts the outgoing object coordinates (a 3-vector) as a single array. + */ +public final boolean gluUnProject(double winX, double winY, double winZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] objPos, int objPos_offset) { + return project.gluUnProject(winX, winY, winZ, model, model_offset, proj, proj_offset, view, view_offset, objPos, objPos_offset); +} + +/** Interface to C language function: <br> <code> GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ); </code> + * <P> Accepts the outgoing object coordinates (a 3-vector) as a single buffer. + */ +public final boolean gluUnProject(double winX, double winY, double winZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer objPos) { + return project.gluUnProject(winX, winY, winZ, model, proj, view, objPos); +} + +/** Interface to C language function: <br> <code> GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW); </code> + * <P> Accepts the outgoing object coordinates (a 4-vector) as a single array. + */ +public final boolean gluUnProject4(double winX, double winY, double winZ, double clipW, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double nearVal, double farVal, double[] objPos, int objPos_offset) { + return project.gluUnProject4(winX, winY, winZ, clipW, model, model_offset, proj, proj_offset, view, view_offset, nearVal, farVal, objPos, objPos_offset); +} + +/** Interface to C language function: <br> <code> GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW); </code> + * <P> Accepts the outgoing object coordinates (a 4-vector) as a single buffer. + */ +public final boolean gluUnProject4(double winX, double winY, double winZ, double clipW, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, double nearVal, double farVal, DoubleBuffer objPos) { + return project.gluUnProject4(winX, winY, winZ, clipW, model, proj, view, nearVal, farVal, objPos); +} + +public final void gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) { + project.gluPickMatrix(getCurrentGL2(), x, y, delX, delY, viewport, viewport_offset); +} + +public final void gluPickMatrix(double x, double y, double delX, double delY, IntBuffer viewport) { + project.gluPickMatrix(getCurrentGL2(), x, y, delX, delY, viewport); +} + +//---------------------------------------------------------------------- +// Mipmap and image scaling functionality + + +private final ByteBuffer copyToByteBuffer(Buffer buf) { + if (buf instanceof ByteBuffer) { + if (buf.position() == 0) { + return (ByteBuffer) buf; + } + return BufferUtil.copyByteBuffer((ByteBuffer) buf); + } else if (buf instanceof ShortBuffer) { + return BufferUtil.copyShortBufferAsByteBuffer((ShortBuffer) buf); + } else if (buf instanceof IntBuffer) { + return BufferUtil.copyIntBufferAsByteBuffer((IntBuffer) buf); + } else if (buf instanceof FloatBuffer) { + return BufferUtil.copyFloatBufferAsByteBuffer((FloatBuffer) buf); + } else { + throw new IllegalArgumentException("Unsupported buffer type (must be one of byte, short, int, or float)"); + } +} + +private final int gluScaleImageJava( int format, int widthin, int heightin, + int typein, Buffer datain, int widthout, int heightout, + int typeout, Buffer dataout ) { + ByteBuffer in = null; + ByteBuffer out = null; + in = copyToByteBuffer(datain); + if( dataout instanceof ByteBuffer ) { + out = (ByteBuffer)dataout; + } else if( dataout instanceof ShortBuffer ) { + out = BufferUtil.newByteBuffer(dataout.remaining() * BufferUtil.SIZEOF_SHORT); + } else if ( dataout instanceof IntBuffer ) { + out = BufferUtil.newByteBuffer(dataout.remaining() * BufferUtil.SIZEOF_INT); + } else if ( dataout instanceof FloatBuffer ) { + out = BufferUtil.newByteBuffer(dataout.remaining() * BufferUtil.SIZEOF_FLOAT); + } else { + throw new IllegalArgumentException("Unsupported destination buffer type (must be byte, short, int, or float)"); + } + int errno = Mipmap.gluScaleImage( getCurrentGL2(), format, widthin, heightin, typein, in, + widthout, heightout, typeout, out ); + if( errno == 0 ) { + out.rewind(); + if (out != dataout) { + if( dataout instanceof ShortBuffer ) { + ((ShortBuffer) dataout).put(out.asShortBuffer()); + } else if( dataout instanceof IntBuffer ) { + ((IntBuffer) dataout).put(out.asIntBuffer()); + } else if( dataout instanceof FloatBuffer ) { + ((FloatBuffer) dataout).put(out.asFloatBuffer()); + } else { + throw new RuntimeException("Should not reach here"); + } + } + } + return( errno ); +} + + +private final int gluBuild1DMipmapLevelsJava( int target, int internalFormat, int width, + int format, int type, int userLevel, int baseLevel, int maxLevel, + Buffer data ) { + ByteBuffer buffer = copyToByteBuffer(data); + return( Mipmap.gluBuild1DMipmapLevels( getCurrentGL2(), target, internalFormat, width, + format, type, userLevel, baseLevel, maxLevel, buffer ) ); +} + + +private final int gluBuild1DMipmapsJava( int target, int internalFormat, int width, + int format, int type, Buffer data ) { + ByteBuffer buffer = copyToByteBuffer(data); + return( Mipmap.gluBuild1DMipmaps( getCurrentGL2(), target, internalFormat, width, format, + type, buffer ) ); +} + + +private final int gluBuild2DMipmapLevelsJava( int target, int internalFormat, int width, + int height, int format, int type, int userLevel, int baseLevel, + int maxLevel, Buffer data ) { + // While the code below handles other data types, it doesn't handle non-ByteBuffers + data = copyToByteBuffer(data); + return( Mipmap.gluBuild2DMipmapLevels( getCurrentGL2(), target, internalFormat, width, + height, format, type, userLevel, baseLevel, maxLevel, data ) ); +} + +private final int gluBuild2DMipmapsJava( int target, int internalFormat, int width, + int height, int format, int type, Buffer data ) { + // While the code below handles other data types, it doesn't handle non-ByteBuffers + data = copyToByteBuffer(data); + return( Mipmap.gluBuild2DMipmaps( getCurrentGL2(), target, internalFormat, width, height, + format, type, data) ); +} + +private final int gluBuild3DMipmapLevelsJava( int target, int internalFormat, int width, + int height, int depth, int format, int type, int userLevel, int baseLevel, + int maxLevel, Buffer data) { + ByteBuffer buffer = copyToByteBuffer(data); + return( Mipmap.gluBuild3DMipmapLevels( getCurrentGL2(), target, internalFormat, width, + height, depth, format, type, userLevel, baseLevel, maxLevel, buffer) ); +} + +private final int gluBuild3DMipmapsJava( int target, int internalFormat, int width, + int height, int depth, int format, int type, Buffer data ) { + ByteBuffer buffer = copyToByteBuffer(data); + return( Mipmap.gluBuild3DMipmaps( getCurrentGL2(), target, internalFormat, width, height, + depth, format, type, buffer ) ); +} + + +//---------------------------------------------------------------------- +// Wrappers for mipmap and image scaling entry points which dispatch either +// to the Java or C versions. +// + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public final int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapLevelsJava(target, internalFormat, width, format, type, level, base, max, data); + } else { + return gluBuild1DMipmapLevelsC(target, internalFormat, width, format, type, level, base, max, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ +public final int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapsJava(target, internalFormat, width, format, type, data); + } else { + return gluBuild1DMipmapsC(target, internalFormat, width, format, type, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public final int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapLevelsJava(target, internalFormat, width, height, format, type, level, base, max, data); + } else { + return gluBuild2DMipmapLevelsC(target, internalFormat, width, height, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public final int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapsJava(target, internalFormat, width, height, format, type, data); + } else { + return gluBuild2DMipmapsC(target, internalFormat, width, height, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public final int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapLevelsJava(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } else { + return gluBuild3DMipmapLevelsC(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public final int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapsJava(target, internalFormat, width, height, depth, format, type, data); + } else { + return gluBuild3DMipmapsC(target, internalFormat, width, height, depth, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public final int gluScaleImage(int format, int wIn, int hIn, int typeIn, java.nio.Buffer dataIn, int wOut, int hOut, int typeOut, java.nio.Buffer dataOut) { + if (useJavaMipmapCode) { + return gluScaleImageJava(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } else { + return gluScaleImageC(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } +} + +//---------------------------------------------------------------------- +// NURBS functionality +// + +/** + * Sets a property on a NURBS object. (NOTE: this function is not currently implemented.) + * + * @param r + * GLUnurbs object holding NURBS to which a property should be + * set + * @param property + * property id + * @param value + * property value + */ +public final void gluNurbsProperty(GLUnurbs r, int property, float value) { + // TODO glunurbsproperty + float nurbsValue; + switch (property) { + default: + // System.out.println("TODO gluwnurbs.glunurbsproperty"); + break; + } +} + +/** + * Creates a new GLUnurbs object. + * + * @return GLUnurbs object + */ +public final GLUnurbs gluNewNurbsRenderer() { + // DONE + return new GLUgl2nurbsImpl(); +} + +/** + * Begins a curve definition. + * + * @param r + * GLUnurbs object to specify curve to + */ +public final void gluBeginCurve(GLUnurbs r) { + // DONE + ((GLUgl2nurbsImpl) r).bgncurve(); +} + +/** + * Begins a surface definition. + * + * @param r + * GLUnurbs object to specify surface to + */ +public final void gluBeginSurface(GLUnurbs r) { + // DONE + ((GLUgl2nurbsImpl) r).bgnsurface(); +} + +/** + * Ends a surface. + * + * @param r + * GLUnurbs object holding surface + */ +public final void gluEndSurface(GLUnurbs r) { + // DONE + ((GLUgl2nurbsImpl) r).endsurface(); +} + +/** + * Makes a NURBS surface. + * + * @param r + * GLUnurbs object holding the surface + * @param sknot_count + * number of knots in s direction + * @param sknot + * knots in s direction + * @param tknot_count + * number of knots in t direction + * @param tknot + * knots in t direction + * @param s_stride + * number of control points coordinates in s direction + * @param t_stride + * number of control points coordinates in t direction + * @param ctlarray + * control points + * @param sorder + * order of surface in s direction + * @param torder + * order of surface in t direction + * @param type + * surface type + */ +public final void gluNurbsSurface(GLUnurbs r, int sknot_count, float[] sknot, + int tknot_count, float[] tknot, int s_stride, int t_stride, + float[] ctlarray, int sorder, int torder, int type) { + // DONE + ((GLUgl2nurbsImpl) r).nurbssurface(sknot_count, sknot, tknot_count, tknot, s_stride, + t_stride, ctlarray, sorder, torder, type); +} + +/** + * Make a NURBS curve. + * + * @param r + * GLUnurbs object holding the curve + * @param nknots + * number of knots + * @param knot + * knot vector + * @param stride + * number of control point coordinates + * @param ctlarray + * control points + * @param order + * order of the curve + * @param type + * curve type + */ +public final void gluNurbsCurve(GLUnurbs r, int nknots, float[] knot, int stride, + float[] ctlarray, int order, int type) { + int realType; + switch (type) { + // TODO GLU_MAP1_TRIM_2 etc. + default: + realType = type; + break; + } + ((GLUgl2nurbsImpl) r).nurbscurve(nknots, knot, stride, ctlarray, order, realType); +} + +/** + * Ends a curve definition. + * + * @param r + * GLUnurbs object holding the curve + */ +public final void gluEndCurve(GLUnurbs r) { + //DONE + ((GLUgl2nurbsImpl) r).endcurve(); +} + +//---------------------------------------------------------------------- +// GLUProcAddressTable handling +// + +private static GLUgl2ProcAddressTable gluProcAddressTable; +private static volatile boolean gluLibraryLoaded; + +private static final GLUgl2ProcAddressTable getGLUProcAddressTable() { + if (!gluLibraryLoaded) { + loadGLULibrary(); + } + if (gluProcAddressTable == null) { + GLUgl2ProcAddressTable tmp = new GLUgl2ProcAddressTable(); + ProcAddressHelper.resetProcAddressTable(tmp, GLDrawableFactoryImpl.getFactoryImpl(false)); + gluProcAddressTable = tmp; + } + return gluProcAddressTable; +} + +private static final synchronized void loadGLULibrary() { + if (!gluLibraryLoaded) { + GLDrawableFactoryImpl.getFactoryImpl(false).loadGLULibrary(); + gluLibraryLoaded = true; + } +} diff --git a/make/glu-CustomJavaCode-gles1.java b/make/glu-CustomJavaCode-gles1.java index c41ed208e..6f36be67a 100755 --- a/make/glu-CustomJavaCode-gles1.java +++ b/make/glu-CustomJavaCode-gles1.java @@ -31,29 +31,24 @@ static { * simultaneously. */ -public GLU() +public GLUes1() { - this.project = new ProjectES1(); + this.project = new ProjectFloat(); } //---------------------------------------------------------------------- // Utility routines // -/** - * Returns the GL object associated with the OpenGL context current on - * the current thread. Throws GLException if no OpenGL context is - * current. - */ - -public static GL getCurrentGL() throws GLException { +public static final GL2ES1 getCurrentGL2ES1() throws GLException { GLContext curContext = GLContext.getCurrent(); if (curContext == null) { throw new GLException("No OpenGL context current on this thread"); } - return curContext.getGL(); + return curContext.getGL().getGL2ES1(); } + /* public String gluErrorString(int errorCode) { return Error.gluErrorString(errorCode); @@ -79,245 +74,194 @@ public String gluGetString(int name) { } */ -/** - * Returns true if the specified GLU core- or extension-function can be - * successfully used through this GLU instance. By "successfully" we mean - * that the function is both <i>callable</i> on the machine running the - * program and <i>available</i> on the current display.<P> - * - * A GLU function is <i>callable</i> if it is a GLU core- or extension-function - * that is supported by the underlying GLU implementation. The function is - * <i>available</i> if the OpenGL implementation on the display meets the - * requirements of the GLU function being called (because GLU functions utilize - * OpenGL functions). <P> - * - * Whether or not a GLU function is <i>callable</i> is determined as follows: - * <ul> - * <li>If the function is a GLU core function (i.e., not an - * extension), <code>gluGetString(GLU_VERSION)</code> is used to determine the - * version number of the underlying GLU implementation on the host. - * then the function name is cross-referenced with that specification to - * see if it is part of that version's specification. - * - * <li> If the function is a GLU extension, the function name is - * cross-referenced with the list returned by - * <code>gluGetString(GLU_EXTENSIONS)</code> to see if the function is one of - * the extensions that is supported by the underlying GLU implementation. - * </ul> - * - * Whether or not a GLU function is <i>available</i> is determined as follows: - * <ul> - * <li>If the function is a GLU core function then the function is first - * cross-referenced with the GLU specifications to find the minimum GLU - * version required to <i>call</i> that GLU function. Then the following table - * is consulted to determine the minimum GL version required for that version - * of GLU: - * <ul> - * <li> GLU 1.0 requires OpenGL 1.0 - * <li> GLU 1.1 requires OpenGL 1.0 - * <li> GLU 1.2 requires OpenGL 1.1 - * <li> GLU 1.3 requires OpenGL 1.2 - * </ul> - * Finally, <code>glGetString(GL_VERSION)</code> is used to determine the - * highest OpenGL version that both host and display support, and from that it - * is possible to determine if the GL facilities required by the GLU function - * are <i>available</i> on the display. - * - * <li> If the function is a GLU extension, the function name is - * cross-referenced with the list returned by - * <code>gluGetString(GLU_EXTENSIONS)</code> to see if the function is one of - * the extensions that is supported by the underlying GLU implementation. - * </ul> - * - * <b>NOTE:</b>The availability of a function may change at runtime in - * response to changes in the display environment. For example, when a window - * is dragged from one display to another on a multi-display system, or when - * the properties of the display device are modified (e.g., changing the color - * depth of the display). Any application that is concerned with handling - * these situations correctly should confirm availability after a display - * change before calling a questionable OpenGL function. To detect a change in - * the display device, please see {@link - * GLEventListener#displayChanged(GLAutoDrawable,boolean,boolean)}. - * - * @param gluFunctionName the name of the OpenGL function (e.g., use - * "gluNurbsCallbackDataEXT" to check if the <code> - * gluNurbsCallbackDataEXT(GLUnurbs, GLvoid)</code> extension is available). - */ -public boolean isFunctionAvailable(String gluFunctionName) -{ - // if (useJavaMipmapCode) { - // All GLU functions are available in Java port - return true; - // } - // return (gluProcAddressTable.getAddressFor(gluFunctionName) != 0); -} - //---------------------------------------------------------------------- // Quadric functionality // /** Interface to C language function: <br> <code> void gluCylinder(GLUquadric * quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); </code> */ -public void gluCylinder(GLUquadric quad, double base, double top, double height, int slices, int stacks) { - ((GLUquadricImpl) quad).drawCylinder(getCurrentGL(), (float) base, (float) top, (float) height, slices, stacks); +public final void gluCylinder(GLUquadric quad, double base, double top, double height, int slices, int stacks) { + ((GLUquadricImpl) quad).drawCylinder(getCurrentGL2ES1(), (float) base, (float) top, (float) height, slices, stacks); } /** Interface to C language function: <br> <code> void gluDeleteQuadric(GLUquadric * quad); </code> */ -public void gluDeleteQuadric(GLUquadric quad) { +public final void gluDeleteQuadric(GLUquadric quad) { } /** Interface to C language function: <br> <code> void gluDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); </code> */ -public void gluDisk(GLUquadric quad, double inner, double outer, int slices, int loops) { - ((GLUquadricImpl) quad).drawDisk(getCurrentGL(), (float) inner, (float) outer, slices, loops); +public final void gluDisk(GLUquadric quad, double inner, double outer, int slices, int loops) { + ((GLUquadricImpl) quad).drawDisk(getCurrentGL2ES1(), (float) inner, (float) outer, slices, loops); } /** Interface to C language function: <br> <code> GLUquadric * gluNewQuadric(void); </code> */ -public GLUquadric gluNewQuadric() { +public final GLUquadric gluNewQuadric() { return new GLUquadricImpl(); } /** Interface to C language function: <br> <code> void gluPartialDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); </code> */ -public void gluPartialDisk(GLUquadric quad, double inner, double outer, int slices, int loops, double start, double sweep) { - ((GLUquadricImpl) quad).drawPartialDisk(getCurrentGL(), (float) inner, (float) outer, slices, loops, (float) start, (float) sweep); +public final void gluPartialDisk(GLUquadric quad, double inner, double outer, int slices, int loops, double start, double sweep) { + ((GLUquadricImpl) quad).drawPartialDisk(getCurrentGL2ES1(), (float) inner, (float) outer, slices, loops, (float) start, (float) sweep); } /** Interface to C language function: <br> <code> void gluQuadricDrawStyle(GLUquadric * quad, GLenum draw); </code> */ -public void gluQuadricDrawStyle(GLUquadric quad, int draw) { +public final void gluQuadricDrawStyle(GLUquadric quad, int draw) { ((GLUquadricImpl) quad).setDrawStyle(draw); } /** Interface to C language function: <br> <code> void gluQuadricNormals(GLUquadric * quad, GLenum normal); </code> */ -public void gluQuadricNormals(GLUquadric quad, int normal) { +public final void gluQuadricNormals(GLUquadric quad, int normal) { ((GLUquadricImpl) quad).setNormals(normal); } /** Interface to C language function: <br> <code> void gluQuadricOrientation(GLUquadric * quad, GLenum orientation); </code> */ -public void gluQuadricOrientation(GLUquadric quad, int orientation) { +public final void gluQuadricOrientation(GLUquadric quad, int orientation) { ((GLUquadricImpl) quad).setOrientation(orientation); } /** Interface to C language function: <br> <code> void gluQuadricTexture(GLUquadric * quad, GLboolean texture); </code> */ -public void gluQuadricTexture(GLUquadric quad, boolean texture) { +public final void gluQuadricTexture(GLUquadric quad, boolean texture) { ((GLUquadricImpl) quad).setTextureFlag(texture); } /** Interface to C language function: <br> <code> void gluSphere(GLUquadric * quad, GLdouble radius, GLint slices, GLint stacks); </code> */ -public void gluSphere(GLUquadric quad, double radius, int slices, int stacks) { - ((GLUquadricImpl) quad).drawSphere(getCurrentGL(), (float) radius, slices, stacks); +public final void gluSphere(GLUquadric quad, double radius, int slices, int stacks) { + ((GLUquadricImpl) quad).drawSphere(getCurrentGL2ES1(), (float) radius, slices, stacks); } //---------------------------------------------------------------------- // Projection routines // -private ProjectES1 project; +private ProjectFloat project; -public void gluOrtho2D(float left, float right, float bottom, float top) { - project.gluOrtho2D(getCurrentGL(), left, right, bottom, top); +public final void gluOrtho2D(float left, float right, float bottom, float top) { + project.gluOrtho2D(getCurrentGL2ES1(), left, right, bottom, top); } -public void gluPerspective(float fovy, float aspect, float zNear, float zFar) { - project.gluPerspective(getCurrentGL(), fovy, aspect, zNear, zFar); +public final void gluPerspective(float fovy, float aspect, float zNear, float zFar) { + project.gluPerspective(getCurrentGL2ES1(), fovy, aspect, zNear, zFar); } -public void gluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) { - project.gluLookAt(getCurrentGL(), eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ); +public final void gluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) { + project.gluLookAt(getCurrentGL2ES1(), eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ); } /** Interface to C language function: <br> <code> GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ); </code> * <P> Accepts the outgoing window coordinates as a single array. */ -public boolean gluProject(float objX, float objY, float objZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] winPos, int winPos_offset) { +public final boolean gluProject(float objX, float objY, float objZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] winPos, int winPos_offset) { return project.gluProject(objX, objY, objZ, model, model_offset, proj, proj_offset, view, view_offset, winPos, winPos_offset); } /** Interface to C language function: <br> <code> GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ); </code> * <P> Accepts the outgoing window coordinates as a single buffer. */ -public boolean gluProject(float objX, float objY, float objZ, java.nio.FloatBuffer model, java.nio.FloatBuffer proj, java.nio.IntBuffer view, java.nio.FloatBuffer winPos) { +public final boolean gluProject(float objX, float objY, float objZ, java.nio.FloatBuffer model, java.nio.FloatBuffer proj, java.nio.IntBuffer view, java.nio.FloatBuffer winPos) { return project.gluProject(objX, objY, objZ, model, proj, view, winPos); } /** Interface to C language function: <br> <code> GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ); </code> * <P> Accepts the outgoing object coordinates (a 3-vector) as a single array. */ -public boolean gluUnProject(float winX, float winY, float winZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] objPos, int objPos_offset) { +public final boolean gluUnProject(float winX, float winY, float winZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] objPos, int objPos_offset) { return project.gluUnProject(winX, winY, winZ, model, model_offset, proj, proj_offset, view, view_offset, objPos, objPos_offset); } /** Interface to C language function: <br> <code> GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ); </code> * <P> Accepts the outgoing object coordinates (a 3-vector) as a single buffer. */ -public boolean gluUnProject(float winX, float winY, float winZ, java.nio.FloatBuffer model, java.nio.FloatBuffer proj, java.nio.IntBuffer view, java.nio.FloatBuffer objPos) { +public final boolean gluUnProject(float winX, float winY, float winZ, java.nio.FloatBuffer model, java.nio.FloatBuffer proj, java.nio.IntBuffer view, java.nio.FloatBuffer objPos) { return project.gluUnProject(winX, winY, winZ, model, proj, view, objPos); } /** Interface to C language function: <br> <code> GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW); </code> * <P> Accepts the outgoing object coordinates (a 4-vector) as a single array. */ -public boolean gluUnProject4(float winX, float winY, float winZ, float clipW, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float nearVal, float farVal, float[] objPos, int objPos_offset) { +public final boolean gluUnProject4(float winX, float winY, float winZ, float clipW, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float nearVal, float farVal, float[] objPos, int objPos_offset) { return project.gluUnProject4(winX, winY, winZ, clipW, model, model_offset, proj, proj_offset, view, view_offset, nearVal, farVal, objPos, objPos_offset); } /** Interface to C language function: <br> <code> GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW); </code> * <P> Accepts the outgoing object coordinates (a 4-vector) as a single buffer. */ -public boolean gluUnProject4(float winX, float winY, float winZ, float clipW, java.nio.FloatBuffer model, java.nio.FloatBuffer proj, java.nio.IntBuffer view, float nearVal, float farVal, java.nio.FloatBuffer objPos) { +public final boolean gluUnProject4(float winX, float winY, float winZ, float clipW, java.nio.FloatBuffer model, java.nio.FloatBuffer proj, java.nio.IntBuffer view, float nearVal, float farVal, java.nio.FloatBuffer objPos) { return project.gluUnProject4(winX, winY, winZ, clipW, model, proj, view, nearVal, farVal, objPos); } -public void gluPickMatrix(float x, float y, float delX, float delY, int[] viewport, int viewport_offset) { - project.gluPickMatrix(getCurrentGL(), x, y, delX, delY, viewport, viewport_offset); +public final void gluPickMatrix(float x, float y, float delX, float delY, int[] viewport, int viewport_offset) { + project.gluPickMatrix(getCurrentGL2ES1(), x, y, delX, delY, viewport, viewport_offset); } -public void gluPickMatrix(float x, float y, float delX, float delY, java.nio.IntBuffer viewport) { - project.gluPickMatrix(getCurrentGL(), x, y, delX, delY, viewport); +public final void gluPickMatrix(float x, float y, float delX, float delY, java.nio.IntBuffer viewport) { + project.gluPickMatrix(getCurrentGL2ES1(), x, y, delX, delY, viewport); } -// Boolean -public static final int GLU_FALSE = 0; -public static final int GLU_TRUE = 1; +public final void gluOrtho2D(double left, double right, double bottom, double top) { + project.gluOrtho2D(getCurrentGL2ES1(), (float)left, (float)right, (float)bottom, (float)top); +} -// String Name -public static final int GLU_VERSION = 100800; -public static final int GLU_EXTENSIONS = 100801; +public final void gluPerspective(double fovy, double aspect, double zNear, double zFar) { + project.gluPerspective(getCurrentGL2ES1(), (float)fovy, (float)aspect, (float)zNear, (float)zFar); +} -// Extensions -public static final String versionString = "1.3"; -public static final String extensionString = "GLU_EXT_nurbs_tessellator " + - "GLU_EXT_object_space_tess "; +public final void gluLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) { + project.gluLookAt(getCurrentGL2ES1(), (float)eyeX, (float)eyeY, (float)eyeZ, (float)centerX, (float)centerY, (float)centerZ, (float)upX, (float)upY, (float)upZ); +} -// ErrorCode -public static final int GLU_INVALID_ENUM = 100900; -public static final int GLU_INVALID_VALUE = 100901; -public static final int GLU_OUT_OF_MEMORY = 100902; -public static final int GLU_INVALID_OPERATION = 100904; +/** Interface to C language function: <br> <code> GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ); </code> + * <P> Accepts the outgoing window coordinates as a single array. + */ +public final boolean gluProject(double objX, double objY, double objZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] winPos, int winPos_offset) { + return project.gluProject((float)objX, (float)objY, (float)objZ, BufferUtil.getFloatArray(model), model_offset, BufferUtil.getFloatArray(proj), proj_offset, view, view_offset, BufferUtil.getFloatArray(winPos), winPos_offset); +} -/************* +/** Interface to C language function: <br> <code> GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ); </code> + * <P> Accepts the outgoing window coordinates as a single buffer. + */ +public final boolean gluProject(double objX, double objY, double objZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer winPos) { + return project.gluProject((float)objX, (float)objY, (float)objZ, BufferUtil.getFloatBuffer(model), BufferUtil.getFloatBuffer(proj), view, BufferUtil.getFloatBuffer(winPos)); +} -//---------------------------------------------------------------------- -// Mipmap and image scaling functionality +/** Interface to C language function: <br> <code> GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ); </code> + * <P> Accepts the outgoing object coordinates (a 3-vector) as a single array. + */ +public final boolean gluUnProject(double winX, double winY, double winZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] objPos, int objPos_offset) { + return project.gluUnProject((float)winX, (float)winY, (float)winZ, BufferUtil.getFloatArray(model), model_offset, BufferUtil.getFloatArray(proj), proj_offset, view, view_offset, BufferUtil.getFloatArray(objPos), objPos_offset); +} +/** Interface to C language function: <br> <code> GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ); </code> + * <P> Accepts the outgoing object coordinates (a 3-vector) as a single buffer. + */ +public final boolean gluUnProject(double winX, double winY, double winZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer objPos) { + return project.gluUnProject((float)winX, (float)winY, (float)winZ, BufferUtil.getFloatBuffer(model), BufferUtil.getFloatBuffer(proj), view, BufferUtil.getFloatBuffer(objPos)); +} -// Boolean -public static final int GLU_FALSE = 0; -public static final int GLU_TRUE = 1; +/** Interface to C language function: <br> <code> GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW); </code> + * <P> Accepts the outgoing object coordinates (a 4-vector) as a single array. + */ +public final boolean gluUnProject4(double winX, double winY, double winZ, double clipW, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double nearVal, double farVal, double[] objPos, int objPos_offset) { + return project.gluUnProject4((float)winX, (float)winY, (float)winZ, (float)clipW, BufferUtil.getFloatArray(model), model_offset, BufferUtil.getFloatArray(proj), proj_offset, view, view_offset, (float)nearVal, (float)farVal, BufferUtil.getFloatArray(objPos), objPos_offset); +} + +/** Interface to C language function: <br> <code> GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW); </code> + * <P> Accepts the outgoing object coordinates (a 4-vector) as a single buffer. + */ +public final boolean gluUnProject4(double winX, double winY, double winZ, double clipW, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, double nearVal, double farVal, DoubleBuffer objPos) { + return project.gluUnProject4((float)winX, (float)winY, (float)winZ, (float)clipW, BufferUtil.getFloatBuffer(model), BufferUtil.getFloatBuffer(proj), view, (float)nearVal, (float)farVal, BufferUtil.getFloatBuffer(objPos)); +} + +public final void gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) { + project.gluPickMatrix(getCurrentGL2ES1(), (float)x, (float)y, (float)delX, (float)delY, viewport, viewport_offset); +} -// String Name -public static final int GLU_VERSION = 100800; -public static final int GLU_EXTENSIONS = 100801; +public final void gluPickMatrix(double x, double y, double delX, double delY, IntBuffer viewport) { + project.gluPickMatrix(getCurrentGL2ES1(), (float)x, (float)y, (float)delX, (float)delY, viewport); +} -// Extensions -public static final String versionString = "1.3"; -public static final String extensionString = "GLU_EXT_nurbs_tessellator " + - "GLU_EXT_object_space_tess "; +//---------------------------------------------------------------------- +// Mipmap and image scaling functionality -// ErrorCode -public static final int GLU_INVALID_ENUM = 100900; -public static final int GLU_INVALID_VALUE = 100901; -public static final int GLU_OUT_OF_MEMORY = 100902; -public static final int GLU_INVALID_OPERATION = 100904; -private java.nio.ByteBuffer copyToByteBuffer(java.nio.Buffer buf) { +private final java.nio.ByteBuffer copyToByteBuffer(java.nio.Buffer buf) { if (buf instanceof java.nio.ByteBuffer) { if (buf.position() == 0) { return (java.nio.ByteBuffer) buf; @@ -334,7 +278,7 @@ private java.nio.ByteBuffer copyToByteBuffer(java.nio.Buffer buf) { } } -private int gluScaleImageJava( int format, int widthin, int heightin, +public final int gluScaleImage( int format, int widthin, int heightin, int typein, java.nio.Buffer datain, int widthout, int heightout, int typeout, java.nio.Buffer dataout ) { java.nio.ByteBuffer in = null; @@ -351,7 +295,7 @@ private int gluScaleImageJava( int format, int widthin, int heightin, } else { throw new IllegalArgumentException("Unsupported destination buffer type (must be byte, short, int, or float)"); } - int errno = Mipmap.gluScaleImage( getCurrentGL(), format, widthin, heightin, typein, in, + int errno = Mipmap.gluScaleImage( getCurrentGL2ES1(), format, widthin, heightin, typein, in, widthout, heightout, typeout, out ); if( errno == 0 ) { out.rewind(); @@ -371,139 +315,55 @@ private int gluScaleImageJava( int format, int widthin, int heightin, } -private int gluBuild1DMipmapLevelsJava( int target, int internalFormat, int width, +public final int gluBuild1DMipmapLevels( int target, int internalFormat, int width, int format, int type, int userLevel, int baseLevel, int maxLevel, java.nio.Buffer data ) { java.nio.ByteBuffer buffer = copyToByteBuffer(data); - return( Mipmap.gluBuild1DMipmapLevels( getCurrentGL(), target, internalFormat, width, + return( Mipmap.gluBuild1DMipmapLevels( getCurrentGL2ES1(), target, internalFormat, width, format, type, userLevel, baseLevel, maxLevel, buffer ) ); } -private int gluBuild1DMipmapsJava( int target, int internalFormat, int width, +public final int gluBuild1DMipmaps( int target, int internalFormat, int width, int format, int type, java.nio.Buffer data ) { java.nio.ByteBuffer buffer = copyToByteBuffer(data); - return( Mipmap.gluBuild1DMipmaps( getCurrentGL(), target, internalFormat, width, format, + return( Mipmap.gluBuild1DMipmaps( getCurrentGL2ES1(), target, internalFormat, width, format, type, buffer ) ); } -private int gluBuild2DMipmapLevelsJava( int target, int internalFormat, int width, +public final int gluBuild2DMipmapLevels( int target, int internalFormat, int width, int height, int format, int type, int userLevel, int baseLevel, int maxLevel, java.nio.Buffer data ) { // While the code below handles other data types, it doesn't handle non-ByteBuffers data = copyToByteBuffer(data); - return( Mipmap.gluBuild2DMipmapLevels( getCurrentGL(), target, internalFormat, width, + return( Mipmap.gluBuild2DMipmapLevels( getCurrentGL2ES1(), target, internalFormat, width, height, format, type, userLevel, baseLevel, maxLevel, data ) ); } -private int gluBuild2DMipmapsJava( int target, int internalFormat, int width, +public final int gluBuild2DMipmaps( int target, int internalFormat, int width, int height, int format, int type, java.nio.Buffer data ) { // While the code below handles other data types, it doesn't handle non-ByteBuffers data = copyToByteBuffer(data); - return( Mipmap.gluBuild2DMipmaps( getCurrentGL(), target, internalFormat, width, height, + return( Mipmap.gluBuild2DMipmaps( getCurrentGL2ES1(), target, internalFormat, width, height, format, type, data) ); } -private int gluBuild3DMipmapLevelsJava( int target, int internalFormat, int width, +public final int gluBuild3DMipmapLevels( int target, int internalFormat, int width, int height, int depth, int format, int type, int userLevel, int baseLevel, int maxLevel, java.nio.Buffer data) { java.nio.ByteBuffer buffer = copyToByteBuffer(data); - return( Mipmap.gluBuild3DMipmapLevels( getCurrentGL(), target, internalFormat, width, + return( Mipmap.gluBuild3DMipmapLevels( getCurrentGL2ES1(), target, internalFormat, width, height, depth, format, type, userLevel, baseLevel, maxLevel, buffer) ); } -private int gluBuild3DMipmapsJava( int target, int internalFormat, int width, +public final int gluBuild3DMipmaps( int target, int internalFormat, int width, int height, int depth, int format, int type, java.nio.Buffer data ) { java.nio.ByteBuffer buffer = copyToByteBuffer(data); - return( Mipmap.gluBuild3DMipmaps( getCurrentGL(), target, internalFormat, width, height, + return( Mipmap.gluBuild3DMipmaps( getCurrentGL2ES1(), target, internalFormat, width, height, depth, format, type, buffer ) ); } -*********************/ - -//---------------------------------------------------------------------- -// Wrappers for mipmap and image scaling entry points which dispatch either -// to the Java or C versions. -// - -/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ -/* -public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, java.nio.Buffer data) { - if (useJavaMipmapCode) { - return gluBuild1DMipmapLevelsJava(target, internalFormat, width, format, type, level, base, max, data); - } else { - return gluBuild1DMipmapLevelsC(target, internalFormat, width, format, type, level, base, max, data); - } -} -*/ - -/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ -/* -public int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, java.nio.Buffer data) { - if (useJavaMipmapCode) { - return gluBuild1DMipmapsJava(target, internalFormat, width, format, type, data); - } else { - return gluBuild1DMipmapsC(target, internalFormat, width, format, type, data); - } -} -*/ - -/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ -/* -public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, java.nio.Buffer data) { - if (useJavaMipmapCode) { - return gluBuild2DMipmapLevelsJava(target, internalFormat, width, height, format, type, level, base, max, data); - } else { - return gluBuild2DMipmapLevelsC(target, internalFormat, width, height, format, type, level, base, max, data); - } -} -*/ - -/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ -/* -public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, java.nio.Buffer data) { - if (useJavaMipmapCode) { - return gluBuild2DMipmapsJava(target, internalFormat, width, height, format, type, data); - } else { - return gluBuild2DMipmapsC(target, internalFormat, width, height, format, type, data); - } -} -*/ - -/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ -/* -public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, java.nio.Buffer data) { - if (useJavaMipmapCode) { - return gluBuild3DMipmapLevelsJava(target, internalFormat, width, height, depth, format, type, level, base, max, data); - } else { - return gluBuild3DMipmapLevelsC(target, internalFormat, width, height, depth, format, type, level, base, max, data); - } -} -*/ - -/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ -/* -public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, java.nio.Buffer data) { - if (useJavaMipmapCode) { - return gluBuild3DMipmapsJava(target, internalFormat, width, height, depth, format, type, data); - } else { - return gluBuild3DMipmapsC(target, internalFormat, width, height, depth, format, type, data); - } -} -*/ - -/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ -/* -public int gluScaleImage(int format, int wIn, int hIn, int typeIn, java.nio.Buffer dataIn, int wOut, int hOut, int typeOut, java.nio.Buffer dataOut) { - if (useJavaMipmapCode) { - return gluScaleImageJava(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); - } else { - return gluScaleImageC(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); - } -} -*/ - //---------------------------------------------------------------------- // GLUProcAddressTable handling // @@ -531,22 +391,3 @@ private static synchronized void loadGLULibrary() { } } */ - -// QuadricDrawStyle -public static final int GLU_POINT = 100010; -public static final int GLU_LINE = 100011; -public static final int GLU_FILL = 100012; -public static final int GLU_SILHOUETTE = 100013; - -// QuadricCallback -// GLU_ERROR - -// QuadricNormal -public static final int GLU_SMOOTH = 100000; -public static final int GLU_FLAT = 100001; -public static final int GLU_NONE = 100002; - -// QuadricOrientation -public static final int GLU_OUTSIDE = 100020; -public static final int GLU_INSIDE = 100021; - diff --git a/make/glu-CustomJavaCode-gles1_if.java b/make/glu-CustomJavaCode-gles1_if.java new file mode 100755 index 000000000..6b2504388 --- /dev/null +++ b/make/glu-CustomJavaCode-gles1_if.java @@ -0,0 +1,405 @@ +/** + * Returns true if the specified GLU core- or extension-function can be + * successfully used through this GLU instance. By "successfully" we mean + * that the function is both <i>callable</i> on the machine running the + * program and <i>available</i> on the current display.<P> + * + * A GLU function is <i>callable</i> if it is a GLU core- or extension-function + * that is supported by the underlying GLU implementation. The function is + * <i>available</i> if the OpenGL implementation on the display meets the + * requirements of the GLU function being called (because GLU functions utilize + * OpenGL functions). <P> + * + * Whether or not a GLU function is <i>callable</i> is determined as follows: + * <ul> + * <li>If the function is a GLU core function (i.e., not an + * extension), <code>gluGetString(GLU_VERSION)</code> is used to determine the + * version number of the underlying GLU implementation on the host. + * then the function name is cross-referenced with that specification to + * see if it is part of that version's specification. + * + * <li> If the function is a GLU extension, the function name is + * cross-referenced with the list returned by + * <code>gluGetString(GLU_EXTENSIONS)</code> to see if the function is one of + * the extensions that is supported by the underlying GLU implementation. + * </ul> + * + * Whether or not a GLU function is <i>available</i> is determined as follows: + * <ul> + * <li>If the function is a GLU core function then the function is first + * cross-referenced with the GLU specifications to find the minimum GLU + * version required to <i>call</i> that GLU function. Then the following table + * is consulted to determine the minimum GL version required for that version + * of GLU: + * <ul> + * <li> GLU 1.0 requires OpenGL 1.0 + * <li> GLU 1.1 requires OpenGL 1.0 + * <li> GLU 1.2 requires OpenGL 1.1 + * <li> GLU 1.3 requires OpenGL 1.2 + * </ul> + * Finally, <code>glGetString(GL_VERSION)</code> is used to determine the + * highest OpenGL version that both host and display support, and from that it + * is possible to determine if the GL facilities required by the GLU function + * are <i>available</i> on the display. + * + * <li> If the function is a GLU extension, the function name is + * cross-referenced with the list returned by + * <code>gluGetString(GLU_EXTENSIONS)</code> to see if the function is one of + * the extensions that is supported by the underlying GLU implementation. + * </ul> + * + * <b>NOTE:</b>The availability of a function may change at runtime in + * response to changes in the display environment. For example, when a window + * is dragged from one display to another on a multi-display system, or when + * the properties of the display device are modified (e.g., changing the color + * depth of the display). Any application that is concerned with handling + * these situations correctly should confirm availability after a display + * change before calling a questionable OpenGL function. To detect a change in + * the display device, please see {@link + * GLEventListener#displayChanged(GLAutoDrawable,boolean,boolean)}. + * + * @param gluFunctionName the name of the OpenGL function (e.g., use + * "gluNurbsCallbackDataEXT" to check if the <code> + * gluNurbsCallbackDataEXT(GLUnurbs, GLvoid)</code> extension is available). + */ +public boolean isFunctionAvailable(String gluFunctionName) +{ + // if (useJavaMipmapCode) { + // All GLU functions are available in Java port + return true; + // } + // return (gluProcAddressTable.getAddressFor(gluFunctionName) != 0); +} + + +//---------------------------------------------------------------------- +// Utility routines +// + +public static final GLU createGLU() throws GLException { + GLU glu = null; + GL gl = getCurrentGL(); + if(gl==null) { + throw new GLException("No current GL"); + } + return createGLU(gl); +} + +public static final GLU createGLU(GL gl) throws GLException { + GLU glu = null; + String clazzName; + if(gl.isGL2()) { + clazzName="javax.media.opengl.glu.gl2.GLUgl2"; + } else if(gl.isGLES1()) { + clazzName="javax.media.opengl.glu.gl2.GLUgl2"; + } else { + throw new GLException("GLU not supported for GL "+gl); + } + try { + Class clazz = Class.forName(clazzName); + Constructor c = clazz.getDeclaredConstructor(new Class[0]); + glu = (GLU) c.newInstance(null); + } catch (Exception e) { + throw new GLException(e); + } + + return glu; +} + +public static final GL getCurrentGL() throws GLException { + GLContext curContext = GLContext.getCurrent(); + if (curContext == null) { + throw new GLException("No OpenGL context current on this thread"); + } + return curContext.getGL(); +} + +// Boolean +public static final int GLU_FALSE = 0; +public static final int GLU_TRUE = 1; + +// String Name +public static final int GLU_VERSION = 100800; +public static final int GLU_EXTENSIONS = 100801; + +// Extensions +public static final String versionString = "1.3"; +public static final String extensionString = "GLU_EXT_nurbs_tessellator " + + "GLU_EXT_object_space_tess "; + +// ErrorCode +public static final int GLU_INVALID_ENUM = 100900; +public static final int GLU_INVALID_VALUE = 100901; +public static final int GLU_OUT_OF_MEMORY = 100902; +public static final int GLU_INVALID_OPERATION = 100904; + + +// QuadricDrawStyle +public static final int GLU_POINT = 100010; +public static final int GLU_LINE = 100011; +public static final int GLU_FILL = 100012; +public static final int GLU_SILHOUETTE = 100013; + +// QuadricCallback +// GLU_ERROR + +// QuadricNormal +public static final int GLU_SMOOTH = 100000; +public static final int GLU_FLAT = 100001; +public static final int GLU_NONE = 100002; + +// QuadricOrientation +public static final int GLU_OUTSIDE = 100020; +public static final int GLU_INSIDE = 100021; + +// NurbsDisplay +// GLU_FILL +//public static final int GLU_OUTLINE_POLYGON = 100240; +//public static final int GLU_OUTLINE_PATCH = 100241; + +// NurbsCallback +//public static final int GLU_NURBS_ERROR = 100103; +public static final int GLU_ERROR = 100103; +//public static final int GLU_NURBS_BEGIN = 100164; +//public static final int GLU_NURBS_BEGIN_EXT = 100164; +//public static final int GLU_NURBS_VERTEX = 100165; +//public static final int GLU_NURBS_VERTEX_EXT = 100165; +//public static final int GLU_NURBS_NORMAL = 100166; +//public static final int GLU_NURBS_NORMAL_EXT = 100166; +//public static final int GLU_NURBS_COLOR = 100167; +//public static final int GLU_NURBS_COLOR_EXT = 100167; +//public static final int GLU_NURBS_TEXTURE_COORD = 100168; +//public static final int GLU_NURBS_TEX_COORD_EXT = 100168; +//public static final int GLU_NURBS_END = 100169; +//public static final int GLU_NURBS_END_EXT = 100169; +//public static final int GLU_NURBS_BEGIN_DATA = 100170; +//public static final int GLU_NURBS_BEGIN_DATA_EXT = 100170; +//public static final int GLU_NURBS_VERTEX_DATA = 100171; +//public static final int GLU_NURBS_VERTEX_DATA_EXT = 100171; +//public static final int GLU_NURBS_NORMAL_DATA = 100172; +//public static final int GLU_NURBS_NORMAL_DATA_EXT = 100172; +//public static final int GLU_NURBS_COLOR_DATA = 100173; +//public static final int GLU_NURBS_COLOR_DATA_EXT = 100173; +//public static final int GLU_NURBS_TEXTURE_COORD_DATA = 100174; +//public static final int GLU_NURBS_TEX_COORD_DATA_EXT = 100174; +//public static final int GLU_NURBS_END_DATA = 100175; +//public static final int GLU_NURBS_END_DATA_EXT = 100175; + +// NurbsError +//public static final int GLU_NURBS_ERROR1 = 100251; +//public static final int GLU_NURBS_ERROR2 = 100252; +//public static final int GLU_NURBS_ERROR3 = 100253; +//public static final int GLU_NURBS_ERROR4 = 100254; +//public static final int GLU_NURBS_ERROR5 = 100255; +//public static final int GLU_NURBS_ERROR6 = 100256; +//public static final int GLU_NURBS_ERROR7 = 100257; +//public static final int GLU_NURBS_ERROR8 = 100258; +//public static final int GLU_NURBS_ERROR9 = 100259; +//public static final int GLU_NURBS_ERROR10 = 100260; +//public static final int GLU_NURBS_ERROR11 = 100261; +//public static final int GLU_NURBS_ERROR12 = 100262; +//public static final int GLU_NURBS_ERROR13 = 100263; +//public static final int GLU_NURBS_ERROR14 = 100264; +//public static final int GLU_NURBS_ERROR15 = 100265; +//public static final int GLU_NURBS_ERROR16 = 100266; +//public static final int GLU_NURBS_ERROR17 = 100267; +//public static final int GLU_NURBS_ERROR18 = 100268; +//public static final int GLU_NURBS_ERROR19 = 100269; +//public static final int GLU_NURBS_ERROR20 = 100270; +//public static final int GLU_NURBS_ERROR21 = 100271; +//public static final int GLU_NURBS_ERROR22 = 100272; +//public static final int GLU_NURBS_ERROR23 = 100273; +//public static final int GLU_NURBS_ERROR24 = 100274; +//public static final int GLU_NURBS_ERROR25 = 100275; +//public static final int GLU_NURBS_ERROR26 = 100276; +//public static final int GLU_NURBS_ERROR27 = 100277; +//public static final int GLU_NURBS_ERROR28 = 100278; +//public static final int GLU_NURBS_ERROR29 = 100279; +//public static final int GLU_NURBS_ERROR30 = 100280; +//public static final int GLU_NURBS_ERROR31 = 100281; +//public static final int GLU_NURBS_ERROR32 = 100282; +//public static final int GLU_NURBS_ERROR33 = 100283; +//public static final int GLU_NURBS_ERROR34 = 100284; +//public static final int GLU_NURBS_ERROR35 = 100285; +//public static final int GLU_NURBS_ERROR36 = 100286; +//public static final int GLU_NURBS_ERROR37 = 100287; + +// NurbsProperty +//public static final int GLU_AUTO_LOAD_MATRIX = 100200; +//public static final int GLU_CULLING = 100201; +//public static final int GLU_SAMPLING_TOLERANCE = 100203; +//public static final int GLU_DISPLAY_MODE = 100204; +//public static final int GLU_PARAMETRIC_TOLERANCE = 100202; +//public static final int GLU_SAMPLING_METHOD = 100205; +//public static final int GLU_U_STEP = 100206; +//public static final int GLU_V_STEP = 100207; +//public static final int GLU_NURBS_MODE = 100160; +//public static final int GLU_NURBS_MODE_EXT = 100160; +//public static final int GLU_NURBS_TESSELLATOR = 100161; +//public static final int GLU_NURBS_TESSELLATOR_EXT = 100161; +//public static final int GLU_NURBS_RENDERER = 100162; +//public static final int GLU_NURBS_RENDERER_EXT = 100162; + +// NurbsSampling +//public static final int GLU_OBJECT_PARAMETRIC_ERROR = 100208; +//public static final int GLU_OBJECT_PARAMETRIC_ERROR_EXT = 100208; +//public static final int GLU_OBJECT_PATH_LENGTH = 100209; +//public static final int GLU_OBJECT_PATH_LENGTH_EXT = 100209; +//public static final int GLU_PATH_LENGTH = 100215; +//public static final int GLU_PARAMETRIC_ERROR = 100216; +//public static final int GLU_DOMAIN_DISTANCE = 100217; + +// NurbsTrim +//public static final int GLU_MAP1_TRIM_2 = 100210; +//public static final int GLU_MAP1_TRIM_3 = 100211; + +// QuadricCallback +// GLU_ERROR + +// TessCallback +public static final int GLU_TESS_BEGIN = 100100; +public static final int GLU_BEGIN = 100100; +public static final int GLU_TESS_VERTEX = 100101; +public static final int GLU_VERTEX = 100101; +public static final int GLU_TESS_END = 100102; +public static final int GLU_END = 100102; +public static final int GLU_TESS_ERROR = 100103; +public static final int GLU_TESS_EDGE_FLAG = 100104; +public static final int GLU_EDGE_FLAG = 100104; +public static final int GLU_TESS_COMBINE = 100105; +public static final int GLU_TESS_BEGIN_DATA = 100106; +public static final int GLU_TESS_VERTEX_DATA = 100107; +public static final int GLU_TESS_END_DATA = 100108; +public static final int GLU_TESS_ERROR_DATA = 100109; +public static final int GLU_TESS_EDGE_FLAG_DATA = 100110; +public static final int GLU_TESS_COMBINE_DATA = 100111; + +// TessContour +public static final int GLU_CW = 100120; +public static final int GLU_CCW = 100121; +public static final int GLU_INTERIOR = 100122; +public static final int GLU_EXTERIOR = 100123; +public static final int GLU_UNKNOWN = 100124; + +// TessProperty +public static final int GLU_TESS_WINDING_RULE = 100140; +public static final int GLU_TESS_BOUNDARY_ONLY = 100141; +public static final int GLU_TESS_TOLERANCE = 100142; + +// TessError +public static final int GLU_TESS_ERROR1 = 100151; +public static final int GLU_TESS_ERROR2 = 100152; +public static final int GLU_TESS_ERROR3 = 100153; +public static final int GLU_TESS_ERROR4 = 100154; +public static final int GLU_TESS_ERROR5 = 100155; +public static final int GLU_TESS_ERROR6 = 100156; +public static final int GLU_TESS_ERROR7 = 100157; +public static final int GLU_TESS_ERROR8 = 100158; +public static final int GLU_TESS_MISSING_BEGIN_POLYGON = 100151; +public static final int GLU_TESS_MISSING_BEGIN_CONTOUR = 100152; +public static final int GLU_TESS_MISSING_END_POLYGON = 100153; +public static final int GLU_TESS_MISSING_END_CONTOUR = 100154; +public static final int GLU_TESS_COORD_TOO_LARGE = 100155; +public static final int GLU_TESS_NEED_COMBINE_CALLBACK = 100156; + +// TessWinding +public static final int GLU_TESS_WINDING_ODD = 100130; +public static final int GLU_TESS_WINDING_NONZERO = 100131; +public static final int GLU_TESS_WINDING_POSITIVE = 100132; +public static final int GLU_TESS_WINDING_NEGATIVE = 100133; +public static final int GLU_TESS_WINDING_ABS_GEQ_TWO = 100134; +public static final double GLU_TESS_MAX_COORD = 1.0e150; + +public abstract void gluCylinder(GLUquadric quad, double base, double top, double height, int slices, int stacks) ; + +/** Interface to C language function: <br> <code> void gluDeleteQuadric(GLUquadric * quad); </code> */ +public abstract void gluDeleteQuadric(GLUquadric quad) ; + +/** Interface to C language function: <br> <code> void gluDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); </code> */ +public abstract void gluDisk(GLUquadric quad, double inner, double outer, int slices, int loops) ; + +/** Interface to C language function: <br> <code> GLUquadric * gluNewQuadric(void); </code> */ +public abstract GLUquadric gluNewQuadric() ; + +/** Interface to C language function: <br> <code> void gluPartialDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); </code> */ +public abstract void gluPartialDisk(GLUquadric quad, double inner, double outer, int slices, int loops, double start, double sweep) ; + +/** Interface to C language function: <br> <code> void gluQuadricDrawStyle(GLUquadric * quad, GLenum draw); </code> */ +public abstract void gluQuadricDrawStyle(GLUquadric quad, int draw) ; + +/** Interface to C language function: <br> <code> void gluQuadricNormals(GLUquadric * quad, GLenum normal); </code> */ +public abstract void gluQuadricNormals(GLUquadric quad, int normal) ; + +/** Interface to C language function: <br> <code> void gluQuadricOrientation(GLUquadric * quad, GLenum orientation); </code> */ +public abstract void gluQuadricOrientation(GLUquadric quad, int orientation) ; + +/** Interface to C language function: <br> <code> void gluQuadricTexture(GLUquadric * quad, GLboolean texture); </code> */ +public abstract void gluQuadricTexture(GLUquadric quad, boolean texture) ; + +/** Interface to C language function: <br> <code> void gluSphere(GLUquadric * quad, GLdouble radius, GLint slices, GLint stacks); </code> */ +public abstract void gluSphere(GLUquadric quad, double radius, int slices, int stacks) ; + +public abstract void gluOrtho2D(double left, double right, double bottom, double top) ; + +public abstract void gluPerspective(double fovy, double aspect, double zNear, double zFar) ; + +public abstract void gluLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) ; + +/** Interface to C language function: <br> <code> GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ); </code> + * <P> Accepts the outgoing window coordinates as a single array. + */ +public abstract boolean gluProject(double objX, double objY, double objZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] winPos, int winPos_offset) ; + +/** Interface to C language function: <br> <code> GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ); </code> + * <P> Accepts the outgoing window coordinates as a single buffer. + */ +public abstract boolean gluProject(double objX, double objY, double objZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer winPos) ; + +/** Interface to C language function: <br> <code> GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ); </code> + * <P> Accepts the outgoing object coordinates (a 3-vector) as a single array. + */ +public abstract boolean gluUnProject(double winX, double winY, double winZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] objPos, int objPos_offset) ; + +/** Interface to C language function: <br> <code> GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ); </code> + * <P> Accepts the outgoing object coordinates (a 3-vector) as a single buffer. + */ +public abstract boolean gluUnProject(double winX, double winY, double winZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer objPos) ; + +/** Interface to C language function: <br> <code> GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW); </code> + * <P> Accepts the outgoing object coordinates (a 4-vector) as a single array. + */ +public abstract boolean gluUnProject4(double winX, double winY, double winZ, double clipW, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double nearVal, double farVal, double[] objPos, int objPos_offset) ; + +/** Interface to C language function: <br> <code> GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW); </code> + * <P> Accepts the outgoing object coordinates (a 4-vector) as a single buffer. + */ +public abstract boolean gluUnProject4(double winX, double winY, double winZ, double clipW, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, double nearVal, double farVal, DoubleBuffer objPos) ; + +public abstract void gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) ; + +public abstract void gluPickMatrix(double x, double y, double delX, double delY, IntBuffer viewport) ; + +public abstract int gluScaleImage( int format, int widthin, int heightin, + int typein, java.nio.Buffer datain, int widthout, int heightout, + int typeout, java.nio.Buffer dataout ) ; + +public abstract int gluBuild1DMipmapLevels( int target, int internalFormat, int width, + int format, int type, int userLevel, int baseLevel, int maxLevel, + java.nio.Buffer data ) ; +public abstract int gluBuild1DMipmaps( int target, int internalFormat, int width, + int format, int type, java.nio.Buffer data ) ; + +public abstract int gluBuild2DMipmapLevels( int target, int internalFormat, int width, + int height, int format, int type, int userLevel, int baseLevel, + int maxLevel, java.nio.Buffer data ) ; + +public abstract int gluBuild2DMipmaps( int target, int internalFormat, int width, + int height, int format, int type, java.nio.Buffer data ) ; + +public abstract int gluBuild3DMipmapLevels( int target, int internalFormat, int width, + int height, int depth, int format, int type, int userLevel, int baseLevel, + int maxLevel, java.nio.Buffer data) ; + +public abstract int gluBuild3DMipmaps( int target, int internalFormat, int width, + int height, int depth, int format, int type, java.nio.Buffer data ) ; + diff --git a/make/glu-common.cfg b/make/glu-common.cfg index b5a92819b..f4f6f2289 100644 --- a/make/glu-common.cfg +++ b/make/glu-common.cfg @@ -1,8 +1,4 @@ # This .cfg file provides common options used among all GLU glue code -# generated for Jogl on all platforms. -Style ImplOnly -ImplPackage javax.media.opengl.glu -ImplJavaClass GLU JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl HierarchicalNativeOutput false @@ -17,6 +13,7 @@ Import java.nio.* Import javax.media.opengl.* Import javax.media.opengl.glu.* Import com.sun.opengl.impl.* +Import com.sun.opengl.impl.glu.* # Raise GLException instead of RuntimeException in glue code RuntimeExceptionType GLException diff --git a/make/glu-es1.cfg b/make/glu-es1.cfg index 4aa982ecf..5f86e6ddc 100755 --- a/make/glu-es1.cfg +++ b/make/glu-es1.cfg @@ -1,5 +1,9 @@ # This .cfg file is used to generate the GLU implementation for OpenGL ES 1.0, # where it is pure Java. +Style ImplOnly +ImplPackage javax.media.opengl.glu.es1 +ImplJavaClass GLUes1 +ParentClass GLUes1 GLU Ignore gluBuild1DMipmapLevels Ignore gluBuild1DMipmaps @@ -10,6 +14,11 @@ Ignore gluBuild3DMipmaps Ignore gluScaleImage # Custom Java code for GLU class -IncludeAs CustomJavaCode GLU glu-CustomJavaCode-gles1.java +IncludeAs CustomJavaCode GLUes1 glu-CustomJavaCode-gles1.java + +Import javax.media.opengl.GLES1 +Import javax.media.opengl.glu.GLU +Import javax.media.opengl.util.BufferUtil +Import com.sun.opengl.impl.glu.mipmap.Mipmap Include glu-common.cfg diff --git a/make/glu-es1_if.cfg b/make/glu-es1_if.cfg new file mode 100755 index 000000000..666ab44a5 --- /dev/null +++ b/make/glu-es1_if.cfg @@ -0,0 +1,22 @@ +# This .cfg file is used to generate the GLU implementation for OpenGL ES 1.0, +# where it is pure Java. +Style ImplOnly +ImplPackage javax.media.opengl.glu +ImplJavaClass GLU +AccessControl GLU PUBLIC_ABSTRACT + +Ignore gluBuild1DMipmapLevels +Ignore gluBuild1DMipmaps +Ignore gluBuild2DMipmapLevels +Ignore gluBuild2DMipmaps +Ignore gluBuild3DMipmapLevels +Ignore gluBuild3DMipmaps +Ignore gluScaleImage + +# Custom Java code for GLU class +IncludeAs CustomJavaCode GLU glu-CustomJavaCode-gles1_if.java + +Include glu-common.cfg + +Import javax.media.opengl.* +Import java.lang.reflect.* diff --git a/make/glu-gl2.cfg b/make/glu-gl2.cfg new file mode 100755 index 000000000..9a228422d --- /dev/null +++ b/make/glu-gl2.cfg @@ -0,0 +1,81 @@ +# This .cfg file provides common options used among gl2 GLU glue code +# generated for Jogl on all platforms. +Style ImplOnly +ImplPackage javax.media.opengl.glu.gl2 +ImplJavaClass GLUgl2 +ParentClass GLUgl2 GLU + +CustomCCode #if defined(WIN32) +CustomCCode #define WIN32_LEAN_AND_MEAN +CustomCCode #include <windows.h> +CustomCCode #undef WIN32_LEAN_AND_MEAN +CustomCCode +CustomCCode #include <stddef.h> +CustomCCode #elif defined(macosx) +CustomCCode #include <inttypes.h> +CustomCCode #include <jni.h> +CustomCCode #include </usr/include/machine/types.h> +CustomCCode #elif defined(linux) || defined(__sun) || defined(__FreeBSD__) || defined(_HPUX) +CustomCCode #include <inttypes.h> +CustomCCode #endif + +Include intptr.cfg + +EmitProcAddressTable true +ProcAddressTablePackage com.sun.opengl.impl.glu.gl2 +ProcAddressTableClassName GLUgl2ProcAddressTable +GetProcAddressTableExpr getGLUProcAddressTable() + +CustomCCode /* Include the OpenGL GLU header */ +CustomCCode #include <GL/glu.h> + +# Custom Java code for GLU class +IncludeAs CustomJavaCode GLUgl2 glu-CustomJavaCode-gl2.java + +# GLU needs access to the GLUtesselatorImpl class for GLUtesselator, +# to the Mipmap class for scaling and mipmap generation, +# and to the nurbs.* package for the NURBS functionality +Import javax.media.opengl.glu.GLU +Import javax.media.opengl.GL2 +Import javax.media.opengl.util.* +Import com.sun.opengl.impl.gl2.ProjectDouble +Import com.sun.opengl.impl.glu.error.Error +Import com.sun.opengl.impl.glu.tessellator.GLUtessellatorImpl +Import com.sun.opengl.impl.glu.registry.Registry +Import com.sun.opengl.impl.glu.nurbs.* +Import com.sun.opengl.impl.glu.gl2.* +Import com.sun.opengl.impl.glu.gl2.nurbs.* +Import com.sun.opengl.impl.glu.mipmap.Mipmap +Import java.security.* + +# +# ------------------------ +# Mipmape +# ------------------------ +# +# Ignore the C versions of the mipmap code in the public interface and +# use GKW's Java port instead. The bindings to the C entry points are +# still being left in for now, but only for debugging purposes and the +# intent is to remove them in a future release. + +# Emit these entry points as private + +AccessControl gluBuild1DMipmapLevels PRIVATE +AccessControl gluBuild1DMipmaps PRIVATE +AccessControl gluBuild2DMipmapLevels PRIVATE +AccessControl gluBuild2DMipmaps PRIVATE +AccessControl gluBuild3DMipmapLevels PRIVATE +AccessControl gluBuild3DMipmaps PRIVATE +AccessControl gluScaleImage PRIVATE + +# Rename these methods in the implementing class + +RenameJavaMethod gluBuild1DMipmapLevels gluBuild1DMipmapLevelsC +RenameJavaMethod gluBuild1DMipmaps gluBuild1DMipmapsC +RenameJavaMethod gluBuild2DMipmapLevels gluBuild2DMipmapLevelsC +RenameJavaMethod gluBuild2DMipmaps gluBuild2DMipmapsC +RenameJavaMethod gluBuild3DMipmapLevels gluBuild3DMipmapLevelsC +RenameJavaMethod gluBuild3DMipmaps gluBuild3DMipmapsC +RenameJavaMethod gluScaleImage gluScaleImageC + +Include glu-common.cfg diff --git a/make/glx-CustomCCode.c b/make/glx-CustomCCode.c index 2beaa0b2b..345f13e47 100755 --- a/make/glx-CustomCCode.c +++ b/make/glx-CustomCCode.c @@ -47,38 +47,6 @@ Bool XF86VidModeSetGammaRamp( #define RTLD_DEFAULT NULL #endif -/* Need to expose DefaultScreen and RootWindow macros to Java */ -JNIEXPORT jlong JNICALL -Java_com_sun_opengl_impl_x11_GLX_DefaultScreen(JNIEnv *env, jclass _unused, jlong display) { - return DefaultScreen((Display*) (intptr_t) display); -} -JNIEXPORT jlong JNICALL -Java_com_sun_opengl_impl_x11_GLX_RootWindow(JNIEnv *env, jclass _unused, jlong display, jint screen) { - return RootWindow((Display*) (intptr_t) display, screen); -} - -JNIEXPORT jlong JNICALL -Java_com_sun_opengl_impl_x11_GLX_dlopen(JNIEnv *env, jclass _unused, jstring name) { - const jbyte* chars; - void* res; - chars = (*env)->GetStringUTFChars(env, name, NULL); - res = dlopen(chars, RTLD_LAZY | RTLD_GLOBAL); - (*env)->ReleaseStringUTFChars(env, name, chars); - return (jlong) ((intptr_t) res); -} - -JNIEXPORT jlong JNICALL -Java_com_sun_opengl_impl_x11_GLX_dlsym(JNIEnv *env, jclass _unused, jstring name) { - const jbyte* chars; - void* res; - chars = (*env)->GetStringUTFChars(env, name, NULL); - res = dlsym(RTLD_DEFAULT, chars); - (*env)->ReleaseStringUTFChars(env, name, chars); - return (jlong) ((intptr_t) res); -} - /* We expect glXGetProcAddressARB to be defined */ extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); -/* Need to pull this in as we don't have a stub header for it */ -extern Bool XineramaEnabled(Display* display); diff --git a/make/glx-x11.cfg b/make/glx-x11.cfg index f1b853afe..71f71ddd2 100644 --- a/make/glx-x11.cfg +++ b/make/glx-x11.cfg @@ -1,9 +1,9 @@ # This .cfg file is used to generate the interface to the GLX routines # used internally by the X11GLContext implementation. -Package com.sun.opengl.impl.x11 +Package com.sun.opengl.impl.x11.glx JavaClass GLX Style allstatic -Include gl-common-x11.cfg +Include gl-common-gl2.cfg Include gl-desktop.cfg EmitProcAddressTable true @@ -12,32 +12,21 @@ GetProcAddressTableExpr glxProcAddressTable # This must be present for bootstrapping SkipProcAddressGen glXGetProcAddressARB +Import com.sun.opengl.impl.x11.* + CustomJavaCode GLX private static GLXProcAddressTable glxProcAddressTable = new GLXProcAddressTable(); CustomJavaCode GLX public static GLXProcAddressTable getGLXProcAddressTable() { return glxProcAddressTable; } -CustomJavaCode GLX public static native long dlopen(String name); -CustomJavaCode GLX public static native long dlsym(String name); IncludeAs CustomCCode glx-CustomCCode.c ArgumentIsString XOpenDisplay 0 -# Need to expose DefaultScreen and RootWindow macros to Java -CustomJavaCode GLX public static native int DefaultScreen(long display); -CustomJavaCode GLX public static native long RootWindow(long display, int screen); - -# Get returned array's capacity from XGetVisualInfo to be correct -TemporaryCVariableDeclaration XGetVisualInfo int count; -TemporaryCVariableAssignment XGetVisualInfo count = _ptr3[0]; -ReturnValueCapacity XGetVisualInfo count * sizeof(XVisualInfo) - -# Helper routine to make the ReturnedArrayLength expression below work correctly -CustomJavaCode GLX private static int getFirstElement(IntBuffer buf) { return buf.get(buf.position()); } -CustomJavaCode GLX private static int getFirstElement(int[] arr, int offset) { return arr[offset]; } -ReturnedArrayLength XGetVisualInfo getFirstElement({3}) ReturnValueCapacity glXChooseVisual sizeof(XVisualInfo) ReturnValueCapacity glXGetVisualFromFBConfig sizeof(XVisualInfo) ReturnValueCapacity glXGetVisualFromFBConfigSGIX sizeof(XVisualInfo) +Opaque long GLXFBConfig + # Ignore everything not in the GLX core (up through GLX 1.4) aside from glXGetProcAddress # FIXME: this needs to be kept in sync with the stub headers more than usual Ignore glXFreeContextEXT @@ -97,3 +86,4 @@ Ignore ^GL_.+ Ignore TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB Ignore CLAMP_TO_EDGE_EXT Ignore ^gl[^X].+ +Ignore ^X.+ diff --git a/make/glxext.cfg b/make/glxext.cfg index 1f4eb53ff..f412b4b63 100755 --- a/make/glxext.cfg +++ b/make/glxext.cfg @@ -1,17 +1,19 @@ # This .cfg file is used to generate the interface and implementing # class for the GLX extensions. -Package com.sun.opengl.impl.x11 +Package com.sun.opengl.impl.x11.glx Style InterfaceAndImpl JavaClass GLXExt -ImplPackage com.sun.opengl.impl.x11 +ImplPackage com.sun.opengl.impl.x11.glx ImplJavaClass GLXExtImpl -Include gl-common-x11.cfg +Include gl-common-gl2.cfg Include gl-desktop.cfg EmitProcAddressTable true ProcAddressTableClassName GLXExtProcAddressTable GetProcAddressTableExpr _context.getGLXExtProcAddressTable() +Import com.sun.opengl.impl.x11.* + # Ignore everything that doesn't start with glX or GLX IgnoreNot ^(glX|GLX).+ @@ -39,7 +41,7 @@ CustomCCode typedef unsigned int* PUINT; CustomJavaCode GLXExt public boolean isFunctionAvailable(String glFunctionName); CustomJavaCode GLXExt public boolean isExtensionAvailable(String glExtensionName); -CustomJavaCode GLXExtImpl public GLXExtImpl(X11GLContext context) { +CustomJavaCode GLXExtImpl public GLXExtImpl(X11GLXContext context) { CustomJavaCode GLXExtImpl this._context = context; CustomJavaCode GLXExtImpl } @@ -53,7 +55,7 @@ CustomJavaCode GLXExtImpl { CustomJavaCode GLXExtImpl return _context.isExtensionAvailable(glExtensionName); CustomJavaCode GLXExtImpl } -CustomJavaCode GLXExtImpl private X11GLContext _context; +CustomJavaCode GLXExtImpl private X11GLXContext _context; # These Ignores cause the core GLX routines to be ignored from the diff --git a/make/intptr.cfg b/make/intptr.cfg index 0c2ac99a1..04c9605ec 100755 --- a/make/intptr.cfg +++ b/make/intptr.cfg @@ -1,3 +1,4 @@ +CustomCCode #ifdef WIN32 CustomCCode #ifdef _MSC_VER CustomCCode /* This typedef is apparently needed for Microsoft compilers before VC8, CustomCCode and on Windows CE */ @@ -11,3 +12,4 @@ CustomCCode #endif CustomCCode #else CustomCCode #include <inttypes.h> CustomCCode #endif +CustomCCode #endif diff --git a/make/jawt-macosx.cfg b/make/jawt-macosx.cfg index 5e78b251c..31f2cf911 100644 --- a/make/jawt-macosx.cfg +++ b/make/jawt-macosx.cfg @@ -22,7 +22,8 @@ CustomCCode #include <jawt.h> CustomCCode #include </usr/include/machine/types.h> import java.security.* -StructPackage JAWT_MacOSXDrawingSurfaceInfo com.sun.opengl.impl.macosx +import com.sun.opengl.impl.awt.* +StructPackage JAWT_MacOSXDrawingSurfaceInfo com.sun.opengl.impl.macosx.awt EmitStruct JAWT_MacOSXDrawingSurfaceInfo Implements JAWT_MacOSXDrawingSurfaceInfo JAWT_PlatformInfo diff --git a/make/jawt-win32.cfg b/make/jawt-win32.cfg index b4d5e8e39..a3ef041bc 100644 --- a/make/jawt-win32.cfg +++ b/make/jawt-win32.cfg @@ -3,8 +3,8 @@ Style AllStatic Package com.sun.opengl.impl.awt JavaClass JAWTFactory -JavaOutputDir ..\build\gensrc\classes -NativeOutputDir ..\build\gensrc\native\jogl +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl HierarchicalNativeOutput false @@ -22,7 +22,8 @@ CustomCCode #include <jawt.h> Include intptr.cfg import java.security.* -StructPackage JAWT_Win32DrawingSurfaceInfo com.sun.opengl.impl.windows +import com.sun.opengl.impl.awt.* +StructPackage JAWT_Win32DrawingSurfaceInfo com.sun.opengl.impl.windows.awt EmitStruct JAWT_Win32DrawingSurfaceInfo Implements JAWT_Win32DrawingSurfaceInfo JAWT_PlatformInfo diff --git a/make/jawt-x11.cfg b/make/jawt-x11.cfg index 9f0d07b4f..8dd54080c 100644 --- a/make/jawt-x11.cfg +++ b/make/jawt-x11.cfg @@ -22,7 +22,8 @@ CustomCCode #include <inttypes.h> CustomCCode #include <jawt.h> import java.security.* -StructPackage JAWT_X11DrawingSurfaceInfo com.sun.opengl.impl.x11 +import com.sun.opengl.impl.awt.* +StructPackage JAWT_X11DrawingSurfaceInfo com.sun.opengl.impl.x11.awt EmitStruct JAWT_X11DrawingSurfaceInfo Implements JAWT_X11DrawingSurfaceInfo JAWT_PlatformInfo diff --git a/make/lstjars.sh b/make/lstjars.sh new file mode 100644 index 000000000..b75dc321d --- /dev/null +++ b/make/lstjars.sh @@ -0,0 +1,41 @@ +#! /bin/sh + +cd ../build + +rm -f *.lst + +for i in *.jar ; do + fname=$i + bname=$(basename $fname .jar) + echo list $fname to $bname.lst + jar tf $fname | grep class | sort > $bname.lst +done + +mv jogl.all.lst jogl.all.lst.nope + +echo duplicates +echo +sort *.lst | uniq -d + +cat *.lst | sort > jogl.allparts.lst +mv jogl.all.lst.nope jogl.all.lst + +echo jogl.all bs jogl.allparts delta +echo +diff -Nur jogl.allparts.lst jogl.all.lst + +echo JOGL ES1 NEWT CORE +du -ksc jogl.core.jar jogl.egl.jar jogl.gles1.jar jogl.newt.jar +echo + +echo JOGL ES2 NEWT CORE +du -ksc jogl.core.jar jogl.egl.jar jogl.gles2.jar jogl.newt.jar +echo + +echo JOGL GL2 OSWIN CORE no AWT +du -ksc jogl.core.jar jogl.oswin.jar jogl.gl2.jar +echo + +echo JOGL GL2 OSWIN with AWT +du -ksc jogl.core.jar jogl.oswin.jar jogl.gl2.jar +echo diff --git a/make/make.jogl.all.sh b/make/make.jogl.all.sh new file mode 100644 index 000000000..5fbc8781b --- /dev/null +++ b/make/make.jogl.all.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +. ../../setenv-build-jogl.sh + +ant -v $* 2>&1 | tee make.jogl.all.log diff --git a/make/make.jogl.cdc.es1x.sh b/make/make.jogl.cdc.es1x.sh new file mode 100644 index 000000000..7bd75ebf8 --- /dev/null +++ b/make/make.jogl.cdc.es1x.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +. ../../setenv-build-jogl.sh + +ant -v -Djogl.cdcfp=1 -Djogl.es1=1 $* 2>&1 | tee make.jogl.cdc.es1x.log diff --git a/make/make.jogl.doc.all.sh b/make/make.jogl.doc.all.sh new file mode 100644 index 000000000..5f6f90368 --- /dev/null +++ b/make/make.jogl.doc.all.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +. ../../setenv-build-jogl.sh + +ant -v javadoc.dev.all $* 2>&1 | tee make.jogl.doc.all.log diff --git a/make/make.jogl.es1x.sh b/make/make.jogl.es1x.sh new file mode 100644 index 000000000..4661bf75b --- /dev/null +++ b/make/make.jogl.es1x.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +. ../../setenv-build-jogl.sh + +ant -v -Djogl.es1=1 $* 2>&1 | tee make.jogl.es1x.log diff --git a/make/make.jogl.gl2.sh b/make/make.jogl.gl2.sh new file mode 100644 index 000000000..c8d69485e --- /dev/null +++ b/make/make.jogl.gl2.sh @@ -0,0 +1,5 @@ +#! /bin/sh + +. ../../setenv-build-jogl.sh + +ant 2>&1 | tee make.jogl.gl2.x86_32.log diff --git a/make/stub_includes/x11/window-lib.c b/make/stub_includes/x11/window-lib.c new file mode 100644 index 000000000..36092e85f --- /dev/null +++ b/make/stub_includes/x11/window-lib.c @@ -0,0 +1,58 @@ +#include <X11/Xlib.h> +#include <X11/Xutil.h> + +// Routines needed from Xlib.h and Xutil.h (placed here to avoid having +// XVisualInfo generated multiple times) +#ifndef _Xconst +#define _Xconst const +#endif /* _Xconst */ + +extern Display *XOpenDisplay( + _Xconst char* /* display_name */ +); + +extern XVisualInfo *XGetVisualInfo( + Display* /* display */, + long /* vinfo_mask */, + XVisualInfo* /* vinfo_template */, + int* /* nitems_return */ +); + +extern Pixmap XCreatePixmap( + Display* /* display */, + Drawable /* d */, + unsigned int /* width */, + unsigned int /* height */, + unsigned int /* depth */ +); + +extern int XFreePixmap( + Display* /* display */, + Pixmap /* pixmap */ +); + +// Helper routine for querying whether Xinerama is enabled. +Bool XineramaEnabled(Display* display); + +// Routines for changing gamma settings. +// Note that these are not currently supported on Solaris. +Bool XF86VidModeGetGammaRampSize( + Display *display, + int screen, + int* size); + +Bool XF86VidModeGetGammaRamp( + Display *display, + int screen, + int size, + unsigned short *red_array, + unsigned short *green_array, + unsigned short *blue_array); + +Bool XF86VidModeSetGammaRamp( + Display *display, + int screen, + int size, + unsigned short *red_array, + unsigned short *green_array, + unsigned short *blue_array); diff --git a/make/stub_includes/x11/window-system.c b/make/stub_includes/x11/window-system.c index 20cb91a08..e718aee97 100644 --- a/make/stub_includes/x11/window-system.c +++ b/make/stub_includes/x11/window-system.c @@ -12,52 +12,3 @@ #define _Xconst const #endif /* _Xconst */ -extern Display *XOpenDisplay( - _Xconst char* /* display_name */ -); - -extern XVisualInfo *XGetVisualInfo( - Display* /* display */, - long /* vinfo_mask */, - XVisualInfo* /* vinfo_template */, - int* /* nitems_return */ -); - -extern Pixmap XCreatePixmap( - Display* /* display */, - Drawable /* d */, - unsigned int /* width */, - unsigned int /* height */, - unsigned int /* depth */ -); - -extern int XFreePixmap( - Display* /* display */, - Pixmap /* pixmap */ -); - -// Helper routine for querying whether Xinerama is enabled. -Bool XineramaEnabled(Display* display); - -// Routines for changing gamma settings. -// Note that these are not currently supported on Solaris. -Bool XF86VidModeGetGammaRampSize( - Display *display, - int screen, - int* size); - -Bool XF86VidModeGetGammaRamp( - Display *display, - int screen, - int size, - unsigned short *red_array, - unsigned short *green_array, - unsigned short *blue_array); - -Bool XF86VidModeSetGammaRamp( - Display *display, - int screen, - int size, - unsigned short *red_array, - unsigned short *green_array, - unsigned short *blue_array); diff --git a/make/wgl-win32.cfg b/make/wgl-win32.cfg new file mode 100644 index 000000000..5065ffeea --- /dev/null +++ b/make/wgl-win32.cfg @@ -0,0 +1,26 @@ +# This .cfg file is used to generate the interface to the wgl routines +# used internally by the WindowsGLContext implementation. +Package com.sun.opengl.impl.windows.wgl +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl +JavaClass WGL +Style allstatic +Include gl-common-gl2.cfg +Include gl-desktop.cfg + +# Implement the first argument to wglGetProcAddress as String instead +# of byte[] +ArgumentIsString wglGetProcAddress 0 +ArgumentIsString LoadLibraryA 0 +ArgumentIsString GetProcAddress 1 + +CustomCCode #define WIN32_LEAN_AND_MEAN +CustomCCode #include <windows.h> +CustomCCode #undef WIN32_LEAN_AND_MEAN + +CustomCCode #include <wingdi.h> +CustomCCode #include <stddef.h> + +Include intptr.cfg + +IncludeAs CustomCCode wgl-CustomCCode.c diff --git a/make/wglext.cfg b/make/wglext.cfg index 25b4a0f41..346f56148 100644 --- a/make/wglext.cfg +++ b/make/wglext.cfg @@ -1,11 +1,11 @@ # This .cfg file is used to generate the interface and implementing # class for the WGL extensions. -Package com.sun.opengl.impl.windows +Package com.sun.opengl.impl.windows.wgl Style InterfaceAndImpl JavaClass WGLExt -ImplPackage com.sun.opengl.impl.windows +ImplPackage com.sun.opengl.impl.windows.wgl ImplJavaClass WGLExtImpl -Include gl-common-win32.cfg +Include gl-common-gl2.cfg Include gl-desktop.cfg EmitProcAddressTable true @@ -40,7 +40,7 @@ Include intptr.cfg CustomJavaCode WGLExt public boolean isFunctionAvailable(String glFunctionName); CustomJavaCode WGLExt public boolean isExtensionAvailable(String glExtensionName); -CustomJavaCode WGLExtImpl public WGLExtImpl(WindowsGLContext context) { +CustomJavaCode WGLExtImpl public WGLExtImpl(WindowsWGLContext context) { CustomJavaCode WGLExtImpl this._context = context; CustomJavaCode WGLExtImpl } @@ -54,4 +54,4 @@ CustomJavaCode WGLExtImpl { CustomJavaCode WGLExtImpl return _context.isExtensionAvailable(glExtensionName); CustomJavaCode WGLExtImpl } -CustomJavaCode WGLExtImpl private WindowsGLContext _context; +CustomJavaCode WGLExtImpl private WindowsWGLContext _context; diff --git a/make/x11-CustomCCode.c b/make/x11-CustomCCode.c new file mode 100755 index 000000000..a2a19a782 --- /dev/null +++ b/make/x11-CustomCCode.c @@ -0,0 +1,82 @@ +#include <inttypes.h> +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <GL/glx.h> +/* Linux headers don't work properly */ +#define __USE_GNU +#include <dlfcn.h> +#undef __USE_GNU + +/* Current versions of Solaris don't expose the XF86 extensions, + although with the recent transition to Xorg this will probably + happen in an upcoming release */ +#if !defined(__sun) && !defined(_HPUX) +#include <X11/extensions/xf86vmode.h> +#else +/* Need to provide stubs for these */ +Bool XF86VidModeGetGammaRampSize( + Display *display, + int screen, + int* size) +{ + return False; +} + +Bool XF86VidModeGetGammaRamp( + Display *display, + int screen, + int size, + unsigned short *red_array, + unsigned short *green_array, + unsigned short *blue_array) { + return False; +} +Bool XF86VidModeSetGammaRamp( + Display *display, + int screen, + int size, + unsigned short *red_array, + unsigned short *green_array, + unsigned short *blue_array) { + return False; +} +#endif + +/* HP-UX doesn't define RTLD_DEFAULT. */ +#if defined(_HPUX) && !defined(RTLD_DEFAULT) +#define RTLD_DEFAULT NULL +#endif + +/* Need to expose DefaultScreen and RootWindow macros to Java */ +JNIEXPORT jlong JNICALL +Java_com_sun_opengl_impl_x11_X11Lib_DefaultScreen(JNIEnv *env, jclass _unused, jlong display) { + return DefaultScreen((Display*) (intptr_t) display); +} +JNIEXPORT jlong JNICALL +Java_com_sun_opengl_impl_x11_X11Lib_RootWindow(JNIEnv *env, jclass _unused, jlong display, jint screen) { + return RootWindow((Display*) (intptr_t) display, screen); +} + +JNIEXPORT jlong JNICALL +Java_com_sun_opengl_impl_x11_X11Lib_dlopen(JNIEnv *env, jclass _unused, jstring name) { + const jbyte* chars; + void* res; + chars = (*env)->GetStringUTFChars(env, name, NULL); + res = dlopen(chars, RTLD_LAZY | RTLD_GLOBAL); + (*env)->ReleaseStringUTFChars(env, name, chars); + return (jlong) ((intptr_t) res); +} + +JNIEXPORT jlong JNICALL +Java_com_sun_opengl_impl_x11_X11Lib_dlsym(JNIEnv *env, jclass _unused, jstring name) { + const jbyte* chars; + void* res; + chars = (*env)->GetStringUTFChars(env, name, NULL); + res = dlsym(RTLD_DEFAULT, chars); + (*env)->ReleaseStringUTFChars(env, name, chars); + return (jlong) ((intptr_t) res); +} + +/* Need to pull this in as we don't have a stub header for it */ +extern Bool XineramaEnabled(Display* display); + diff --git a/make/x11-lib.cfg b/make/x11-lib.cfg new file mode 100644 index 000000000..d0b9e8c45 --- /dev/null +++ b/make/x11-lib.cfg @@ -0,0 +1,46 @@ +# This .cfg file is used to generate the interface to the GLX routines +# used internally by the X11GLContext implementation. +Package com.sun.opengl.impl.x11 +JavaClass X11Lib +Style allstatic + +HierarchicalNativeOutput false + +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl + +# Imports needed by all glue code +Import java.nio.* +Import java.util.* + +# XID needs to be treated as a long for 32/64 bit compatibility +Opaque long XID + +Opaque long Display * +Opaque boolean Bool +Opaque long GLXFBConfig + +CustomJavaCode X11Lib public static native long dlopen(String name); +CustomJavaCode X11Lib public static native long dlsym(String name); + +IncludeAs CustomCCode x11-CustomCCode.c + +ArgumentIsString XOpenDisplay 0 + +# Need to expose DefaultScreen and RootWindow macros to Java +CustomJavaCode X11Lib public static native int DefaultScreen(long display); +CustomJavaCode X11Lib public static native long RootWindow(long display, int screen); + +# Get returned array's capacity from XGetVisualInfo to be correct +TemporaryCVariableDeclaration XGetVisualInfo int count; +TemporaryCVariableAssignment XGetVisualInfo count = _ptr3[0]; +ReturnValueCapacity XGetVisualInfo count * sizeof(XVisualInfo) + +# Helper routine to make the ReturnedArrayLength expression below work correctly +CustomJavaCode X11Lib private static int getFirstElement(IntBuffer buf) { return buf.get(buf.position()); } +CustomJavaCode X11Lib private static int getFirstElement(int[] arr, int offset) { return arr[offset]; } +ReturnedArrayLength XGetVisualInfo getFirstElement({3}) + +# Ignore all GLX and GL stuff +Ignore ^GL_.+ +Ignore ^gl.+ |