mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 06:00:45 +00:00
winemac.drv: Actually make the GL context current even if no drawables were given.
The spec for GL_ARB_framebuffer_object (and thus, OpenGL 3.x and up) is quite clear on what happens when a context is made current with no drawable(s). In fact, the WGL_ARB_create_context extension amends WGL_ARB_make_current_read (as well as the base spec for wglMakeCurrent) specifically to allow this. Signed-off-by: Charles Davis <cdavis5x@gmail.com> Signed-off-by: Ken Thomases <ken@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7dd90faaa3
commit
02416314ab
@ -235,7 +235,10 @@ void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v)
|
||||
}
|
||||
|
||||
if (context)
|
||||
{
|
||||
[context removeFromViews:YES];
|
||||
[context makeCurrentContext];
|
||||
}
|
||||
}
|
||||
|
||||
[pool release];
|
||||
|
@ -3057,7 +3057,13 @@ static BOOL macdrv_wglMakeContextCurrentARB(HDC draw_hdc, HDC read_hdc, struct w
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((hwnd = WindowFromDC(draw_hdc)))
|
||||
if (!draw_hdc && !read_hdc)
|
||||
{
|
||||
context->draw_hwnd = NULL;
|
||||
context->draw_view = NULL;
|
||||
context->draw_pbuffer = NULL;
|
||||
}
|
||||
else if ((hwnd = WindowFromDC(draw_hdc)))
|
||||
{
|
||||
if (!(data = get_win_data(hwnd)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user