summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-04-09 03:55:57 +0200
committerSven Gothel <[email protected]>2012-04-09 03:55:57 +0200
commit1e61021a062b1403f7eed948ac9d2ea0c04ea951 (patch)
tree741a022a7ce45996c1394aa27648ffc776fbf1c1 /make
parent96ae8202621dfa1f7ae4995e7749d1b0d9918b54 (diff)
Fix EGL/ES types GLeglImageOES, EGLImageKHR & EGLClientBuffer - and functions: eglCreateImageKHR, eglCreatePbufferFromClientBuffer
Unique typedef for: EGLConfig, EGLContext, EGLDisplay, EGLSurface, EGLNativeDisplayType, EGLNativeWindowType, EGLNativePixmapType, EGLImageKHR, GLeglImageOES and EGLSyncKHR allowing to render them individually opaque (long) and keep EGLClientBuffer as NIO buffer.
Diffstat (limited to 'make')
-rw-r--r--make/config/jogl/egl-common.cfg8
-rw-r--r--make/config/jogl/gl-common.cfg1
-rw-r--r--make/stub_includes/egl/EGL/egl.h8
-rw-r--r--make/stub_includes/egl/EGL/eglext.h4
-rw-r--r--make/stub_includes/egl/EGL/eglplatform.h6
-rw-r--r--make/stub_includes/opengl/GLES/glext.h3
-rw-r--r--make/stub_includes/opengl/GLES2/gl2ext.h3
7 files changed, 19 insertions, 14 deletions
diff --git a/make/config/jogl/egl-common.cfg b/make/config/jogl/egl-common.cfg
index da0e3320a..cf5d0b083 100644
--- a/make/config/jogl/egl-common.cfg
+++ b/make/config/jogl/egl-common.cfg
@@ -10,20 +10,18 @@ Import javax.media.opengl.fixedfunc.*
Import jogamp.opengl.*
# 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 EGLImageKHR
#Opaque long EGLPerfMonitorNV
#Opaque long EGLPerfCounterNV
#Opaque long EGLPerfMarkerNV
Opaque long EGLSyncKHR
-Opaque long NativeSyncKHR
Opaque boolean EGLBoolean
# Make eglGetProcAddress return an opaque long
@@ -43,3 +41,7 @@ ForceProcAddressGen __ALL__
# pointer typedefs for these routines to EGLAPIENTRY
LocalProcAddressCallingConvention __ALL__ EGLAPIENTRY
+# Using EGLClientBuffer as argument,
+# which native pointer exceeds the native function call lifetime
+NIODirectOnly eglCreatePbufferFromClientBuffer
+NIODirectOnly eglCreateImageKHR
diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg
index 39b1dbde7..8af080ec8 100644
--- a/make/config/jogl/gl-common.cfg
+++ b/make/config/jogl/gl-common.cfg
@@ -352,6 +352,7 @@ IgnoreExtension GL_EXT_shader_image_load_store
Opaque boolean GLboolean
Opaque long GLsync
+Opaque long GLeglImageOES
ReturnsString glGetString
ReturnsString glGetStringi
diff --git a/make/stub_includes/egl/EGL/egl.h b/make/stub_includes/egl/EGL/egl.h
index 1eabe3af2..4c005e8bf 100644
--- a/make/stub_includes/egl/EGL/egl.h
+++ b/make/stub_includes/egl/EGL/egl.h
@@ -43,10 +43,10 @@ extern "C" {
/* EGLint is defined in eglplatform.h */
typedef unsigned int EGLBoolean;
typedef unsigned int EGLenum;
-typedef void *EGLConfig;
-typedef void *EGLContext;
-typedef void *EGLDisplay;
-typedef void *EGLSurface;
+typedef struct __EGLConfig *EGLConfig;
+typedef struct __EGLContext *EGLContext;
+typedef struct __EGLDisplay *EGLDisplay;
+typedef struct __EGLSurface *EGLSurface;
typedef void *EGLClientBuffer;
/* EGL Versioning */
diff --git a/make/stub_includes/egl/EGL/eglext.h b/make/stub_includes/egl/EGL/eglext.h
index d5310df65..763403609 100644
--- a/make/stub_includes/egl/EGL/eglext.h
+++ b/make/stub_includes/egl/EGL/eglext.h
@@ -78,7 +78,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display
#ifndef EGL_KHR_image
#define EGL_KHR_image 1
#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
-typedef void *EGLImageKHR;
+typedef struct __EGLImageKHR *EGLImageKHR;
/* Manual: #define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) */
#ifdef EGL_EGLEXT_PROTOTYPES
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
@@ -124,7 +124,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
#ifndef EGL_KHR_reusable_sync
#define EGL_KHR_reusable_sync 1
-typedef void* EGLSyncKHR;
+typedef struct __EGLSyncKHR* EGLSyncKHR;
typedef khronos_utime_nanoseconds_t EGLTimeKHR;
#define EGL_SYNC_STATUS_KHR 0x30F1
diff --git a/make/stub_includes/egl/EGL/eglplatform.h b/make/stub_includes/egl/EGL/eglplatform.h
index a661736c1..b594e394d 100644
--- a/make/stub_includes/egl/EGL/eglplatform.h
+++ b/make/stub_includes/egl/EGL/eglplatform.h
@@ -97,9 +97,9 @@ typedef Window EGLNativeWindowType;
#warning "Info: Using generic void pointer for EGLNativeDisplayType, EGLNativeWindowType and EGLNativePixmapType"
-typedef void* EGLNativeDisplayType;
-typedef void* EGLNativeWindowType;
-typedef void* EGLNativePixmapType;
+typedef struct __EGLNativeDisplayType* EGLNativeDisplayType;
+typedef struct __EGLNativeWindowType* EGLNativeWindowType;
+typedef struct __EGLNativePixmapType* EGLNativePixmapType;
#endif
diff --git a/make/stub_includes/opengl/GLES/glext.h b/make/stub_includes/opengl/GLES/glext.h
index 15451c68f..b3d6b712b 100644
--- a/make/stub_includes/opengl/GLES/glext.h
+++ b/make/stub_includes/opengl/GLES/glext.h
@@ -65,7 +65,8 @@ extern "C" {
/* GL_OES_EGL_image */
#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
+// typedef void* GLeglImageOES;
+typedef struct __GLeglImageOES *GLeglImageOES;
#endif
/* GL_OES_EGL_image_external */
diff --git a/make/stub_includes/opengl/GLES2/gl2ext.h b/make/stub_includes/opengl/GLES2/gl2ext.h
index 7cbf61497..04c0a64e9 100644
--- a/make/stub_includes/opengl/GLES2/gl2ext.h
+++ b/make/stub_includes/opengl/GLES2/gl2ext.h
@@ -54,7 +54,8 @@ extern "C" {
/* GL_OES_EGL_image */
#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
+// typedef void* GLeglImageOES;
+typedef struct __GLeglImageOES *GLeglImageOES;
#endif
/* GL_OES_EGL_image_external */