From 4f936be964c9e8613a5e43e1d88490ff7f550ec9 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 8 Jul 2003 09:20:04 +0000 Subject: Added sharing of display lists and textures among OpenGL contexts through new methods in GLDrawableFactory; GLContext has not been exposed in the public API. Tested with new simple TestContextSharing demonstration on Windows, Linux and Mac OS X. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@18 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/native/jogl/MacOSXWindowSystemInterface.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/native/jogl/MacOSXWindowSystemInterface.m') diff --git a/src/native/jogl/MacOSXWindowSystemInterface.m b/src/native/jogl/MacOSXWindowSystemInterface.m index 074b98b2a..11188f377 100644 --- a/src/native/jogl/MacOSXWindowSystemInterface.m +++ b/src/native/jogl/MacOSXWindowSystemInterface.m @@ -3,8 +3,9 @@ typedef int Bool; -void* createContext(void* nsView) { +void* createContext(void* nsView, void* shareContext) { NSView *view = nsView; + NSOpenGLContext *share = shareContext; // FIXME: hardcoded pixel format. Instead pass these attributes down // as arguments. There is really no way to enumerate the possible @@ -28,7 +29,7 @@ void* createContext(void* nsView) { NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: (NSOpenGLPixelFormatAttribute*) attribs]; - NSOpenGLContext* context = [[NSOpenGLContext alloc] initWithFormat: [fmt autorelease] shareContext: nil]; + NSOpenGLContext* context = [[NSOpenGLContext alloc] initWithFormat: [fmt autorelease] shareContext: share]; if (view != nil) { [context setView: view]; -- cgit v1.2.3