diff options
author | Kenneth Russel <[email protected]> | 2009-06-15 22:57:38 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2009-06-15 22:57:38 +0000 |
commit | a959c53b7ac91e489bf0959391e892790b9ff248 (patch) | |
tree | 4664742a4f9f6daa694364292e376ad2e6ee97d1 /make/config/jogl/egl.cfg | |
parent | 506b634b780dcd23aa61015c2ceba3e687196abf (diff) |
Copied JOGL_2_SANDBOX r1957 on to trunk; JOGL_2_SANDBOX branch is now closed
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1959 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/config/jogl/egl.cfg')
-rwxr-xr-x | make/config/jogl/egl.cfg | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/make/config/jogl/egl.cfg b/make/config/jogl/egl.cfg new file mode 100755 index 000000000..6457ab21a --- /dev/null +++ b/make/config/jogl/egl.cfg @@ -0,0 +1,70 @@ +# This .cfg file is used to generate the interface to the EGL routines +# used internally by the EGLContext implementation. +JavaOutputDir gensrc/classes +NativeOutputDir gensrc/native/jogl/egl + +Package com.sun.opengl.impl.egl +JavaClass EGL +Style allstatic +# Shouldn't matter which one of these we pick up + +HierarchicalNativeOutput false +Include gl-common.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 __ALL__ + +# Treat all of the EGL types as opaque longs +Opaque long EGLContext +Opaque long EGLDisplay +Opaque long EGLSurface +Opaque long EGLNativeDisplayType +Opaque long EGLNativeWindowType +Opaque long EGLNativePixmapType +Opaque long EGLClientBuffer + +CustomCCode #include <EGL/egl.h> + +Include ../intptr.cfg + +CustomJavaCode EGL private static EGLProcAddressTable _table = new EGLProcAddressTable(); +CustomJavaCode EGL public static void resetProcAddressTable(DynamicLookupHelper lookup) { +CustomJavaCode EGL GLProcAddressHelper.resetProcAddressTable(_table, lookup); +CustomJavaCode EGL } + +# There are some #defines in egl.h that GlueGen and PCPP don't currently handle +CustomJavaCode EGL public static final long EGL_DEFAULT_DISPLAY = 0; +CustomJavaCode EGL public static final long EGL_NO_CONTEXT = 0; +CustomJavaCode EGL public static final long EGL_NO_DISPLAY = 0; +CustomJavaCode EGL public static final long EGL_NO_SURFACE = 0; +CustomJavaCode EGL public static final int EGL_DONT_CARE = -1; +CustomJavaCode EGL public static final int EGL_UNKNOWN = -1; +CustomJavaCode EGL +CustomJavaCode EGL protected static long eglGetProcAddress(long eglGetProcAddressHandle, java.lang.String procname) +CustomJavaCode EGL { +CustomJavaCode EGL if (eglGetProcAddressHandle == 0) { +CustomJavaCode EGL throw new GLException("Passed null pointer for method \"eglGetProcAddress\""); +CustomJavaCode EGL } +CustomJavaCode EGL return dispatch_eglGetProcAddress0(procname, eglGetProcAddressHandle); +CustomJavaCode EGL } + + +Import com.sun.gluegen.runtime.opengl.GLProcAddressHelper |