mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
gltexture: Try harder to determine the format
We can query these things as long as the texture ID is valid in the current context.
This commit is contained in:
parent
9f4013c5b4
commit
4291f27b56
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user