Skip to content

Instantly share code, notes, and snippets.

@fxcoudert
Created April 4, 2018 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fxcoudert/539dc389d5f651bf713f684d43bb254b to your computer and use it in GitHub Desktop.
Save fxcoudert/539dc389d5f651bf713f684d43bb254b to your computer and use it in GitHub Desktop.
diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c
index f11727fe8a..25de2372d1 100644
--- a/dlls/winemac.drv/opengl.c
+++ b/dlls/winemac.drv/opengl.c
@@ -847,8 +847,7 @@ static void enum_renderer_pixel_formats(renderer_properties renderer, CFMutableA
n = n_stack[n_stack_idx];
- if (backing_store)
- attribs[n++] = kCGLPFABackingStore;
+ attribs[n++] = kCGLPFABackingStore;
request.backing_store = backing_store;
attribs[n] = 0;
@@ -1245,6 +1244,7 @@ static BOOL init_gl_info(void)
CGOpenGLDisplayMask displayMask = CGDisplayIDToOpenGLDisplayMask(display);
CGLPixelFormatAttribute attribs[] = {
kCGLPFADisplayMask, displayMask,
+ kCGLPFABackingStore,
0
};
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
@@ -1253,6 +1253,7 @@ static BOOL init_gl_info(void)
kCGLPFADisplayMask, displayMask,
kCGLPFAAccelerated,
kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute)kCGLOGLPVersion_3_2_Core,
+ kCGLPFABackingStore,
0
};
#endif
@@ -1476,8 +1477,7 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
attribs[n++] = pf->samples;
}
- if (pf->backing_store)
- attribs[n++] = kCGLPFABackingStore;
+ attribs[n++] = kCGLPFABackingStore;
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (core)
@@ -1845,6 +1845,7 @@ static CGLPixelFormatObj create_pixel_format_for_renderer(CGLRendererInfoObj ren
CGLPixelFormatAttribute attrs[] = {
kCGLPFARendererID, 0,
kCGLPFASingleRenderer,
+ kCGLPFABackingStore,
0, 0, /* reserve spots for kCGLPFAOpenGLProfile, kCGLOGLPVersion_3_2_Core */
0
};
@@ -1855,8 +1856,8 @@ static CGLPixelFormatObj create_pixel_format_for_renderer(CGLRendererInfoObj ren
if (core)
{
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- attrs[3] = kCGLPFAOpenGLProfile;
- attrs[4] = (CGLPixelFormatAttribute)kCGLOGLPVersion_3_2_Core;
+ attrs[4] = kCGLPFAOpenGLProfile;
+ attrs[5] = (CGLPixelFormatAttribute)kCGLOGLPVersion_3_2_Core;
#else
return NULL;
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment