diff options
Diffstat (limited to 'make')
-rw-r--r-- | make/build.xml | 86 | ||||
-rw-r--r-- | make/cgl-macosx.cfg | 2 | ||||
-rwxr-xr-x | make/egl.cfg | 83 | ||||
-rwxr-xr-x | make/gl-common-es1.cfg | 3 | ||||
-rw-r--r-- | make/gl-common.cfg | 56 | ||||
-rwxr-xr-x | make/gl-desktop.cfg | 66 | ||||
-rwxr-xr-x | make/gl-es1.cfg | 149 | ||||
-rwxr-xr-x | make/gl-es2.cfg | 149 | ||||
-rw-r--r-- | make/glx-x11.cfg | 1 | ||||
-rwxr-xr-x | make/stub_includes/egl/EGL/egl.h | 324 | ||||
-rwxr-xr-x | make/stub_includes/egl/EGL/eglext.h | 241 | ||||
-rwxr-xr-x | make/stub_includes/egl/EGL/eglplatform.h | 57 | ||||
-rwxr-xr-x | make/stub_includes/gluegen_egl/EGL/egl.h | 326 | ||||
-rwxr-xr-x | make/stub_includes/gluegen_egl/EGL/eglext.h | 241 | ||||
-rwxr-xr-x | make/stub_includes/gluegen_egl/EGL/eglplatform.h | 57 | ||||
-rwxr-xr-x | make/stub_includes/gluegen_egl/window-system.c | 1 |
16 files changed, 1742 insertions, 100 deletions
diff --git a/make/build.xml b/make/build.xml index 7119ce631..1e67a7cdf 100644 --- a/make/build.xml +++ b/make/build.xml @@ -136,27 +136,7 @@ <!-- - Declare all paths and user defined variables. --> - <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="javax/media/opengl/AWTGraphicsConfiguration.java, javax/media/opengl/AWTGraphicsDevice.java, javax/media/opengl/ComponentEvents.java, javax/media/opengl/GLCanvas.java, javax/media/opengl/GLJPanel.java, com/sun/opengl/util/j2d/**, 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/JOGLAppletLauncher.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/Java2D.java, com/sun/opengl/impl/Java2DGLContext.java, com/sun/opengl/impl/JAWT_PlatformInfo.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/**, com/sun/opengl/impl/windows/**, com/sun/opengl/impl/x11/**, com/sun/opengl/impl/macosx/**" /> - </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="javax/media/opengl/AWTGraphicsConfiguration.java, javax/media/opengl/AWTGraphicsDevice.java, javax/media/opengl/ComponentEvents.java, javax/media/opengl/GLCanvas.java, javax/media/opengl/GLJPanel.java, com/sun/opengl/util/j2d/**, 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/JOGLAppletLauncher.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/Java2D.java, com/sun/opengl/impl/Java2DGLContext.java, com/sun/opengl/impl/JAWT_PlatformInfo.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/**, com/sun/opengl/impl/windows/**, com/sun/opengl/impl/x11/**, com/sun/opengl/impl/macosx/**" /> - </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" /> - </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> - - <target name="declare.common" description="Declare properties" depends="setup.java.home.dir, gluegen.cpptasks.detect.compiler, declare.gl.gles, declare.gl.desktop"> + <target name="declare.common" description="Declare properties" depends="setup.java.home.dir, gluegen.cpptasks.detect.compiler"> <!-- The location and name of the configuration ANT file that will - validate to ensure that all user-define variables are set. --> <property name="validate.user.properties" value="${make}/validate-properties.xml" /> @@ -272,13 +252,6 @@ <property name="java.lib.dir.solaris" value="${java.home.dir}/jre/lib/${cpu}" /> <property name="java.lib.dir.macosx" value="/System/Library/Frameworks/JavaVM.framework/Libraries" /> - <!-- Java files to exclude based on platform (relative to "src.java") --> - <!-- NOTE: the OpenGL ES exclusions are due to references to unsupported APIs --> - <property name="java.excludes.win32.gles" value="com/sun/opengl/impl/windows/*.java" /> - <property name="java.excludes.win32" value="com/sun/opengl/impl/x11/**, com/sun/opengl/impl/macosx/**, ${java.excludes.gles}, ${java.excludes.win32.gles}" /> - <property name="java.excludes.x11" value="com/sun/opengl/impl/windows/**, com/sun/opengl/impl/macosx/**, ${java.excludes.gles}" /> - <property name="java.excludes.macosx" value="com/sun/opengl/impl/x11/**, com/sun/opengl/impl/windows/**, ${java.excludes.gles}" /> - <!-- Create the classpath that includes GlueGen and - ANTLR. This requires the user-defined "antlr.jar" - property. --> @@ -314,6 +287,41 @@ <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="javax/media/opengl/AWTGraphicsConfiguration.java, javax/media/opengl/AWTGraphicsDevice.java, javax/media/opengl/ComponentEvents.java, javax/media/opengl/GLCanvas.java, javax/media/opengl/GLJPanel.java, com/sun/opengl/util/j2d/**, 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/JOGLAppletLauncher.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/Java2D.java, com/sun/opengl/impl/Java2DGLContext.java, com/sun/opengl/impl/JAWT_PlatformInfo.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/**, com/sun/opengl/impl/windows/**, com/sun/opengl/impl/x11/**, com/sun/opengl/impl/macosx/**" /> + </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="javax/media/opengl/AWTGraphicsConfiguration.java, javax/media/opengl/AWTGraphicsDevice.java, javax/media/opengl/ComponentEvents.java, javax/media/opengl/GLCanvas.java, javax/media/opengl/GLJPanel.java, com/sun/opengl/util/j2d/**, 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/JOGLAppletLauncher.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/Java2D.java, com/sun/opengl/impl/Java2DGLContext.java, com/sun/opengl/impl/JAWT_PlatformInfo.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/**, com/sun/opengl/impl/windows/**, com/sun/opengl/impl/x11/**, com/sun/opengl/impl/macosx/**" /> + </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" /> + <!-- 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" /> + </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> + + <!-- 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 --> + <property name="java.excludes.win32.gles" value="com/sun/opengl/impl/windows/*.java" /> + <property name="java.excludes.win32" value="com/sun/opengl/impl/x11/**, com/sun/opengl/impl/macosx/**, ${java.excludes.gles}, ${java.excludes.win32.gles}" /> + <property name="java.excludes.x11" value="com/sun/opengl/impl/windows/**, com/sun/opengl/impl/macosx/**, ${java.excludes.gles}" /> + <property name="java.excludes.macosx" value="com/sun/opengl/impl/x11/**, com/sun/opengl/impl/windows/**, ${java.excludes.gles}" /> + </target> + <!-- ================================================================== --> <!-- - Platform specific declares. @@ -365,6 +373,11 @@ <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"> @@ -372,17 +385,14 @@ <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" /> - <property name="window.cfg" value="${config}/wingdi-win32.cfg" /> <!-- Set platform headers. --> <property name="glext.platform.header" value="${stub.includes.dir}/win32/wglext.c" /> <!-- Set platform directories. --> - <property name="stub.includes.platform" value="${stub.includes}/win32" /> <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}" /> - <property name="stub.includes.fileset.platform.params" value="${stub.includes.dir}/win32/** ${stub.includes.dir}/common/** ${stub.includes.dir}/opengl/**" /> <!-- Set Javadoc properties. --> <property name="javadoc.dev.packagenames.platform" value="${javadoc.dev.packagenames.win32}" /> @@ -518,7 +528,7 @@ - Initialize all parameters required for the build and create any - required directories. --> - <target name="init" depends="declare.common"> + <target name="init" depends="declare.common, declare.gl.gles, declare.gl.desktop, 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"/> @@ -609,7 +619,6 @@ </gluegen> </target> - <target name="java.generate.platform.glext" unless="isGLES"> <!-- Generate platform-specific extension class (WGLExt, GLXExt, etc.) --> <echo message="Generating platform-specific OpenGL extension class" /> @@ -621,11 +630,11 @@ </gluegen> </target> - <target name="java.generate.window.system" unless="isGLES"> - <!-- Generate WGL/GLX/CGL implementation class --> - <echo message="Generating WGL/GLX/CGL implementation class" /> + <target name="java.generate.window.system"> + <!-- Generate WGL/GLX/CGL/EGL implementation class --> + <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" + <gluegen src="${stub.includes.platform}/window-system.c" config="${window.cfg}" includeRefid="stub.includes.fileset.platform" emitter="com.sun.gluegen.opengl.GLEmitter"> @@ -668,7 +677,7 @@ <antcall target="java.generate.gl.nsig" inheritRefs="true" /> <!-- Generate platform-specific extension class (WGLExt, GLXExt, etc.) --> - <antcall target="java.generate.platform.glext" inheritRefs="true" /> + <antcall target="java.generate.platform.glext" inheritRefs="true" /> <!-- Generate WGL/GLX/CGL implementation class --> <antcall target="java.generate.window.system" inheritRefs="true" /> @@ -939,6 +948,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/cg" if="c.compiler.use-cglib"/> <!-- This is for the generated headers for handwritten C code --> diff --git a/make/cgl-macosx.cfg b/make/cgl-macosx.cfg index 7c31f7338..33613ecaf 100644 --- a/make/cgl-macosx.cfg +++ b/make/cgl-macosx.cfg @@ -6,6 +6,7 @@ NativeOutputDir ..\build\gensrc\native\jogl JavaClass CGL Style allstatic Include gl-common-macosx.cfg +Include gl-desktop.cfg Opaque long void * @@ -20,4 +21,3 @@ CustomCCode #include "macosx-window-system.h" # Implement the first argument to getProcAddress as String instead # of byte[] ArgumentIsString getProcAddress 0 - diff --git a/make/egl.cfg b/make/egl.cfg new file mode 100755 index 000000000..7cda3b8c8 --- /dev/null +++ b/make/egl.cfg @@ -0,0 +1,83 @@ +# 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 +JavaClass EGL +Style allstatic +# Shouldn't matter which one of these we pick up +Include gl-common-es1.cfg + +# Use a ProcAddressTable so we dynamically look up the routines +EmitProcAddressTable true +ProcAddressTableClassName EGLProcAddressTable +GetProcAddressTableExpr _table + +# Translate EGLBoolean as Java boolean +Opaque boolean EGLBoolean + +# Implement the first argument to eglGetProcAddress as String instead +# of byte[] +ArgumentIsString eglGetProcAddress 0 +ReturnsString eglQueryString + +# Make eglGetProcAddress return an opaque long +Opaque long __EGLFuncPtr + +# Force all of the methods to be emitted using dynamic linking so we +# don't need to link against any emulation library on the desktop or +# depend on the presence of an import library for a particular device +ForceProcAddressGen eglGetError +ForceProcAddressGen eglGetDisplay +ForceProcAddressGen eglInitialize +ForceProcAddressGen eglTerminate +ForceProcAddressGen eglQueryString +ForceProcAddressGen eglGetConfigs +ForceProcAddressGen eglChooseConfig +ForceProcAddressGen eglGetConfigAttrib +ForceProcAddressGen eglCreateWindowSurface +ForceProcAddressGen eglCreatePbufferSurface +ForceProcAddressGen eglCreatePixmapSurface +ForceProcAddressGen eglDestroySurface +ForceProcAddressGen eglQuerySurface +ForceProcAddressGen eglBindAPI +ForceProcAddressGen eglQueryAPI +ForceProcAddressGen eglWaitClient +ForceProcAddressGen eglReleaseThread +ForceProcAddressGen eglCreatePbufferFromClientBuffer +ForceProcAddressGen eglSurfaceAttrib +ForceProcAddressGen eglBindTexImage +ForceProcAddressGen eglReleaseTexImage +ForceProcAddressGen eglSwapInterval +ForceProcAddressGen eglCreateContext +ForceProcAddressGen eglDestroyContext +ForceProcAddressGen eglMakeCurrent +ForceProcAddressGen eglGetCurrentContext +ForceProcAddressGen eglGetCurrentSurface +ForceProcAddressGen eglGetCurrentDisplay +ForceProcAddressGen eglQueryContext +ForceProcAddressGen eglWaitGL +ForceProcAddressGen eglWaitNative +ForceProcAddressGen eglSwapBuffers +ForceProcAddressGen eglCopyBuffers +ForceProcAddressGen eglGetProcAddress + +# Treat all of the EGL types as opaque longs +# Opaque long EGLConfig +# Opaque long EGLContext +# Opaque long EGLDisplay +# Opaque long EGLSurface +# Opaque long EGLClientBuffer + +CustomCCode #include <EGL/egl.h> + +CustomCCode #ifdef _MSC_VER +CustomCCode /* This typedef is apparently needed for Microsoft compilers before VC8 */ +CustomCCode #if _MSC_VER < 1400 +CustomCCode typedef int intptr_t; +CustomCCode #endif +CustomCCode #else +CustomCCode #include <inttypes.h> +CustomCCode #endif + +CustomJavaCode EGL private static EGLProcAddressTable _table = new EGLProcAddressTable(); diff --git a/make/gl-common-es1.cfg b/make/gl-common-es1.cfg index 578312e79..e92fd4a02 100755 --- a/make/gl-common-es1.cfg +++ b/make/gl-common-es1.cfg @@ -5,3 +5,6 @@ HierarchicalNativeOutput false Include gl-common.cfg JavaOutputDir ../build/gensrc/classes NativeOutputDir ../build/gensrc/native/jogl + +# There are a few routines we don't handle yet +Ignore glGetBufferPointervOES diff --git a/make/gl-common.cfg b/make/gl-common.cfg index 771b34526..bdec29490 100644 --- a/make/gl-common.cfg +++ b/make/gl-common.cfg @@ -546,59 +546,3 @@ CustomJavaCode GL * use this extension mechanism, but it is being provided fo CustomJavaCode GL * completeness. CustomJavaCode GL */ CustomJavaCode GL public Object getExtension(String extensionName); - -# -# Directives needed when processing wglext.h on Windows and other platforms -# -Opaque boolean BOOL -ReturnsString wglGetExtensionsStringARB -ReturnsString wglGetExtensionsStringEXT -Opaque long HANDLE -Opaque long HBITMAP -Opaque long HDC -Opaque long HGDIOBJ -Opaque long HGLRC -Opaque long HPBUFFERARB -Opaque long HPBUFFEREXT -Opaque boolean BOOL -Opaque long PROC -Opaque long void ** - -# -# Directives needed when processing cglext.h on MacOSX and other platforms -# -Opaque long CGContextRef -Opaque long void ** -# Implement the first argument to cglGetProcAddress as String instead -# of byte[] -ArgumentIsString cglGetProcAddress 0 - -# -# Directives needed when processing glxext.h on X11 and other platforms -# -Opaque long __GLXextFuncPtr -Opaque boolean Bool -Opaque long Display * -Opaque long GLXContext -Opaque long Visual * -# Ignore the empty Display and Visual data structures (though made -# opaque, the references from XVisualInfo and elsewhere are still -# traversed) -Ignore Display -Ignore Visual -# Implement the first argument to glXGetProcAddress as String instead -# of byte[] -ArgumentIsString glXGetProcAddress 0 -ArgumentIsString glXGetProcAddressARB 0 -ReturnsString glXQueryExtensionsString -ReturnsString glXQueryServerString -ReturnsString glXGetClientString -TemporaryCVariableDeclaration glXChooseFBConfig int count; -TemporaryCVariableAssignment glXChooseFBConfig count = _ptr3[0]; -ReturnValueLength glXChooseFBConfig count -TemporaryCVariableDeclaration glXChooseFBConfigSGIX int count; -TemporaryCVariableAssignment glXChooseFBConfigSGIX count = _ptr3[0]; -ReturnValueLength glXChooseFBConfigSGIX count -TemporaryCVariableDeclaration glXGetFBConfigs int count; -TemporaryCVariableAssignment glXGetFBConfigs count = _ptr2[0]; -ReturnValueLength glXGetFBConfigs count diff --git a/make/gl-desktop.cfg b/make/gl-desktop.cfg index 808f02f94..c2e713d69 100755 --- a/make/gl-desktop.cfg +++ b/make/gl-desktop.cfg @@ -6,11 +6,6 @@ GLHeader GL/gl.h GLHeader GL/glext.h -# Right now the implementations for these don't work on the embedded -# OpenGL variants (FIXME) -JavaEpilogue glBufferData bufferSizeTracker.setBufferSize(bufferStateTracker, {0}, this, {1}); -JavaEpilogue glBufferDataARB bufferSizeTracker.setBufferSize(bufferStateTracker, {0}, this, {1}); - # There are no PBOs in the embedded OpenGL variants right now BufferObjectKind UnpackPixel glBitmap BufferObjectKind UnpackPixel glColorTable @@ -99,3 +94,64 @@ JavaEpilogue glDeleteShader if (tracker != null) tracker.removeShade 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 +# +Opaque boolean BOOL +ReturnsString wglGetExtensionsStringARB +ReturnsString wglGetExtensionsStringEXT +Opaque long HANDLE +Opaque long HBITMAP +Opaque long HDC +Opaque long HGDIOBJ +Opaque long HGLRC +Opaque long HPBUFFERARB +Opaque long HPBUFFEREXT +Opaque boolean BOOL +Opaque long PROC +Opaque long void ** + +# +# Directives needed when processing cglext.h on MacOSX and other platforms +# +Opaque long CGContextRef +Opaque long void ** +# Implement the first argument to cglGetProcAddress as String instead +# of byte[] +ArgumentIsString cglGetProcAddress 0 + +# +# Directives needed when processing glxext.h on X11 and other platforms +# +Opaque long __GLXextFuncPtr +Opaque boolean Bool +Opaque long Display * +Opaque long GLXContext +Opaque long Visual * +# Ignore the empty Display and Visual data structures (though made +# opaque, the references from XVisualInfo and elsewhere are still +# traversed) +Ignore Display +Ignore Visual +# Implement the first argument to glXGetProcAddress as String instead +# of byte[] +ArgumentIsString glXGetProcAddress 0 +ArgumentIsString glXGetProcAddressARB 0 +ReturnsString glXQueryExtensionsString +ReturnsString glXQueryServerString +ReturnsString glXGetClientString +TemporaryCVariableDeclaration glXChooseFBConfig int count; +TemporaryCVariableAssignment glXChooseFBConfig count = _ptr3[0]; +ReturnValueLength glXChooseFBConfig count +TemporaryCVariableDeclaration glXChooseFBConfigSGIX int count; +TemporaryCVariableAssignment glXChooseFBConfigSGIX count = _ptr3[0]; +ReturnValueLength glXChooseFBConfigSGIX count +TemporaryCVariableDeclaration glXGetFBConfigs int count; +TemporaryCVariableAssignment glXGetFBConfigs count = _ptr2[0]; +ReturnValueLength glXGetFBConfigs count + +# Right now the implementations for these don't work on the embedded +# OpenGL variants (FIXME) +JavaEpilogue glBufferData bufferSizeTracker.setBufferSize(bufferStateTracker, {0}, this, {1}); +JavaEpilogue glBufferDataARB bufferSizeTracker.setBufferSize(bufferStateTracker, {0}, this, {1}); diff --git a/make/gl-es1.cfg b/make/gl-es1.cfg index 4a3832bce..629d59330 100755 --- a/make/gl-es1.cfg +++ b/make/gl-es1.cfg @@ -18,6 +18,155 @@ 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 +ForceProcAddressGen glAlphaFunc +ForceProcAddressGen glClearColor +ForceProcAddressGen glClearDepthf +ForceProcAddressGen glClipPlanef +ForceProcAddressGen glColor4f +ForceProcAddressGen glDepthRangef +ForceProcAddressGen glFogf +ForceProcAddressGen glFogfv +ForceProcAddressGen glFrustumf +ForceProcAddressGen glGetClipPlanef +ForceProcAddressGen glGetFloatv +ForceProcAddressGen glGetLightfv +ForceProcAddressGen glGetMaterialfv +ForceProcAddressGen glGetTexEnvfv +ForceProcAddressGen glGetTexParameterfv +ForceProcAddressGen glLightModelf +ForceProcAddressGen glLightModelfv +ForceProcAddressGen glLightf +ForceProcAddressGen glLightfv +ForceProcAddressGen glLineWidth +ForceProcAddressGen glLoadMatrixf +ForceProcAddressGen glMaterialf +ForceProcAddressGen glMaterialfv +ForceProcAddressGen glMultMatrixf +ForceProcAddressGen glMultiTexCoord4f +ForceProcAddressGen glNormal3f +ForceProcAddressGen glOrthof +ForceProcAddressGen glPointParameterf +ForceProcAddressGen glPointParameterfv +ForceProcAddressGen glPointSize +ForceProcAddressGen glPolygonOffset +ForceProcAddressGen glRotatef +ForceProcAddressGen glScalef +ForceProcAddressGen glTexEnvf +ForceProcAddressGen glTexEnvfv +ForceProcAddressGen glTexParameterf +ForceProcAddressGen glTexParameterfv +ForceProcAddressGen glTranslatef +ForceProcAddressGen glActiveTexture +ForceProcAddressGen glAlphaFuncx +ForceProcAddressGen glBindBuffer +ForceProcAddressGen glBindTexture +ForceProcAddressGen glBlendFunc +ForceProcAddressGen glBufferData +ForceProcAddressGen glBufferSubData +ForceProcAddressGen glClear +ForceProcAddressGen glClearColorx +ForceProcAddressGen glClearDepthx +ForceProcAddressGen glClearStencil +ForceProcAddressGen glClientActiveTexture +ForceProcAddressGen glClipPlanex +ForceProcAddressGen glColor4ub +ForceProcAddressGen glColor4x +ForceProcAddressGen glColorMask +ForceProcAddressGen glColorPointer +ForceProcAddressGen glCompressedTexImage2D +ForceProcAddressGen glCompressedTexSubImage2D +ForceProcAddressGen glCopyTexImage2D +ForceProcAddressGen glCopyTexSubImage2D +ForceProcAddressGen glCullFace +ForceProcAddressGen glDeleteBuffers +ForceProcAddressGen glDeleteTextures +ForceProcAddressGen glDepthFunc +ForceProcAddressGen glDepthMask +ForceProcAddressGen glDepthRangex +ForceProcAddressGen glDisable +ForceProcAddressGen glDisableClientState +ForceProcAddressGen glDrawArrays +ForceProcAddressGen glDrawElements +ForceProcAddressGen glEnable +ForceProcAddressGen glEnableClientState +ForceProcAddressGen glFinish +ForceProcAddressGen glFlush +ForceProcAddressGen glFogx +ForceProcAddressGen glFogxv +ForceProcAddressGen glFrontFace +ForceProcAddressGen glFrustumx +ForceProcAddressGen glGetBooleanv +ForceProcAddressGen glGetBufferParameteriv +ForceProcAddressGen glGetClipPlanex +ForceProcAddressGen glGenBuffers +ForceProcAddressGen glGenTextures +ForceProcAddressGen glGetError +ForceProcAddressGen glGetFixedv +ForceProcAddressGen glGetIntegerv +ForceProcAddressGen glGetLightxv +ForceProcAddressGen glGetMaterialxv +ForceProcAddressGen glGetPointerv +ForceProcAddressGen glGetString +ForceProcAddressGen glGetTexEnviv +ForceProcAddressGen glGetTexEnvxv +ForceProcAddressGen glGetTexParameteriv +ForceProcAddressGen glGetTexParameterxv +ForceProcAddressGen glHint +ForceProcAddressGen glIsBuffer +ForceProcAddressGen glIsEnabled +ForceProcAddressGen glIsTexture +ForceProcAddressGen glLightModelx +ForceProcAddressGen glLightModelxv +ForceProcAddressGen glLightx +ForceProcAddressGen glLightxv +ForceProcAddressGen glLineWidthx +ForceProcAddressGen glLoadIdentity +ForceProcAddressGen glLoadMatrixx +ForceProcAddressGen glLogicOp +ForceProcAddressGen glMaterialx +ForceProcAddressGen glMaterialxv +ForceProcAddressGen glMatrixMode +ForceProcAddressGen glMultMatrixx +ForceProcAddressGen glMultiTexCoord4x +ForceProcAddressGen glNormal3x +ForceProcAddressGen glNormalPointer +ForceProcAddressGen glOrthox +ForceProcAddressGen glPixelStorei +ForceProcAddressGen glPointParameterx +ForceProcAddressGen glPointParameterxv +ForceProcAddressGen glPointSizex +ForceProcAddressGen glPolygonOffsetx +ForceProcAddressGen glPopMatrix +ForceProcAddressGen glPushMatrix +ForceProcAddressGen glReadPixels +ForceProcAddressGen glRotatex +ForceProcAddressGen glSampleCoverage +ForceProcAddressGen glSampleCoveragex +ForceProcAddressGen glScalex +ForceProcAddressGen glScissor +ForceProcAddressGen glShadeModel +ForceProcAddressGen glStencilFunc +ForceProcAddressGen glStencilMask +ForceProcAddressGen glStencilOp +ForceProcAddressGen glTexCoordPointer +ForceProcAddressGen glTexEnvi +ForceProcAddressGen glTexEnvx +ForceProcAddressGen glTexEnviv +ForceProcAddressGen glTexEnvxv +ForceProcAddressGen glTexImage2D +ForceProcAddressGen glTexParameteri +ForceProcAddressGen glTexParameterx +ForceProcAddressGen glTexParameteriv +ForceProcAddressGen glTexParameterxv +ForceProcAddressGen glTexSubImage2D +ForceProcAddressGen glTranslatex +ForceProcAddressGen glVertexPointer +ForceProcAddressGen glViewport +ForceProcAddressGen glPointSizePointerOES + # Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums TagNativeBinding true diff --git a/make/gl-es2.cfg b/make/gl-es2.cfg index aa1ad8e26..f2e2194f3 100755 --- a/make/gl-es2.cfg +++ b/make/gl-es2.cfg @@ -18,6 +18,155 @@ 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 +ForceProcAddressGen glActiveTexture +ForceProcAddressGen glAttachShader +ForceProcAddressGen glBindAttribLocation +ForceProcAddressGen glBindBuffer +ForceProcAddressGen glBindFramebuffer +ForceProcAddressGen glBindRenderbuffer +ForceProcAddressGen glBindTexture +ForceProcAddressGen glBlendColor +ForceProcAddressGen glBlendEquation +ForceProcAddressGen glBlendEquationSeparate +ForceProcAddressGen glBlendFunc +ForceProcAddressGen glBlendFuncSeparate +ForceProcAddressGen glBufferData +ForceProcAddressGen glBufferSubData +ForceProcAddressGen glCheckFramebufferStatus +ForceProcAddressGen glClear +ForceProcAddressGen glClearColor +ForceProcAddressGen glClearDepthf +ForceProcAddressGen glClearStencil +ForceProcAddressGen glColorMask +ForceProcAddressGen glCompileShader +ForceProcAddressGen glCompressedTexImage2D +ForceProcAddressGen glCompressedTexSubImage2D +ForceProcAddressGen glCopyTexImage2D +ForceProcAddressGen glCopyTexSubImage2D +ForceProcAddressGen glCreateProgram +ForceProcAddressGen glCreateShader +ForceProcAddressGen glCullFace +ForceProcAddressGen glDeleteBuffers +ForceProcAddressGen glDeleteFramebuffers +ForceProcAddressGen glDeleteTextures +ForceProcAddressGen glDeleteProgram +ForceProcAddressGen glDeleteRenderbuffers +ForceProcAddressGen glDeleteShader +ForceProcAddressGen glDetachShader +ForceProcAddressGen glDepthFunc +ForceProcAddressGen glDepthMask +ForceProcAddressGen glDepthRangef +ForceProcAddressGen glDisable +ForceProcAddressGen glDisableVertexAttribArray +ForceProcAddressGen glDrawArrays +ForceProcAddressGen glDrawElements +ForceProcAddressGen glEnable +ForceProcAddressGen glEnableVertexAttribArray +ForceProcAddressGen glFinish +ForceProcAddressGen glFlush +ForceProcAddressGen glFramebufferRenderbuffer +ForceProcAddressGen glFramebufferTexture2D +ForceProcAddressGen glFrontFace +ForceProcAddressGen glGenBuffers +ForceProcAddressGen glGenerateMipmap +ForceProcAddressGen glGenFramebuffers +ForceProcAddressGen glGenRenderbuffers +ForceProcAddressGen glGenTextures +ForceProcAddressGen glGetActiveAttrib +ForceProcAddressGen glGetActiveUniform +ForceProcAddressGen glGetAttachedShaders +ForceProcAddressGen glGetAttribLocation +ForceProcAddressGen glGetBooleanv +ForceProcAddressGen glGetBufferParameteriv +ForceProcAddressGen glGetError +ForceProcAddressGen glGetFloatv +ForceProcAddressGen glGetFramebufferAttachmentParameteriv +ForceProcAddressGen glGetIntegerv +ForceProcAddressGen glGetProgramiv +ForceProcAddressGen glGetProgramInfoLog +ForceProcAddressGen glGetRenderbufferParameteriv +ForceProcAddressGen glGetShaderiv +ForceProcAddressGen glGetShaderInfoLog +ForceProcAddressGen glGetShaderPrecisionFormat +ForceProcAddressGen glGetShaderSource +ForceProcAddressGen glGetString +ForceProcAddressGen glGetTexParameterfv +ForceProcAddressGen glGetTexParameteriv +ForceProcAddressGen glGetUniformfv +ForceProcAddressGen glGetUniformiv +ForceProcAddressGen glGetUniformLocation +ForceProcAddressGen glGetVertexAttribfv +ForceProcAddressGen glGetVertexAttribiv +ForceProcAddressGen glGetVertexAttribPointerv +ForceProcAddressGen glHint +ForceProcAddressGen glIsBuffer +ForceProcAddressGen glIsEnabled +ForceProcAddressGen glIsFramebuffer +ForceProcAddressGen glIsProgram +ForceProcAddressGen glIsRenderbuffer +ForceProcAddressGen glIsShader +ForceProcAddressGen glIsTexture +ForceProcAddressGen glLineWidth +ForceProcAddressGen glLinkProgram +ForceProcAddressGen glPixelStorei +ForceProcAddressGen glPolygonOffset +ForceProcAddressGen glReadPixels +ForceProcAddressGen glReleaseShaderCompiler +ForceProcAddressGen glRenderbufferStorage +ForceProcAddressGen glSampleCoverage +ForceProcAddressGen glScissor +ForceProcAddressGen glShaderBinary +ForceProcAddressGen glShaderSource +ForceProcAddressGen glStencilFunc +ForceProcAddressGen glStencilFuncSeparate +ForceProcAddressGen glStencilMask +ForceProcAddressGen glStencilMaskSeparate +ForceProcAddressGen glStencilOp +ForceProcAddressGen glStencilOpSeparate +ForceProcAddressGen glTexImage2D +ForceProcAddressGen glTexParameterf +ForceProcAddressGen glTexParameterfv +ForceProcAddressGen glTexParameteri +ForceProcAddressGen glTexParameteriv +ForceProcAddressGen glTexSubImage2D +ForceProcAddressGen glUniform1f +ForceProcAddressGen glUniform1fv +ForceProcAddressGen glUniform1i +ForceProcAddressGen glUniform1iv +ForceProcAddressGen glUniform2f +ForceProcAddressGen glUniform2fv +ForceProcAddressGen glUniform2i +ForceProcAddressGen glUniform2iv +ForceProcAddressGen glUniform3f +ForceProcAddressGen glUniform3fv +ForceProcAddressGen glUniform3i +ForceProcAddressGen glUniform3iv +ForceProcAddressGen glUniform4f +ForceProcAddressGen glUniform4fv +ForceProcAddressGen glUniform4i +ForceProcAddressGen glUniform4iv +ForceProcAddressGen glUniformMatrix2fv +ForceProcAddressGen glUniformMatrix3fv +ForceProcAddressGen glUniformMatrix4fv +ForceProcAddressGen glUseProgram +ForceProcAddressGen glValidateProgram +ForceProcAddressGen glVertexAttrib1f +ForceProcAddressGen glVertexAttrib1fv +ForceProcAddressGen glVertexAttrib2f +ForceProcAddressGen glVertexAttrib2fv +ForceProcAddressGen glVertexAttrib3f +ForceProcAddressGen glVertexAttrib3fv +ForceProcAddressGen glVertexAttrib4f +ForceProcAddressGen glVertexAttrib4fv +ForceProcAddressGen glVertexAttribPointer +ForceProcAddressGen glViewport + # Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums TagNativeBinding true diff --git a/make/glx-x11.cfg b/make/glx-x11.cfg index 93ff2d02f..f1b853afe 100644 --- a/make/glx-x11.cfg +++ b/make/glx-x11.cfg @@ -4,6 +4,7 @@ Package com.sun.opengl.impl.x11 JavaClass GLX Style allstatic Include gl-common-x11.cfg +Include gl-desktop.cfg EmitProcAddressTable true ProcAddressTableClassName GLXProcAddressTable diff --git a/make/stub_includes/egl/EGL/egl.h b/make/stub_includes/egl/EGL/egl.h new file mode 100755 index 000000000..6bfcc3200 --- /dev/null +++ b/make/stub_includes/egl/EGL/egl.h @@ -0,0 +1,324 @@ +/* -*- mode: c; tab-width: 8; -*- */ +/* vi: set sw=4 ts=8: */ +/* Reference version of egl.h for EGL 1.3. + * Last modified 2006/11/12 + */ + +/* +* Copyright (c) 2007 The Khronos Group Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining +* a copy of this software and associated documentation files (the +* "Software"), to deal in the Software without restriction, including +* without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to +* permit persons to whom the Software is furnished to do so, subject +* to the following conditions: +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +* +*/ + +/* + * Copyright (c) 2007 NVIDIA Corporation. All rights reserved. + * + * NVIDIA Corporation and its licensors retain all intellectual property + * and proprietary rights in and to this software, related documentation + * and any modifications thereto. Any use, reproduction, disclosure or + * distribution of this software and related documentation without an express + * license agreement from NVIDIA Corporation is strictly prohibited. + */ + +#ifndef __egl_h_ +#define __egl_h_ + +/* All platform-dependent types and macro boilerplate (such as EGLAPI + * and EGLAPIENTRY) should go in eglplatform.h. + */ +#include <EGL/eglplatform.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* EGL Types */ +typedef int EGLint; +typedef unsigned int EGLBoolean; +typedef unsigned int EGLenum; +typedef void *EGLConfig; +typedef void *EGLContext; +typedef void *EGLDisplay; +typedef void *EGLSurface; +typedef void *EGLClientBuffer; + +/* EGL Versioning */ +#define EGL_VERSION_1_0 1 +#define EGL_VERSION_1_1 1 +#define EGL_VERSION_1_2 1 +#define EGL_VERSION_1_3 1 + +/* EGL Enumerants. Bitmasks and other exceptional cases aside, most + * enums are assigned unique values starting at 0x3000. + */ + +/* EGL aliases */ +#define EGL_FALSE 0 +#define EGL_TRUE 1 + +/* Out-of-band handle values */ +#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) +#define EGL_NO_CONTEXT ((EGLContext)0) +#define EGL_NO_DISPLAY ((EGLDisplay)0) +#define EGL_NO_SURFACE ((EGLSurface)0) + +/* Out-of-band attribute value */ +#define EGL_DONT_CARE ((EGLint)-1) + +/* Errors / GetError return values */ +#define EGL_SUCCESS 0x3000 +#define EGL_NOT_INITIALIZED 0x3001 +#define EGL_BAD_ACCESS 0x3002 +#define EGL_BAD_ALLOC 0x3003 +#define EGL_BAD_ATTRIBUTE 0x3004 +#define EGL_BAD_CONFIG 0x3005 +#define EGL_BAD_CONTEXT 0x3006 +#define EGL_BAD_CURRENT_SURFACE 0x3007 +#define EGL_BAD_DISPLAY 0x3008 +#define EGL_BAD_MATCH 0x3009 +#define EGL_BAD_NATIVE_PIXMAP 0x300A +#define EGL_BAD_NATIVE_WINDOW 0x300B +#define EGL_BAD_PARAMETER 0x300C +#define EGL_BAD_SURFACE 0x300D +#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */ + +/* Reserved 0x300F-0x301F for additional errors */ + +/* Config attributes */ +#define EGL_BUFFER_SIZE 0x3020 +#define EGL_ALPHA_SIZE 0x3021 +#define EGL_BLUE_SIZE 0x3022 +#define EGL_GREEN_SIZE 0x3023 +#define EGL_RED_SIZE 0x3024 +#define EGL_DEPTH_SIZE 0x3025 +#define EGL_STENCIL_SIZE 0x3026 +#define EGL_CONFIG_CAVEAT 0x3027 +#define EGL_CONFIG_ID 0x3028 +#define EGL_LEVEL 0x3029 +#define EGL_MAX_PBUFFER_HEIGHT 0x302A +#define EGL_MAX_PBUFFER_PIXELS 0x302B +#define EGL_MAX_PBUFFER_WIDTH 0x302C +#define EGL_NATIVE_RENDERABLE 0x302D +#define EGL_NATIVE_VISUAL_ID 0x302E +#define EGL_NATIVE_VISUAL_TYPE 0x302F +#define EGL_PRESERVED_RESOURCES 0x3030 +#define EGL_SAMPLES 0x3031 +#define EGL_SAMPLE_BUFFERS 0x3032 +#define EGL_SURFACE_TYPE 0x3033 +#define EGL_TRANSPARENT_TYPE 0x3034 +#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 +#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 +#define EGL_TRANSPARENT_RED_VALUE 0x3037 +#define EGL_NONE 0x3038 /* Attrib list terminator */ +#define EGL_BIND_TO_TEXTURE_RGB 0x3039 +#define EGL_BIND_TO_TEXTURE_RGBA 0x303A +#define EGL_MIN_SWAP_INTERVAL 0x303B +#define EGL_MAX_SWAP_INTERVAL 0x303C +#define EGL_LUMINANCE_SIZE 0x303D +#define EGL_ALPHA_MASK_SIZE 0x303E +#define EGL_COLOR_BUFFER_TYPE 0x303F +#define EGL_RENDERABLE_TYPE 0x3040 +#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */ +#define EGL_CONFORMANT 0x3042 + +/* Reserved 0x3041-0x304F for additional config attributes */ + +/* Config attribute values */ +#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */ +#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */ +#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */ +#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */ +#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */ + +/* More config attribute values, for EGL_TEXTURE_FORMAT */ +#define EGL_NO_TEXTURE 0x305C +#define EGL_TEXTURE_RGB 0x305D +#define EGL_TEXTURE_RGBA 0x305E +#define EGL_TEXTURE_2D 0x305F + +/* Config attribute mask bits */ +#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */ + +#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */ + +/* QueryString targets */ +#define EGL_VENDOR 0x3053 +#define EGL_VERSION 0x3054 +#define EGL_EXTENSIONS 0x3055 +#define EGL_CLIENT_APIS 0x308D + +/* QuerySurface / CreatePbufferSurface targets */ +#define EGL_HEIGHT 0x3056 +#define EGL_WIDTH 0x3057 +#define EGL_LARGEST_PBUFFER 0x3058 +#define EGL_TEXTURE_FORMAT 0x3080 +#define EGL_TEXTURE_TARGET 0x3081 +#define EGL_MIPMAP_TEXTURE 0x3082 +#define EGL_MIPMAP_LEVEL 0x3083 +#define EGL_RENDER_BUFFER 0x3086 +#define EGL_VG_COLORSPACE 0x3087 +#define EGL_VG_ALPHA_FORMAT 0x3088 +#define EGL_HORIZONTAL_RESOLUTION 0x3090 +#define EGL_VERTICAL_RESOLUTION 0x3091 +#define EGL_PIXEL_ASPECT_RATIO 0x3092 +#define EGL_SWAP_BEHAVIOR 0x3093 + +/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */ +#define EGL_BACK_BUFFER 0x3084 +#define EGL_SINGLE_BUFFER 0x3085 + +/* OpenVG color spaces */ +#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */ +#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */ + +/* OpenVG alpha formats */ +#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_VG_ALPHA_FORMAT value */ +#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_VG_ALPHA_FORMAT value */ + +/* Constant scale factor by which fractional display resolutions & + * aspect ratio are scaled when queried as integer values. + */ +#define EGL_DISPLAY_SCALING 10000 + +/* Unknown display resolution/aspect ratio */ +#define EGL_UNKNOWN ((EGLint)-1) + +/* Back buffer swap behaviors */ +#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */ +#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */ + +/* CreatePbufferFromClientBuffer buffer types */ +#define EGL_OPENVG_IMAGE 0x3096 + +/* QueryContext targets */ +#define EGL_CONTEXT_CLIENT_TYPE 0x3097 + +/* CreateContext attributes */ +#define EGL_CONTEXT_CLIENT_VERSION 0x3098 + +/* BindAPI/QueryAPI targets */ +#define EGL_OPENGL_ES_API 0x30A0 +#define EGL_OPENVG_API 0x30A1 + +/* GetCurrentSurface targets */ +#define EGL_DRAW 0x3059 +#define EGL_READ 0x305A + +/* WaitNative engines */ +#define EGL_CORE_NATIVE_ENGINE 0x305B + +/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */ +#define EGL_COLORSPACE EGL_VG_COLORSPACE +#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT +#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB +#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR +#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE +#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE + +/* EGL extensions must request enum blocks from the Khronos + * API Registrar, who maintains the enumerant registry. Submit + * a bug in Khronos Bugzilla against task "Registry". + */ + + + +/* EGL Functions */ + +EGLAPI EGLint EGLAPIENTRY eglGetError(void); + +EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id); +EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor); +EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy); + +EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name); + +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, + EGLint config_size, EGLint *num_config); +EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, + EGLConfig *configs, EGLint config_size, + EGLint *num_config); +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, + EGLint attribute, EGLint *value); + +EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, + EGLNativeWindowType win, + const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, + const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, + EGLNativePixmapType pixmap, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface); +EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint *value); + +EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api); +EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void); + +EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void); + +EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void); + +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer( + EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, + EGLConfig config, const EGLint *attrib_list); + +EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint value); +EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); +EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); + + +EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval); + + +EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, + EGLContext share_context, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx); +EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, + EGLSurface read, EGLContext ctx); + +EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void); +EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw); +EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx, + EGLint attribute, EGLint *value); + +EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void); +EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine); +EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface); +EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, + EGLNativePixmapType target); + +typedef void (* EGLAPIENTRY __EGLFuncPtr)(void); +EGLAPI __EGLFuncPtr eglGetProcAddress(const char *procname); + +#ifdef __cplusplus +} +#endif + +#endif /* __egl_h_ */ diff --git a/make/stub_includes/egl/EGL/eglext.h b/make/stub_includes/egl/EGL/eglext.h new file mode 100755 index 000000000..c3f637754 --- /dev/null +++ b/make/stub_includes/egl/EGL/eglext.h @@ -0,0 +1,241 @@ +#ifndef __eglext_h_ +#define __eglext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* + * Copyright (c) 2007 NVIDIA Corporation. All rights reserved. + * + * NVIDIA Corporation and its licensors retain all intellectual property + * and proprietary rights in and to this software, related documentation + * and any modifications thereto. Any use, reproduction, disclosure or + * distribution of this software and related documentation without an express + * license agreement from NVIDIA Corporation is strictly prohibited. + */ + +#include <EGL/egl.h> +#include <EGL/eglplatform.h> + +/*************************************************************/ + +/* Header file version number */ +/* eglext.h last updated 2007/11/20 */ +/* Current version at http://www.khronos.org/registry/egl/ */ +#define EGL_EGLEXT_VERSION 1 + +#ifndef EGL_KHR_config_attribs +#define EGL_KHR_config_attribs 1 +#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */ +#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */ +#endif + +#ifndef EGL_KHR_lock_surface +#define EGL_KHR_lock_surface 1 +#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */ +#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */ +#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */ +#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */ +#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */ +#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */ +#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */ +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface); +#endif + +#ifndef EGL_KHR_image +#define EGL_KHR_image 1 +#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ +typedef void *EGLImageKHR; +#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); +#endif + +#ifndef EGL_KHR_vg_parent_image +#define EGL_KHR_vg_parent_image 1 +#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_2D_image +#define EGL_KHR_gl_texture_2D_image 1 +#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_texture_cubemap_image +#define EGL_KHR_gl_texture_cubemap_image 1 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_3D_image +#define EGL_KHR_gl_texture_3D_image 1 +#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_renderbuffer_image +#define EGL_KHR_gl_renderbuffer_image 1 +#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ +#endif + +// Supported NV Extensions + +// NOTE: EGL_KHR_bind_client_buffer == EGL_create_pbuffer_from_client_buffer +/* EGL_KHR_bind_client_buffer */ +#ifndef EGL_KHR_bind_client_buffer +#define EGL_create_pbuffer_from_client_buffer 1 +#define EGL_KHR_bind_client_buffer 1 +#define EGL_OPENVG_IMAGE_KHR EGL_OPENVG_IMAGE +#endif + +/* eglCreateImageKHR targets */ +/* eglCreateImageKHR target and eglCreatePbufferFromClientBuffer buftype */ + +/* EGL_NV_perfmon */ +#ifndef EGL_NV_perfmon +#define EGL_NV_perfmon 1 +#define EGL_PERFMONITOR_HARDWARE_COUNTERS_BIT_NV 0x00000001 +#define EGL_PERFMONITOR_OPENGL_ES_API_BIT_NV 0x00000010 +#define EGL_PERFMONITOR_OPENVG_API_BIT_NV 0x00000020 +#define EGL_PERFMONITOR_OPENGL_ES2_API_BIT_NV 0x00000040 +#define EGL_COUNTER_NAME_NV 0x1234 +#define EGL_COUNTER_DESCRIPTION_NV 0x1235 +#define EGL_IS_HARDWARE_COUNTER_NV 0x1236 +#define EGL_COUNTER_MAX_NV 0x1237 +#define EGL_COUNTER_VALUE_TYPE_NV 0x1238 +#define EGL_RAW_VALUE_NV 0x1239 +#define EGL_PERCENTAGE_VALUE_NV 0x1240 +#define EGL_BAD_CURRENT_PERFMONITOR_NV 0x1241 +#define EGL_NO_PERFMONITOR_NV ((EGLPerfMonitorNV)0) +#define EGL_DEFAULT_PERFMARKER_NV ((EGLPerfMarkerNV)0) +typedef void *EGLPerfMonitorNV; +typedef void *EGLPerfCounterNV; +typedef void *EGLPerfMarkerNV; +#endif + +/* EGL_NV_texture_rectangle (reuse analagous WGL enum) */ +#ifndef EGL_NV_texture_rectangle +#define EGL_NV_texture_rectangle 1 +#define EGL_GL_TEXTURE_RECTANGLE_NV_KHR 0x30BB +#define EGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif + +#ifndef EGL_NV_system_time +#define EGL_NV_system_time 1 +#endif + +/* EGL_NV_coverage_sample (reuse GLX_VIDEO_OUT_DEPTH_NV and + * GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV) + */ +#ifndef EGL_NV_coverage_sample +#define EGL_NV_coverage_sample 1 +#define EGL_COVERAGE_BUFFERS_NV 0x20C5 +#define EGL_COVERAGE_SAMPLES_NV 0x20C6 +#endif + +/* EGL_NV_depth_nonlinear + */ +#ifndef EGL_NV_depth_nonlinear +#define EGL_NV_depth_nonlinear 1 +#define EGL_DEPTH_ENCODING_NV 0x20C3 +#define EGL_DEPTH_ENCODING_NONE_NV 0 +#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x20C4 +#endif + +#ifndef EGL_NV_nvva_image +#define EGL_NV_nvva_image 1 +#define EGL_NVVA_OUTPUT_SURFACE_NV 0x30BE +EGLAPI EGLBoolean EGLAPIENTRY eglVideoImageLockNV(EGLDisplay dpy, EGLImageKHR image, EGLenum api); +EGLAPI EGLBoolean EGLAPIENTRY eglVideoImageUnlockNV(EGLDisplay dpy, EGLImageKHR image); +#endif + +#ifndef EGL_NV_nvma_image +#define EGL_NV_nvma_image 1 +#define EGL_NVMA_OUTPUT_SURFACE_NV 0x30BE /* eglCreateImageKHR target and eglCreatePbufferFromClientBuffer buftype */ +#endif + +#ifndef EGL_NV_client_api_nvma +#define EGL_NV_client_api_nvma 1 +EGLAPI EGLBoolean EGLAPIENTRY eglNvmaOutputSurfacePbufferLock(EGLDisplay display, + EGLSurface pbuffer); +EGLAPI EGLBoolean EGLAPIENTRY eglNvmaOutputSurfacePbufferUnlock(EGLDisplay display, + EGLSurface pbuffer); +#endif + +/* EGL_NV_omx_sink -- currently undocumented. + This extension allows the OpenMAX videorenderer component to render to EGL + surfaces.*/ +#ifndef EGL_NV_omx_sink +#define EGL_NV_omx_sink 1 +#define EGL_CONTEXT_OMX_VIDEORENDERER_COMPONENT_NV 0x3099 /* eglCreateContext attribute */ +#define EGL_OPENMAX_API 0x30A2 /* eglBindAPI target */ +#define EGL_OPENMAX_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */ +#endif + +/* EGL_NV_omx_image -- currently undocumented. + This extension allows an EGL image to be created with an openmax + videorenderer source. */ +#ifndef EGL_NV_omx_image +#define EGL_NV_omx_image +#define EGL_OPENMAX_COMPONENT_NV 0x30BF /* eglCreateImageKHR target */ +#endif + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/make/stub_includes/egl/EGL/eglplatform.h b/make/stub_includes/egl/EGL/eglplatform.h new file mode 100755 index 000000000..4a32edeef --- /dev/null +++ b/make/stub_includes/egl/EGL/eglplatform.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2007 NVIDIA Corporation. All rights reserved. + * + * NVIDIA Corporation and its licensors retain all intellectual property + * and proprietary rights in and to this software, related documentation + * and any modifications thereto. Any use, reproduction, disclosure or + * distribution of this software and related documentation without an express + * license agreement from NVIDIA Corporation is strictly prohibited. + */ + +#ifndef EGLPLATFORM_H +#define EGLPLATFORM_H + +/* +** eglplatform.h is platform dependent. It defines: +** +** - Native types +** - EGL and native handle values +** +** EGLNativeDisplayType, EGLNativeWindowType and EGLNativePixmapType are to be +** replaced with corresponding types of the native window system in egl.h. +** +** EGL and native handle values must match their types. +** +** This version of eglplatform.h is used to generate the glue code for the Java-side +** EGL class, and is intended to be platform-independent. +** +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +// Define storage class specifiers +#ifndef APIENTRY +#define APIENTRY +#endif + +#ifndef EGLAPIENTRY +#define EGLAPIENTRY +#endif +#ifndef EGLAPIENTRYP +#define EGLAPIENTRYP EGLAPIENTRY * +#endif + +#define EGLAPI + +// Define native window system types +typedef int EGLNativeDisplayType; +typedef void* EGLNativeWindowType; +typedef void* EGLNativePixmapType; + +#ifdef __cplusplus +} +#endif + +#endif /* EGLPLATFORM_H */ diff --git a/make/stub_includes/gluegen_egl/EGL/egl.h b/make/stub_includes/gluegen_egl/EGL/egl.h new file mode 100755 index 000000000..d9f6683ef --- /dev/null +++ b/make/stub_includes/gluegen_egl/EGL/egl.h @@ -0,0 +1,326 @@ +/* -*- mode: c; tab-width: 8; -*- */ +/* vi: set sw=4 ts=8: */ +/* Reference version of egl.h for EGL 1.3. + * Last modified 2006/11/12 + */ + +/* +* Copyright (c) 2007 The Khronos Group Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining +* a copy of this software and associated documentation files (the +* "Software"), to deal in the Software without restriction, including +* without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to +* permit persons to whom the Software is furnished to do so, subject +* to the following conditions: +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +* +*/ + +/* + * Copyright (c) 2007 NVIDIA Corporation. All rights reserved. + * + * NVIDIA Corporation and its licensors retain all intellectual property + * and proprietary rights in and to this software, related documentation + * and any modifications thereto. Any use, reproduction, disclosure or + * distribution of this software and related documentation without an express + * license agreement from NVIDIA Corporation is strictly prohibited. + */ + +#ifndef __egl_h_ +#define __egl_h_ + +/* All platform-dependent types and macro boilerplate (such as EGLAPI + * and EGLAPIENTRY) should go in eglplatform.h. + */ +#include <EGL/eglplatform.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* EGL Types */ +typedef int EGLint; +typedef unsigned int EGLBoolean; +typedef unsigned int EGLenum; +/* GlueGen currently needs this form of typedef to produce distinct + types for each of these pointer types */ +typedef struct {} _EGLConfig, *EGLConfig; +typedef struct {} _EGLContext, *EGLContext; +typedef struct {} _EGLDisplay, *EGLDisplay; +typedef struct {} _EGLSurface, *EGLSurface; +typedef struct {} _EGLClientBuffer, *EGLClientBuffer; + +/* EGL Versioning */ +#define EGL_VERSION_1_0 1 +#define EGL_VERSION_1_1 1 +#define EGL_VERSION_1_2 1 +#define EGL_VERSION_1_3 1 + +/* EGL Enumerants. Bitmasks and other exceptional cases aside, most + * enums are assigned unique values starting at 0x3000. + */ + +/* EGL aliases */ +#define EGL_FALSE 0 +#define EGL_TRUE 1 + +/* Out-of-band handle values */ +#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) +#define EGL_NO_CONTEXT ((EGLContext)0) +#define EGL_NO_DISPLAY ((EGLDisplay)0) +#define EGL_NO_SURFACE ((EGLSurface)0) + +/* Out-of-band attribute value */ +#define EGL_DONT_CARE ((EGLint)-1) + +/* Errors / GetError return values */ +#define EGL_SUCCESS 0x3000 +#define EGL_NOT_INITIALIZED 0x3001 +#define EGL_BAD_ACCESS 0x3002 +#define EGL_BAD_ALLOC 0x3003 +#define EGL_BAD_ATTRIBUTE 0x3004 +#define EGL_BAD_CONFIG 0x3005 +#define EGL_BAD_CONTEXT 0x3006 +#define EGL_BAD_CURRENT_SURFACE 0x3007 +#define EGL_BAD_DISPLAY 0x3008 +#define EGL_BAD_MATCH 0x3009 +#define EGL_BAD_NATIVE_PIXMAP 0x300A +#define EGL_BAD_NATIVE_WINDOW 0x300B +#define EGL_BAD_PARAMETER 0x300C +#define EGL_BAD_SURFACE 0x300D +#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */ + +/* Reserved 0x300F-0x301F for additional errors */ + +/* Config attributes */ +#define EGL_BUFFER_SIZE 0x3020 +#define EGL_ALPHA_SIZE 0x3021 +#define EGL_BLUE_SIZE 0x3022 +#define EGL_GREEN_SIZE 0x3023 +#define EGL_RED_SIZE 0x3024 +#define EGL_DEPTH_SIZE 0x3025 +#define EGL_STENCIL_SIZE 0x3026 +#define EGL_CONFIG_CAVEAT 0x3027 +#define EGL_CONFIG_ID 0x3028 +#define EGL_LEVEL 0x3029 +#define EGL_MAX_PBUFFER_HEIGHT 0x302A +#define EGL_MAX_PBUFFER_PIXELS 0x302B +#define EGL_MAX_PBUFFER_WIDTH 0x302C +#define EGL_NATIVE_RENDERABLE 0x302D +#define EGL_NATIVE_VISUAL_ID 0x302E +#define EGL_NATIVE_VISUAL_TYPE 0x302F +#define EGL_PRESERVED_RESOURCES 0x3030 +#define EGL_SAMPLES 0x3031 +#define EGL_SAMPLE_BUFFERS 0x3032 +#define EGL_SURFACE_TYPE 0x3033 +#define EGL_TRANSPARENT_TYPE 0x3034 +#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 +#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 +#define EGL_TRANSPARENT_RED_VALUE 0x3037 +#define EGL_NONE 0x3038 /* Attrib list terminator */ +#define EGL_BIND_TO_TEXTURE_RGB 0x3039 +#define EGL_BIND_TO_TEXTURE_RGBA 0x303A +#define EGL_MIN_SWAP_INTERVAL 0x303B +#define EGL_MAX_SWAP_INTERVAL 0x303C +#define EGL_LUMINANCE_SIZE 0x303D +#define EGL_ALPHA_MASK_SIZE 0x303E +#define EGL_COLOR_BUFFER_TYPE 0x303F +#define EGL_RENDERABLE_TYPE 0x3040 +#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */ +#define EGL_CONFORMANT 0x3042 + +/* Reserved 0x3041-0x304F for additional config attributes */ + +/* Config attribute values */ +#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */ +#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */ +#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */ +#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */ +#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */ + +/* More config attribute values, for EGL_TEXTURE_FORMAT */ +#define EGL_NO_TEXTURE 0x305C +#define EGL_TEXTURE_RGB 0x305D +#define EGL_TEXTURE_RGBA 0x305E +#define EGL_TEXTURE_2D 0x305F + +/* Config attribute mask bits */ +#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */ + +#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */ + +/* QueryString targets */ +#define EGL_VENDOR 0x3053 +#define EGL_VERSION 0x3054 +#define EGL_EXTENSIONS 0x3055 +#define EGL_CLIENT_APIS 0x308D + +/* QuerySurface / CreatePbufferSurface targets */ +#define EGL_HEIGHT 0x3056 +#define EGL_WIDTH 0x3057 +#define EGL_LARGEST_PBUFFER 0x3058 +#define EGL_TEXTURE_FORMAT 0x3080 +#define EGL_TEXTURE_TARGET 0x3081 +#define EGL_MIPMAP_TEXTURE 0x3082 +#define EGL_MIPMAP_LEVEL 0x3083 +#define EGL_RENDER_BUFFER 0x3086 +#define EGL_VG_COLORSPACE 0x3087 +#define EGL_VG_ALPHA_FORMAT 0x3088 +#define EGL_HORIZONTAL_RESOLUTION 0x3090 +#define EGL_VERTICAL_RESOLUTION 0x3091 +#define EGL_PIXEL_ASPECT_RATIO 0x3092 +#define EGL_SWAP_BEHAVIOR 0x3093 + +/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */ +#define EGL_BACK_BUFFER 0x3084 +#define EGL_SINGLE_BUFFER 0x3085 + +/* OpenVG color spaces */ +#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */ +#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */ + +/* OpenVG alpha formats */ +#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_VG_ALPHA_FORMAT value */ +#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_VG_ALPHA_FORMAT value */ + +/* Constant scale factor by which fractional display resolutions & + * aspect ratio are scaled when queried as integer values. + */ +#define EGL_DISPLAY_SCALING 10000 + +/* Unknown display resolution/aspect ratio */ +#define EGL_UNKNOWN ((EGLint)-1) + +/* Back buffer swap behaviors */ +#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */ +#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */ + +/* CreatePbufferFromClientBuffer buffer types */ +#define EGL_OPENVG_IMAGE 0x3096 + +/* QueryContext targets */ +#define EGL_CONTEXT_CLIENT_TYPE 0x3097 + +/* CreateContext attributes */ +#define EGL_CONTEXT_CLIENT_VERSION 0x3098 + +/* BindAPI/QueryAPI targets */ +#define EGL_OPENGL_ES_API 0x30A0 +#define EGL_OPENVG_API 0x30A1 + +/* GetCurrentSurface targets */ +#define EGL_DRAW 0x3059 +#define EGL_READ 0x305A + +/* WaitNative engines */ +#define EGL_CORE_NATIVE_ENGINE 0x305B + +/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */ +#define EGL_COLORSPACE EGL_VG_COLORSPACE +#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT +#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB +#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR +#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE +#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE + +/* EGL extensions must request enum blocks from the Khronos + * API Registrar, who maintains the enumerant registry. Submit + * a bug in Khronos Bugzilla against task "Registry". + */ + + + +/* EGL Functions */ + +EGLAPI EGLint EGLAPIENTRY eglGetError(void); + +EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id); +EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor); +EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy); + +EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name); + +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, + EGLint config_size, EGLint *num_config); +EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, + EGLConfig *configs, EGLint config_size, + EGLint *num_config); +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, + EGLint attribute, EGLint *value); + +EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, + EGLNativeWindowType win, + const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, + const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, + EGLNativePixmapType pixmap, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface); +EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint *value); + +EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api); +EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void); + +EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void); + +EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void); + +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer( + EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, + EGLConfig config, const EGLint *attrib_list); + +EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint value); +EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); +EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); + + +EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval); + + +EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, + EGLContext share_context, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx); +EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, + EGLSurface read, EGLContext ctx); + +EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void); +EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw); +EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx, + EGLint attribute, EGLint *value); + +EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void); +EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine); +EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface); +EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, + EGLNativePixmapType target); + +typedef void (* EGLAPIENTRY __EGLFuncPtr)(void); +EGLAPI __EGLFuncPtr eglGetProcAddress(const char *procname); + +#ifdef __cplusplus +} +#endif + +#endif /* __egl_h_ */ diff --git a/make/stub_includes/gluegen_egl/EGL/eglext.h b/make/stub_includes/gluegen_egl/EGL/eglext.h new file mode 100755 index 000000000..c3f637754 --- /dev/null +++ b/make/stub_includes/gluegen_egl/EGL/eglext.h @@ -0,0 +1,241 @@ +#ifndef __eglext_h_ +#define __eglext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* + * Copyright (c) 2007 NVIDIA Corporation. All rights reserved. + * + * NVIDIA Corporation and its licensors retain all intellectual property + * and proprietary rights in and to this software, related documentation + * and any modifications thereto. Any use, reproduction, disclosure or + * distribution of this software and related documentation without an express + * license agreement from NVIDIA Corporation is strictly prohibited. + */ + +#include <EGL/egl.h> +#include <EGL/eglplatform.h> + +/*************************************************************/ + +/* Header file version number */ +/* eglext.h last updated 2007/11/20 */ +/* Current version at http://www.khronos.org/registry/egl/ */ +#define EGL_EGLEXT_VERSION 1 + +#ifndef EGL_KHR_config_attribs +#define EGL_KHR_config_attribs 1 +#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */ +#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */ +#endif + +#ifndef EGL_KHR_lock_surface +#define EGL_KHR_lock_surface 1 +#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */ +#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */ +#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */ +#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */ +#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */ +#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */ +#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */ +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface); +#endif + +#ifndef EGL_KHR_image +#define EGL_KHR_image 1 +#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ +typedef void *EGLImageKHR; +#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); +#endif + +#ifndef EGL_KHR_vg_parent_image +#define EGL_KHR_vg_parent_image 1 +#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_2D_image +#define EGL_KHR_gl_texture_2D_image 1 +#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_texture_cubemap_image +#define EGL_KHR_gl_texture_cubemap_image 1 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_3D_image +#define EGL_KHR_gl_texture_3D_image 1 +#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_renderbuffer_image +#define EGL_KHR_gl_renderbuffer_image 1 +#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ +#endif + +// Supported NV Extensions + +// NOTE: EGL_KHR_bind_client_buffer == EGL_create_pbuffer_from_client_buffer +/* EGL_KHR_bind_client_buffer */ +#ifndef EGL_KHR_bind_client_buffer +#define EGL_create_pbuffer_from_client_buffer 1 +#define EGL_KHR_bind_client_buffer 1 +#define EGL_OPENVG_IMAGE_KHR EGL_OPENVG_IMAGE +#endif + +/* eglCreateImageKHR targets */ +/* eglCreateImageKHR target and eglCreatePbufferFromClientBuffer buftype */ + +/* EGL_NV_perfmon */ +#ifndef EGL_NV_perfmon +#define EGL_NV_perfmon 1 +#define EGL_PERFMONITOR_HARDWARE_COUNTERS_BIT_NV 0x00000001 +#define EGL_PERFMONITOR_OPENGL_ES_API_BIT_NV 0x00000010 +#define EGL_PERFMONITOR_OPENVG_API_BIT_NV 0x00000020 +#define EGL_PERFMONITOR_OPENGL_ES2_API_BIT_NV 0x00000040 +#define EGL_COUNTER_NAME_NV 0x1234 +#define EGL_COUNTER_DESCRIPTION_NV 0x1235 +#define EGL_IS_HARDWARE_COUNTER_NV 0x1236 +#define EGL_COUNTER_MAX_NV 0x1237 +#define EGL_COUNTER_VALUE_TYPE_NV 0x1238 +#define EGL_RAW_VALUE_NV 0x1239 +#define EGL_PERCENTAGE_VALUE_NV 0x1240 +#define EGL_BAD_CURRENT_PERFMONITOR_NV 0x1241 +#define EGL_NO_PERFMONITOR_NV ((EGLPerfMonitorNV)0) +#define EGL_DEFAULT_PERFMARKER_NV ((EGLPerfMarkerNV)0) +typedef void *EGLPerfMonitorNV; +typedef void *EGLPerfCounterNV; +typedef void *EGLPerfMarkerNV; +#endif + +/* EGL_NV_texture_rectangle (reuse analagous WGL enum) */ +#ifndef EGL_NV_texture_rectangle +#define EGL_NV_texture_rectangle 1 +#define EGL_GL_TEXTURE_RECTANGLE_NV_KHR 0x30BB +#define EGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif + +#ifndef EGL_NV_system_time +#define EGL_NV_system_time 1 +#endif + +/* EGL_NV_coverage_sample (reuse GLX_VIDEO_OUT_DEPTH_NV and + * GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV) + */ +#ifndef EGL_NV_coverage_sample +#define EGL_NV_coverage_sample 1 +#define EGL_COVERAGE_BUFFERS_NV 0x20C5 +#define EGL_COVERAGE_SAMPLES_NV 0x20C6 +#endif + +/* EGL_NV_depth_nonlinear + */ +#ifndef EGL_NV_depth_nonlinear +#define EGL_NV_depth_nonlinear 1 +#define EGL_DEPTH_ENCODING_NV 0x20C3 +#define EGL_DEPTH_ENCODING_NONE_NV 0 +#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x20C4 +#endif + +#ifndef EGL_NV_nvva_image +#define EGL_NV_nvva_image 1 +#define EGL_NVVA_OUTPUT_SURFACE_NV 0x30BE +EGLAPI EGLBoolean EGLAPIENTRY eglVideoImageLockNV(EGLDisplay dpy, EGLImageKHR image, EGLenum api); +EGLAPI EGLBoolean EGLAPIENTRY eglVideoImageUnlockNV(EGLDisplay dpy, EGLImageKHR image); +#endif + +#ifndef EGL_NV_nvma_image +#define EGL_NV_nvma_image 1 +#define EGL_NVMA_OUTPUT_SURFACE_NV 0x30BE /* eglCreateImageKHR target and eglCreatePbufferFromClientBuffer buftype */ +#endif + +#ifndef EGL_NV_client_api_nvma +#define EGL_NV_client_api_nvma 1 +EGLAPI EGLBoolean EGLAPIENTRY eglNvmaOutputSurfacePbufferLock(EGLDisplay display, + EGLSurface pbuffer); +EGLAPI EGLBoolean EGLAPIENTRY eglNvmaOutputSurfacePbufferUnlock(EGLDisplay display, + EGLSurface pbuffer); +#endif + +/* EGL_NV_omx_sink -- currently undocumented. + This extension allows the OpenMAX videorenderer component to render to EGL + surfaces.*/ +#ifndef EGL_NV_omx_sink +#define EGL_NV_omx_sink 1 +#define EGL_CONTEXT_OMX_VIDEORENDERER_COMPONENT_NV 0x3099 /* eglCreateContext attribute */ +#define EGL_OPENMAX_API 0x30A2 /* eglBindAPI target */ +#define EGL_OPENMAX_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */ +#endif + +/* EGL_NV_omx_image -- currently undocumented. + This extension allows an EGL image to be created with an openmax + videorenderer source. */ +#ifndef EGL_NV_omx_image +#define EGL_NV_omx_image +#define EGL_OPENMAX_COMPONENT_NV 0x30BF /* eglCreateImageKHR target */ +#endif + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/make/stub_includes/gluegen_egl/EGL/eglplatform.h b/make/stub_includes/gluegen_egl/EGL/eglplatform.h new file mode 100755 index 000000000..4a32edeef --- /dev/null +++ b/make/stub_includes/gluegen_egl/EGL/eglplatform.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2007 NVIDIA Corporation. All rights reserved. + * + * NVIDIA Corporation and its licensors retain all intellectual property + * and proprietary rights in and to this software, related documentation + * and any modifications thereto. Any use, reproduction, disclosure or + * distribution of this software and related documentation without an express + * license agreement from NVIDIA Corporation is strictly prohibited. + */ + +#ifndef EGLPLATFORM_H +#define EGLPLATFORM_H + +/* +** eglplatform.h is platform dependent. It defines: +** +** - Native types +** - EGL and native handle values +** +** EGLNativeDisplayType, EGLNativeWindowType and EGLNativePixmapType are to be +** replaced with corresponding types of the native window system in egl.h. +** +** EGL and native handle values must match their types. +** +** This version of eglplatform.h is used to generate the glue code for the Java-side +** EGL class, and is intended to be platform-independent. +** +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +// Define storage class specifiers +#ifndef APIENTRY +#define APIENTRY +#endif + +#ifndef EGLAPIENTRY +#define EGLAPIENTRY +#endif +#ifndef EGLAPIENTRYP +#define EGLAPIENTRYP EGLAPIENTRY * +#endif + +#define EGLAPI + +// Define native window system types +typedef int EGLNativeDisplayType; +typedef void* EGLNativeWindowType; +typedef void* EGLNativePixmapType; + +#ifdef __cplusplus +} +#endif + +#endif /* EGLPLATFORM_H */ diff --git a/make/stub_includes/gluegen_egl/window-system.c b/make/stub_includes/gluegen_egl/window-system.c new file mode 100755 index 000000000..13eef0d30 --- /dev/null +++ b/make/stub_includes/gluegen_egl/window-system.c @@ -0,0 +1 @@ +#include <EGL/egl.h> |