diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-03-23 22:56:06 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-03-23 22:56:06 -0400 |
commit | 4291f27b562f58b4d86b4f1816047614f71e6085 (patch) | |
tree | f36b4adafac94d3f2ec07a49545dc278b2219c4b /gdk | |
parent | 9f4013c5b4fc8cb5c9335b3e2a18a5bfd98c3081 (diff) | |
download | gtk+-4291f27b562f58b4d86b4f1816047614f71e6085.tar.gz |
gltexture: Try harder to determine the format
We can query these things as long as the texture ID
is valid in the current context.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdkgltexture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/gdkgltexture.c b/gdk/gdkgltexture.c index c0ff8100aa..85ea47b680 100644 --- a/gdk/gdkgltexture.c +++ b/gdk/gdkgltexture.c @@ -317,9 +317,9 @@ gdk_gl_texture_determine_format (GdkGLTexture *self) GLint internal_format; /* Abort if somebody else is GL-ing here... */ - if (self->context != gdk_gl_context_get_current () || + if (!gdk_gl_context_is_shared (self->context, gdk_gl_context_get_current ()) || /* ... or glGetTexLevelParameter() isn't supported */ - !gdk_gl_context_check_version (self->context, 0, 0, 3, 1)) + !gdk_gl_context_check_version (gdk_gl_context_get_current (), 0, 0, 3, 1)) { texture->format = GDK_MEMORY_DEFAULT; return; |