aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl/egl.cfg
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-03-16 14:38:27 +0000
committerSven Gothel <[email protected]>2009-03-16 14:38:27 +0000
commit24fcece997ba911b0270033a357bbd83258d4f1a (patch)
tree4d01034154734897724d6a3b7738bf22693a8d36 /make/config/jogl/egl.cfg
parent9517d52c18bfa93d78e03f4c212757eda421afb6 (diff)
JOGL refactoring:
Refactored JOGL into 3 independent components. 1 NWI - Native windowing interface Abstracts the the general NativeWindow interface and it's factory, incl the basic JAWT and Xlib toolkit. The latter was motivated to clean up the JOGL workspace, and to allow other to reuse this part. The generic core is nwi.core.jar, the AWT add-on is nwi.awt.jar. 2 JOGL - The OpenGL mapping Further cleanup of the SPEC. All non OpenGL toolkits are relocated to NWI and NEWT. There is still openmax and the windows audio layer .. Another cleanup of the fixed function pipeline emulation. Moved utilities and implementations where they belong .. Removed GLUnsupportedException. Misc .. changes 3 NEWT - The new windowing toolkit The generic NEWT, newt.core.jar. The JOGL and AWT modules are seperate, newt.ogl.jar newt.awt.jar. Their build can be switched off. The modules source and builds resides in their own directory. Because of their nature, they share the stub_includes, etc. Each module has it's own ant build script - build-nwi.xml - build-jogl.xml - build-newt.xml They can be build at once using build.xml as ususal, which just invokes the seperate build tasks. if rootrel.build=build, then the build location is jogl/build-nwi jogl/build-jogl jogl/build-newt and the sources are under jogl/src/nwi jogl/src/jogl jogl/src/newt Tested: jogl-demos, d4; Linux, MacOsX; Nvidia git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1868 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/config/jogl/egl.cfg')
-rwxr-xr-xmake/config/jogl/egl.cfg70
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