aboutsummaryrefslogtreecommitdiffstats
path: root/make/stub_includes/opengl/macosx-window-system.h
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-15 22:57:38 +0000
committerKenneth Russel <[email protected]>2009-06-15 22:57:38 +0000
commita959c53b7ac91e489bf0959391e892790b9ff248 (patch)
tree4664742a4f9f6daa694364292e376ad2e6ee97d1 /make/stub_includes/opengl/macosx-window-system.h
parent506b634b780dcd23aa61015c2ceba3e687196abf (diff)
Copied JOGL_2_SANDBOX r1957 on to trunk; JOGL_2_SANDBOX branch is now closed
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1959 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/stub_includes/opengl/macosx-window-system.h')
-rw-r--r--make/stub_includes/opengl/macosx-window-system.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h
new file mode 100644
index 000000000..f43adb546
--- /dev/null
+++ b/make/stub_includes/opengl/macosx-window-system.h
@@ -0,0 +1,50 @@
+/* C routines encapsulating small amounts of Objective C code to allow
+ nsContext creation and manipulation to occur from Java
+
+ It's unfortunate this couldn't be placed in the macosx
+ stub_includes directory, but due to the presence of the jni.h stub
+ headers in that directory, if that is in the include path during
+ compilation then the build fails.
+*/
+
+typedef int Bool;
+
+void* createPixelFormat(int* iattrs, int niattrs, int* ivalues);
+void queryPixelFormat(void* pixelFormat, int* iattrs, int niattrs, int* ivalues);
+void deletePixelFormat(void* pixelFormat);
+
+void* createContext(void* shareContext,
+ void* nsView,
+ void* pixelFormat,
+ int* viewNotReady);
+Bool makeCurrentContext(void* nsContext);
+Bool clearCurrentContext(void* nsContext);
+Bool deleteContext(void* nsContext);
+Bool flushBuffer(void* nsContext);
+void setContextOpacity(void* context, int opacity);
+void updateContext(void* nsContext);
+void copyContext(void* destContext, void* srcContext, int mask);
+
+void* updateContextRegister(void* nsContext, void* nsView);
+void updateContextUnregister(void* nsContext, void* nsView, void* updater);
+
+void* createPBuffer(int renderTarget, int internalFormat, int width, int height);
+Bool destroyPBuffer(void* nsContext, void* pBuffer);
+void setContextPBuffer(void* nsContext, void* pBuffer);
+void setContextTextureImageToPBuffer(void* nsContext, void* pBuffer, int colorBuffer);
+
+void* getProcAddress(const char *procName);
+
+void setSwapInterval(void* nsContext, 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>