From 25d6855dc0b54aeb4d79080a5adb8cea75b80144 Mon Sep 17 00:00:00 2001 From: Marcian Lytwyn Date: Wed, 21 Nov 2012 20:58:07 +0000 Subject: [PATCH] Merge back with main branch git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35814 72102866-910b-0410-8b05-ffd578937521 --- Source/win32/w32_GLcontext.m | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Source/win32/w32_GLcontext.m b/Source/win32/w32_GLcontext.m index 7f0bb11..37c17b9 100644 --- a/Source/win32/w32_GLcontext.m +++ b/Source/win32/w32_GLcontext.m @@ -284,6 +284,13 @@ static Win32GLContext *currentGLContext; } } +- (void *)CGLContextObj +{ + // FIXME: Until we have a wrapper library + // return the underlying context directly + return (void*)wgl_context; +} + - (void)clearDrawable { [self _detach]; @@ -327,7 +334,21 @@ static Win32GLContext *currentGLContext; } -- (id)initWithFormat:(NSOpenGLPixelFormat *)aFormat +- (id)initWithCGLContextObj: (void *)context +{ + self = [super init]; + + if (!self) + { + return nil; + } + + // FIXME: Need to set the pixelFormat ivar + wgl_context = context; + return self; +} + +- (id)initWithFormat:(NSOpenGLPixelFormat *)aFormat shareContext:(NSOpenGLContext *)share { NSDebugMLLog(@"WGL", @"will init with format %@", aFormat);