projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f4013c
)
gltexture: Try harder to determine the format
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 24 Mar 2023 02:56:06 +0000
(22:56 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 24 Mar 2023 02:56:06 +0000
(22:56 -0400)
We can query these things as long as the texture ID
is valid in the current context.
gdk/gdkgltexture.c
patch
|
blob
|
history
diff --git
a/gdk/gdkgltexture.c
b/gdk/gdkgltexture.c
index c0ff8100aabdfbc5d09d710571067e473e14c237..85ea47b680d87e816b354cdbaab9ec5b6292e9b5 100644
(file)
--- 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;