diff options
author | Kenneth Russel <[email protected]> | 2008-05-26 18:44:56 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-05-26 18:44:56 +0000 |
commit | 286d1ba590c385994ece2d897f1e57e2504d3090 (patch) | |
tree | 528f56c995ae377db93872283ac96e369230f204 /make/egl.cfg | |
parent | 0e27cbfe6f60f0c39e826fcf374b7e7e03babe4f (diff) |
Added glue code generation for the EGL class when building either the
OpenGL ES 1 or OpenGL ES 2 binding. Required changes to GlueGen to
support the outgoing EGLConfig* array in eglChooseConfig, and to the
EGL headers to produce StructAccessor types for the EGLConfig and
other types. (At some point, should upgrade GlueGen's type system and
code generation to support treating these types as opaque longs.)
Changed generation for EGL, OpenGL ES 1 and OpenGL ES 2 to use dynamic
function lookup exclusively so that either an emulation library on the
desktop or an import library for a particular device is not needed to
compile the generated code. Generated code compiles but will not run
yet; needs hookup to dynamically-opened OpenGL ES libraries.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1641 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/egl.cfg')
-rwxr-xr-x | make/egl.cfg | 83 |
1 files changed, 83 insertions, 0 deletions
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(); |