Re: [PATCH] winemac.drv: Actually make the GL context current even if no drawables were given.
On Feb 16, 2016, at 1:50 PM, Charles Davis <cdavis5x(a)gmail.com> wrote:
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(a)gmail.com> --- dlls/winemac.drv/cocoa_opengl.m | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/winemac.drv/cocoa_opengl.m b/dlls/winemac.drv/cocoa_opengl.m index ec2b191..4694dfd 100644 --- a/dlls/winemac.drv/cocoa_opengl.m +++ b/dlls/winemac.drv/cocoa_opengl.m @@ -235,7 +235,10 @@ void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v) }
if (context) + { [context removeFromViews:YES]; + [context makeCurrentContext]; + } }
I don't think this can be sufficient. The logic in macdrv_wglMakeContextCurrentARB() essentially means that macdrv_make_context_current() will never be called with a NULL view and a non-NULL context. The "if" statement that you're changing is mostly just extra safety and, as things stand, shouldn't ever execute its statement. -Ken
participants (1)
-
Ken Thomases