diff options
Diffstat (limited to 'make/config/jogl/egl.cfg')
-rw-r--r-- | make/config/jogl/egl.cfg | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/make/config/jogl/egl.cfg b/make/config/jogl/egl.cfg new file mode 100644 index 000000000..c194de2d0 --- /dev/null +++ b/make/config/jogl/egl.cfg @@ -0,0 +1,50 @@ +# 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.jogamp.opengl.impl.egl +JavaClass EGL +Style AllStatic +# Shouldn't matter which one of these we pick up +Include egl-common.cfg + +HierarchicalNativeOutput false + +# Use a ProcAddressTable so we dynamically look up the routines +EmitProcAddressTable true +ProcAddressTableClassName EGLProcAddressTable +GetProcAddressTableExpr _table + +# Implement the first argument to eglGetProcAddress as String instead +# of byte[] +ArgumentIsString eglGetProcAddress 0 +ReturnsString eglQueryString + +CustomCCode #include <EGL/egl.h> + +Include ../intptr.cfg + +CustomJavaCode EGL private static EGLProcAddressTable _table = new EGLProcAddressTable(new GLProcAddressResolver()); +CustomJavaCode EGL public static void resetProcAddressTable(DynamicLookupHelper lookup) { +CustomJavaCode EGL _table.reset(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_eglGetProcAddress1(procname, eglGetProcAddressHandle); +CustomJavaCode EGL } + + +Import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver |