aboutsummaryrefslogtreecommitdiffstats
path: root/make/stub_includes
diff options
context:
space:
mode:
Diffstat (limited to 'make/stub_includes')
-rw-r--r--make/stub_includes/jni/macosx/jawt_md.h20
-rw-r--r--make/stub_includes/macosx/AppKit/NSOpenGL.h3
-rw-r--r--make/stub_includes/macosx/AppKit/NSOpenGLLayer.h1
-rw-r--r--make/stub_includes/macosx/AppKit/NSOpenGLView.h1
-rw-r--r--make/stub_includes/macosx/OpenGL/CGLDevice.h2
-rw-r--r--make/stub_includes/macosx/OpenGL/OpenGL.h31
-rw-r--r--make/stub_includes/macosx/QuartzCore/CALayer.h1
-rw-r--r--make/stub_includes/opengl/macosx-window-system.h70
8 files changed, 83 insertions, 46 deletions
diff --git a/make/stub_includes/jni/macosx/jawt_md.h b/make/stub_includes/jni/macosx/jawt_md.h
index aca47f66e..3a371af0d 100644
--- a/make/stub_includes/jni/macosx/jawt_md.h
+++ b/make/stub_includes/jni/macosx/jawt_md.h
@@ -9,17 +9,35 @@
#include <jawt.h>
#include <AppKit/NSView.h>
+#include <QuartzCore/CALayer.h>
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * JAWT_DrawingSurfaceInfo.getPlatformInfo()
+ *
+ * Only if not JAWT_SurfaceLayers, see below!
+ */
typedef struct JAWT_MacOSXDrawingSurfaceInfo
{
- NSView *cocoaViewRef; // the view is guaranteed to be valid only for the duration of Component.paint method
+ /** the view is guaranteed to be valid only for the duration of Component.paint method */
+ NSView *cocoaViewRef;
}
JAWT_MacOSXDrawingSurfaceInfo;
+/**
+ * JAWT_DrawingSurfaceInfo.getPlatformInfo()
+ *
+ * >= 10.6.4 if JAWT_MACOSX_USE_CALAYER is set in JAWT version
+ */
+typedef struct JAWT_SurfaceLayers
+{
+ CALayer *layer;
+}
+JAWT_SurfaceLayers;
+
#ifdef __cplusplus
}
#endif
diff --git a/make/stub_includes/macosx/AppKit/NSOpenGL.h b/make/stub_includes/macosx/AppKit/NSOpenGL.h
new file mode 100644
index 000000000..1b7656dc1
--- /dev/null
+++ b/make/stub_includes/macosx/AppKit/NSOpenGL.h
@@ -0,0 +1,3 @@
+typedef struct _NSOpenGLPixelFormat NSOpenGLPixelFormat;
+typedef struct _NSOpenGLContext NSOpenGLContext;
+typedef struct _NSOpenGLPixelBuffer NSOpenGLPixelBuffer;
diff --git a/make/stub_includes/macosx/AppKit/NSOpenGLLayer.h b/make/stub_includes/macosx/AppKit/NSOpenGLLayer.h
new file mode 100644
index 000000000..2e5e81a68
--- /dev/null
+++ b/make/stub_includes/macosx/AppKit/NSOpenGLLayer.h
@@ -0,0 +1 @@
+typedef struct _NSOpenGLLayer NSOpenGLLayer;
diff --git a/make/stub_includes/macosx/AppKit/NSOpenGLView.h b/make/stub_includes/macosx/AppKit/NSOpenGLView.h
new file mode 100644
index 000000000..6492287df
--- /dev/null
+++ b/make/stub_includes/macosx/AppKit/NSOpenGLView.h
@@ -0,0 +1 @@
+typedef struct _NSOpenGLView NSOpenGLView;
diff --git a/make/stub_includes/macosx/OpenGL/CGLDevice.h b/make/stub_includes/macosx/OpenGL/CGLDevice.h
new file mode 100644
index 000000000..1d4170975
--- /dev/null
+++ b/make/stub_includes/macosx/OpenGL/CGLDevice.h
@@ -0,0 +1,2 @@
+typedef struct _cglShareGroupObj* CGLShareGroupObj;
+
diff --git a/make/stub_includes/macosx/OpenGL/OpenGL.h b/make/stub_includes/macosx/OpenGL/OpenGL.h
index 1a3ddf203..33cfa46b6 100644
--- a/make/stub_includes/macosx/OpenGL/OpenGL.h
+++ b/make/stub_includes/macosx/OpenGL/OpenGL.h
@@ -2,10 +2,13 @@
OpenGL.h to expose portions of the low-level CGL API to Java */
/* Typedefs to get things working */
-typedef struct _cglObj* CGLContextObj;
-typedef struct _cglObj* CGLShareGroupObj;
-typedef struct _cglObj* CGLPBufferObj;
-typedef struct _cglObj* CGLPixelFormatObj;
+typedef struct _cglContextObj* CGLContextObj;
+typedef struct _cglPBufferObj* CGLPBufferObj;
+typedef struct _cglPixelFormatObj* CGLPixelFormatObj;
+
+typedef int GLint; /* 4-byte signed */
+typedef unsigned int GLenum;
+typedef int GLsizei; /* 4-byte signed */
/*
** Attribute names for CGLChoosePixelFormat and CGLDescribePixelFormat.
@@ -105,7 +108,7 @@ typedef enum _CGLContextParameter {
/* Pixel format manipulation */
CGLError CGLChoosePixelFormat(const CGLPixelFormatAttribute *attribs,
CGLPixelFormatObj *pix,
- long *npix);
+ GLint *npix);
CGLError CGLDestroyPixelFormat(CGLPixelFormatObj pix);
CGLPixelFormatObj CGLGetPixelFormat ( CGLContextObj ctx );
@@ -123,16 +126,16 @@ CGLError CGLCopyContext ( CGLContextObj src, CGLContextObj dst, int mask );
CGLShareGroupObj CGLGetShareGroup(CGLContextObj ctx);
-/* PBuffer manipulation */
-CGLError CGLCreatePBuffer(long width,
- long height,
- unsigned long target,
- unsigned long internalFormat,
- long max_level,
+/* PBuffer manipulation (deprecated in 10.7) */
+CGLError CGLCreatePBuffer(GLsizei width,
+ GLsizei height,
+ GLenum target,
+ GLenum internalFormat,
+ GLint max_level,
CGLPBufferObj* pbuffer);
CGLError CGLDestroyPBuffer(CGLPBufferObj pbuffer);
CGLError CGLSetPBuffer(CGLContextObj ctx,
CGLPBufferObj pbuffer,
- unsigned long face,
- long level,
- long screen);
+ GLenum face,
+ GLint level,
+ GLint screen);
diff --git a/make/stub_includes/macosx/QuartzCore/CALayer.h b/make/stub_includes/macosx/QuartzCore/CALayer.h
new file mode 100644
index 000000000..a5a6579a6
--- /dev/null
+++ b/make/stub_includes/macosx/QuartzCore/CALayer.h
@@ -0,0 +1 @@
+typedef struct _CALayer CALayer;
diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h
index 65d8e41f7..347de6299 100644
--- a/make/stub_includes/opengl/macosx-window-system.h
+++ b/make/stub_includes/opengl/macosx-window-system.h
@@ -7,55 +7,63 @@
compilation then the build fails.
*/
+#include <AppKit/NSView.h>
+#include <AppKit/NSOpenGL.h>
+#include <AppKit/NSOpenGLView.h>
+#include <AppKit/NSOpenGLLayer.h>
+#include <OpenGL/CGLDevice.h>
+#include <OpenGL/OpenGL.h>
+
typedef int Bool;
// CGL ..
-void CGLQueryPixelFormat(void* pixelFormat, int* iattrs, int niattrs, int* ivalues);
+void CGLQueryPixelFormat(CGLPixelFormatObj fmt, int* iattrs, int niattrs, int* ivalues);
// NS ..
-void* createPixelFormat(int* iattrs, int niattrs, int* ivalues);
-void queryPixelFormat(void* pixelFormat, int* iattrs, int niattrs, int* ivalues);
-void deletePixelFormat(void* pixelFormat);
+NSOpenGLPixelFormat* createPixelFormat(int* iattrs, int niattrs, int* ivalues);
+void queryPixelFormat(NSOpenGLPixelFormat* fmt, int* iattrs, int niattrs, int* ivalues);
+void deletePixelFormat(NSOpenGLPixelFormat* fmt);
// NS ..
-void *getCurrentContext(void);
-void *getNSView(void* nsContext);
+NSOpenGLContext* getCurrentContext(void);
+CGLContextObj getCGLContext(NSOpenGLContext* ctx);
+NSView* getNSView(NSOpenGLContext* ctx);
-void* createContext(void* shareContext,
- void* nsView,
- void* pixelFormat,
+NSOpenGLContext* createContext(NSOpenGLContext* shareContext,
+ NSView* nsView,
+ Bool isBackingLayerView,
+ NSOpenGLPixelFormat* pixelFormat,
Bool opaque,
int* viewNotReady);
-void *getCGLContext(void* nsContext);
-Bool makeCurrentContext(void* nsContext);
-Bool clearCurrentContext(void *nsContext);
-Bool deleteContext(void* nsContext, Bool releaseOnMainThread);
-Bool flushBuffer(void* nsContext);
-void setContextOpacity(void* nsContext, int opacity);
-void updateContext(void* nsContext);
-void copyContext(void* destContext, void* srcContext, int mask);
-
-void* updateContextRegister(void* nsContext, void* nsView);
+Bool makeCurrentContext(NSOpenGLContext* ctx);
+Bool clearCurrentContext(NSOpenGLContext *ctx);
+Bool deleteContext(NSOpenGLContext* ctx, Bool releaseOnMainThread);
+Bool flushBuffer(NSOpenGLContext* ctx);
+void setContextOpacity(NSOpenGLContext* ctx, int opacity);
+void updateContext(NSOpenGLContext* ctx);
+void copyContext(NSOpenGLContext* dest, NSOpenGLContext* src, int mask);
+
+void* updateContextRegister(NSOpenGLContext* ctx, NSView* view);
Bool updateContextNeedsUpdate(void* updater);
void updateContextUnregister(void* updater);
-void* createPBuffer(int renderTarget, int internalFormat, int width, int height);
-Bool destroyPBuffer(void* pBuffer);
-void setContextPBuffer(void* nsContext, void* pBuffer);
-void setContextTextureImageToPBuffer(void* nsContext, void* pBuffer, int colorBuffer);
+NSOpenGLPixelBuffer* createPBuffer(int renderTarget, int internalFormat, int width, int height);
+Bool destroyPBuffer(NSOpenGLPixelBuffer* pBuffer);
+void setContextPBuffer(NSOpenGLContext* ctx, NSOpenGLPixelBuffer* pBuffer);
+void setContextTextureImageToPBuffer(NSOpenGLContext* ctx, NSOpenGLPixelBuffer* pBuffer, GLenum colorBuffer);
+
+// NSOpenGLLayer* createNSOpenGLLayer(NSOpenGLContext* ctx, NSOpenGLPixelFormat* fmt, NSView* view, Bool opaque);
+NSOpenGLLayer* createNSOpenGLLayer(NSOpenGLContext* ctx, NSOpenGLPixelFormat* fmt, NSOpenGLPixelBuffer* pbuffer, Bool opaque, int texWidth, int texHeight);
+void setNSOpenGLLayerSwapInterval(NSOpenGLLayer* layer, int interval);
+void waitUntilNSOpenGLLayerIsReady(NSOpenGLLayer* layer, long to_ms);
+void setNSOpenGLLayerNeedsDisplay(NSOpenGLLayer* glLayer);
+void releaseNSOpenGLLayer(NSOpenGLLayer *glLayer);
void* getProcAddress(const char *procName);
-void setSwapInterval(void* nsContext, int interval);
+void setSwapInterval(NSOpenGLContext* ctx, int interval);
/* Gamma-related functionality */
Bool setGammaRamp(int tableSize, float* redRamp, float* greenRamp, float* blueRamp);
void resetGammaRamp();
-/****************************************************************************************/
-/* Java2D/JOGL bridge support; need to be able to create pbuffers and
- contexts using the CGL APIs to be able to share textures, etc. with
- contexts created by Java2D/JOGL bridge, which are CGLContextObjs */
-
-/* Pick up copies of CGL signatures from Mac OS X stub_includes/window-system-build directory */
-#include <OpenGL/OpenGL.h>