mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
back/win32: Fix for multiple NSOpenGLView's
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29940 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
36260d2295
commit
1561ba0aec
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2010-03-13 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
|
* Source/win32/w32_GLcontext.m:
|
||||||
|
Make more than one NSOpenGLView in an application work.
|
||||||
|
|
||||||
|
Win32GLContext was using the hDC stored in the pixel format
|
||||||
|
object in a few places, instead of getting it from the
|
||||||
|
Win32Subwindow object.
|
||||||
|
|
||||||
2010-03-13 Eric Wasylishen <ewasylishen@gmail.com>
|
2010-03-13 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Headers/win32/WIN32Server.h:
|
* Headers/win32/WIN32Server.h:
|
||||||
|
|
|
@ -269,7 +269,7 @@ static Win32GLContext *currentGLContext;
|
||||||
{
|
{
|
||||||
[Win32GLContext clearCurrentContext];
|
[Win32GLContext clearCurrentContext];
|
||||||
}
|
}
|
||||||
format->wgl_drawable = (HDC)NULL;
|
wsubwin->hDC = (HDC)NULL;
|
||||||
DESTROY(wsubwin);
|
DESTROY(wsubwin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,7 @@ static Win32GLContext *currentGLContext;
|
||||||
|
|
||||||
- (void)flushBuffer
|
- (void)flushBuffer
|
||||||
{
|
{
|
||||||
SwapBuffers(format->wgl_drawable);
|
SwapBuffers(wsubwin->hDC);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)getValues:(long *)vals
|
- (void)getValues:(long *)vals
|
||||||
|
@ -360,11 +360,11 @@ static Win32GLContext *currentGLContext;
|
||||||
[NSException raise: NSGenericException
|
[NSException raise: NSGenericException
|
||||||
format: @"GL Context is not bind, cannot be made current"];
|
format: @"GL Context is not bind, cannot be made current"];
|
||||||
|
|
||||||
NSAssert(wgl_context && format->wgl_drawable,
|
NSAssert(wgl_context && wsubwin->hDC,
|
||||||
NSInternalInconsistencyException);
|
NSInternalInconsistencyException);
|
||||||
|
|
||||||
NSDebugMLLog(@"WGL", @"before wglMakeCurrent");
|
NSDebugMLLog(@"WGL", @"before wglMakeCurrent");
|
||||||
wglMakeCurrent(format->wgl_drawable, wgl_context);
|
wglMakeCurrent(wsubwin->hDC, wgl_context);
|
||||||
NSDebugMLLog(@"WGL", @"after wglMakeCurrent");
|
NSDebugMLLog(@"WGL", @"after wglMakeCurrent");
|
||||||
|
|
||||||
// NSAssert(glx_context != None, NSInternalInconsistencyException);
|
// NSAssert(glx_context != None, NSInternalInconsistencyException);
|
||||||
|
|
Loading…
Reference in a new issue