[gtk/wip/otte/gles: 4/5] gles: glGetTexLevelParameter() isn't supported
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/gles: 4/5] gles: glGetTexLevelParameter() isn't supported
- Date: Sat, 25 Dec 2021 14:08:16 +0000 (UTC)
commit 5803dd765dcc1584d09e1e5e7d7d635e40e63347
Author: Benjamin Otte <otte redhat com>
Date: Sat Dec 25 14:46:07 2021 +0100
gles: glGetTexLevelParameter() isn't supported
gdk/gdkgltexture.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkgltexture.c b/gdk/gdkgltexture.c
index 867fd538cd..a1c75a62fd 100644
--- a/gdk/gdkgltexture.c
+++ b/gdk/gdkgltexture.c
@@ -21,6 +21,7 @@
#include "gdkgltextureprivate.h"
#include "gdkdisplayprivate.h"
+#include "gdkglcontextprivate.h"
#include "gdkmemoryformatprivate.h"
#include "gdkmemorytextureprivate.h"
#include "gdktextureprivate.h"
@@ -305,9 +306,11 @@ gdk_gl_texture_determine_format (GdkGLTexture *self)
GLint active_texture;
GLint internal_format;
- if (self->context != gdk_gl_context_get_current ())
+ /* Abort if somebody else is GL-ing here... */
+ if (self->context != gdk_gl_context_get_current () ||
+ /* ... or glGetTexLevelParameter() isn't supported */
+ !gdk_gl_context_check_version (self->context, 0, 0, 3, 1))
{
- /* Somebody else is GL-ing here, abort! */
texture->format = GDK_MEMORY_DEFAULT;
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]