mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
Fix a bug in error checking conditions. This avoids unintentional Legacy
of the created OpenGL context
This commit is contained in:
parent
3c9b3ead6f
commit
7b8a5235d4
@ -344,14 +344,14 @@ create_pixel_format (GdkGLVersion *version,
|
||||
if (gdk_gl_version_get_major (version) >= 4)
|
||||
{
|
||||
attrs[1] = (CGLPixelFormatAttribute)kCGLOGLPVersion_GL4_Core;
|
||||
if (CGLChoosePixelFormat (attrs, &format, &n_format))
|
||||
if (CHECK (error, CGLChoosePixelFormat (attrs, &format, &n_format)))
|
||||
return g_steal_pointer (&format);
|
||||
}
|
||||
|
||||
if (gdk_gl_version_greater_equal (version, &GDK_GL_MIN_GL_VERSION))
|
||||
{
|
||||
attrs[1] = (CGLPixelFormatAttribute)kCGLOGLPVersion_GL3_Core;
|
||||
if (CGLChoosePixelFormat (attrs, &format, &n_format))
|
||||
if (CHECK (error, CGLChoosePixelFormat (attrs, &format, &n_format)))
|
||||
return g_steal_pointer (&format);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user