[gtk/wip/otte/gles: 3/5] gles: GLES 2 doesn't have glDrawBuffers()




commit 6a310b50690258eca29c0e291aa26c9d9c3c94d4
Author: Benjamin Otte <otte redhat com>
Date:   Sat Dec 25 14:43:33 2021 +0100

    gles: GLES 2 doesn't have glDrawBuffers()
    
    So don't call it.

 gdk/gdkglcontext.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 042c30a41d..62b60f5ebc 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -580,8 +580,8 @@ gdk_gl_context_real_begin_frame (GdkDrawContext *draw_context,
   glViewport (0, 0, ww, wh);
 
 #ifdef HAVE_EGL
-  if (priv->egl_context)
-    glDrawBuffers (1, (GLenum[1]) { GL_BACK_LEFT });
+  if (priv->egl_context && gdk_gl_context_check_version (context, 0, 0, 3, 0))
+    glDrawBuffers (1, (GLenum[1]) { gdk_gl_context_get_use_es (context) ? GL_BACK : GL_BACK_LEFT });
 #endif
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]