Commit 02416314 authored by Charles Davis's avatar Charles Davis Committed by Alexandre Julliard

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: 's avatarCharles Davis <cdavis5x@gmail.com> Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 7dd90faa
......@@ -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)))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment