diff options
-rwxr-xr-x | make/eglext.cfg | 124 | ||||
-rwxr-xr-x | make/stub_includes/gluegen_egl/window-system-ext.c | 5 |
2 files changed, 129 insertions, 0 deletions
diff --git a/make/eglext.cfg b/make/eglext.cfg new file mode 100755 index 000000000..4a8b00a9e --- /dev/null +++ b/make/eglext.cfg @@ -0,0 +1,124 @@ +# This .cfg file is used to generate the interface to the EGL routines +# used internally by the EGLContext implementation. +JavaOutputDir ../build/gensrc/classes +NativeOutputDir ../build/gensrc/native/jogl/egl + +Package com.sun.opengl.impl.egl +Style InterfaceAndImpl +JavaClass EGLExt +ImplPackage com.sun.opengl.impl.egl +ImplJavaClass EGLExtImpl +# Shouldn't matter which one of these we pick up + +ExtendedInterfaceSymbols ../build/gensrc/classes/com/sun/opengl/impl/egl/EGL.java +HierarchicalNativeOutput false +Include gl-common.cfg +Include gl-common-extensions.cfg + +# There are a few routines we don't handle yet +Ignore glGetBufferPointerv + +# Use a ProcAddressTable so we dynamically look up the routines +EmitProcAddressTable true +ProcAddressTableClassName EGLExtProcAddressTable +GetProcAddressTableExpr _context.getEGLExtProcAddressTable() + +# 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__ + +# Also force the calling conventions of the locally generated function +# pointer typedefs for these routines to EGLAPIENTRY +LocalProcAddressCallingConvention __ALL__ EGLAPIENTRY + +# Treat all of the EGL types as opaque longs +# Opaque long EGLConfig +Opaque long EGLConfig +Opaque long EGLContext +Opaque long EGLDisplay +Opaque long EGLSurface +Opaque long EGLNativeDisplayType +Opaque long EGLNativeWindowType +Opaque long EGLNativePixmapType +Opaque long EGLClientBuffer +Opaque long EGLImage + +# Opaque long EGLClientBuffer + +CustomCCode /* Define EGL_EGLEXT_PROTOTYPES so that the EGL extension prototypes in +CustomCCode "eglext.h" are parsed. */ +CustomCCode #define EGL_EGLEXT_PROTOTYPES +CustomCCode +CustomCCode #include <EGL/eglext.h> + +Include intptr.cfg + +# There are some #defines in eglext.h that GlueGen and PCPP don't currently handle +CustomJavaCode EGLExt public static final long EGL_NO_IMAGE = 0; +CustomJavaCode EGLExt public boolean isFunctionAvailable(String glFunctionName); +CustomJavaCode EGLExt public boolean isExtensionAvailable(String glExtensionName); + +CustomJavaCode EGLExtImpl public EGLExtImpl(EGLContext context) { +CustomJavaCode EGLExtImpl this._context = context; +CustomJavaCode EGLExtImpl } + +CustomJavaCode EGLExtImpl public boolean isFunctionAvailable(String glFunctionName) +CustomJavaCode EGLExtImpl { +CustomJavaCode EGLExtImpl return _context.isFunctionAvailable(glFunctionName); +CustomJavaCode EGLExtImpl } + +CustomJavaCode EGLExtImpl public boolean isExtensionAvailable(String glExtensionName) +CustomJavaCode EGLExtImpl { +CustomJavaCode EGLExtImpl return _context.isExtensionAvailable(glExtensionName); +CustomJavaCode EGLExtImpl } + +CustomJavaCode EGLExtImpl private EGLContext _context; + +# These Ignores cause the core EGL routines to be ignored from the +# EGLExt interface and EGLExtImpl implementing class. +Ignore eglBindAPI +Ignore eglBindTexImage +Ignore eglChooseConfig +Ignore eglCopyBuffers +Ignore eglCreateContext +Ignore eglCreatePbufferFromClientBuffer +Ignore eglCreatePbufferSurface +Ignore eglCreatePixmapSurface +Ignore eglCreateWindowSurface +Ignore eglDestroyContext +Ignore eglDestroySurface +Ignore eglGetConfigAttrib +Ignore eglGetConfigs +Ignore eglGetCurrentContext +Ignore eglGetCurrentDisplay +Ignore eglGetCurrentSurface +Ignore eglGetDisplay +Ignore eglGetError +Ignore eglGetProcAddress +Ignore eglInitialize +Ignore eglMakeCurrent +Ignore eglQueryAPI +Ignore eglQueryContext +Ignore eglQueryString +Ignore eglQuerySurface +Ignore eglReleaseTexImage +Ignore eglReleaseThread +Ignore eglSurfaceAttrib +Ignore eglSwapBuffers +Ignore eglSwapInterval +Ignore eglTerminate +Ignore eglWaitClient +Ignore eglWaitGL +Ignore eglWaitNative diff --git a/make/stub_includes/gluegen_egl/window-system-ext.c b/make/stub_includes/gluegen_egl/window-system-ext.c new file mode 100755 index 000000000..e80b8aa41 --- /dev/null +++ b/make/stub_includes/gluegen_egl/window-system-ext.c @@ -0,0 +1,5 @@ +// Define EGL_EGLEXT_PROTOTYPES so that the EGL extension prototypes in +// "eglext.h" are parsed. +#define EGL_EGLEXT_PROTOTYPES + +#include <EGL/eglext.h> |