aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-09-25 12:30:31 -0700
committerSven Gothel <[email protected]>2009-09-25 12:30:31 -0700
commit760d6821e09985252c8b439d9a92bead7bcf1193 (patch)
tree71808409d1b424eb2d24e13942babc219b3bf64d /make
parent82ff74cfca31c3c72d9c1de260c17323943fa571 (diff)
Fix MacOSX External GLContext
Diffstat (limited to 'make')
-rw-r--r--make/build-jogl.xml2
-rw-r--r--make/stub_includes/macosx/OpenGL/OpenGL.h26
-rw-r--r--make/stub_includes/opengl/macosx-window-system.h17
3 files changed, 41 insertions, 4 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index c541748f8..64e5cf93a 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -1408,6 +1408,7 @@
<condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>
<patternset id="c.src.files.jogl.gl2">
+ <include name="${rootrel.src.c}/macosx/MacOSXCustomCGLCode.c" if="isOSX"/>
<include name="${rootrel.src.c}/macosx/MacOSXWindowSystemInterface.m" if="isOSX"/>
<include name="${rootrel.src.c}/macosx/ContextUpdater.m" if="isOSX"/>
<include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
@@ -1426,6 +1427,7 @@
</patternset>
<patternset id="c.src.files.jogl.gl2es12">
+ <include name="${rootrel.src.c}/macosx/MacOSXCustomCGLCode.c" if="isOSX"/>
<include name="${rootrel.src.c}/macosx/MacOSXWindowSystemInterface.m" if="isOSX"/>
<include name="${rootrel.src.c}/macosx/ContextUpdater.m" if="isOSX"/>
<include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
diff --git a/make/stub_includes/macosx/OpenGL/OpenGL.h b/make/stub_includes/macosx/OpenGL/OpenGL.h
index 16225b46b..afb11efea 100644
--- a/make/stub_includes/macosx/OpenGL/OpenGL.h
+++ b/make/stub_includes/macosx/OpenGL/OpenGL.h
@@ -73,18 +73,44 @@ typedef enum _CGLError {
kCGLBadConnection = 10017 /* invalid CoreGraphics connection */
} CGLError;
+typedef enum _CGLContextParameter {
+ kCGLCPSwapRectangle = 200,
+ kCGLCPSwapInterval = 222,
+ kCGLCPDispatchTableSize = 224,
+ kCGLCPClientStorage = 226,
+ kCGLCPSurfaceTexture = 228,
+ kCGLCPSurfaceOrder = 235,
+ kCGLCPSurfaceOpacity = 236,
+ kCGLCPSurfaceBackingSize = 304,
+ kCGLCPSurfaceSurfaceVolatile = 306,
+ kCGLCPReclaimResources = 308,
+ kCGLCPCurrentRendererID = 309,
+ kCGLCPGPUVertexProcessing = 310,
+ kCGLCPGPUFragmentProcessing = 311,
+ kCGLCPHasDrawable = 314,
+ kCGLCPMPSwapsInFlight = 315,
+} CGLContextParameter;
+
/* Pixel format manipulation */
CGLError CGLChoosePixelFormat(const CGLPixelFormatAttribute *attribs,
CGLPixelFormatObj *pix,
long *npix);
CGLError CGLDestroyPixelFormat(CGLPixelFormatObj pix);
+CGLPixelFormatObj CGLGetPixelFormat ( CGLContextObj ctx );
/* Context manipulation */
CGLError CGLCreateContext(CGLPixelFormatObj pix,
CGLContextObj share,
CGLContextObj* ctx);
+void CGLReleaseContext(CGLContextObj ctx);
CGLError CGLDestroyContext(CGLContextObj ctx);
CGLError CGLSetCurrentContext(CGLContextObj ctx);
+CGLContextObj CGLGetCurrentContext (void);
+CGLError CGLFlushDrawable ( CGLContextObj ctx);
+CGLError CGLSetParameter ( CGLContextObj ctx, CGLContextParameter pname, const int *params );
+CGLError CGLCopyContext ( CGLContextObj src, CGLContextObj dst, int mask );
+
+
/* PBuffer manipulation */
CGLError CGLCreatePBuffer(long width,
diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h
index f43adb546..7d2704be4 100644
--- a/make/stub_includes/opengl/macosx-window-system.h
+++ b/make/stub_includes/opengl/macosx-window-system.h
@@ -9,27 +9,36 @@
typedef int Bool;
+// CGL ..
+void CGLQueryPixelFormat(void* pixelFormat, 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);
+// NS ..
+void *getCurrentContext(void);
+void *getNSView(void* nsContext);
+
void* createContext(void* shareContext,
void* nsView,
void* pixelFormat,
int* viewNotReady);
+void *getCGLContext(void* nsContext);
Bool makeCurrentContext(void* nsContext);
-Bool clearCurrentContext(void* nsContext);
+Bool clearCurrentContext(void *nsContext);
Bool deleteContext(void* nsContext);
Bool flushBuffer(void* nsContext);
-void setContextOpacity(void* context, int opacity);
+void setContextOpacity(void* nsContext, 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 updateContextUnregister(void* updater);
void* createPBuffer(int renderTarget, int internalFormat, int width, int height);
-Bool destroyPBuffer(void* nsContext, void* pBuffer);
+Bool destroyPBuffer(void* pBuffer);
void setContextPBuffer(void* nsContext, void* pBuffer);
void setContextTextureImageToPBuffer(void* nsContext, void* pBuffer, int colorBuffer);