[gtkmm] Gdk::GLContext: Add unset_use_es()



commit 6ced47fc56cc2157d6b87504d69dcaf27555dd43
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Sun Sep 24 17:11:09 2017 +0200

    Gdk::GLContext: Add unset_use_es()
    
    Bug 787898

 gdk/src/glcontext.ccg |    4 ++++
 gdk/src/glcontext.hg  |   28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/gdk/src/glcontext.ccg b/gdk/src/glcontext.ccg
index a983de1..c3666b1 100644
--- a/gdk/src/glcontext.ccg
+++ b/gdk/src/glcontext.ccg
@@ -19,5 +19,9 @@
 
 namespace Gdk
 {
+void GLContext::unset_use_es()
+{
+  gdk_gl_context_set_use_es(gobj(), -1);
+}
 
 } // namespace Gdk
diff --git a/gdk/src/glcontext.hg b/gdk/src/glcontext.hg
index 8775989..044030e 100644
--- a/gdk/src/glcontext.hg
+++ b/gdk/src/glcontext.hg
@@ -56,7 +56,35 @@ public:
   _WRAP_METHOD(void set_debug_enabled(bool enabled = true), gdk_gl_context_set_debug_enabled, newin "3,18")
   _WRAP_METHOD(bool get_forward_compatible() const, gdk_gl_context_get_forward_compatible, newin "3,18")
   _WRAP_METHOD(void set_forward_compatible(bool compatible = true), gdk_gl_context_set_forward_compatible, 
newin "3,18")
+
+  /** Requests that GDK create an OpenGL ES context instead of an OpenGL one,
+   * if the platform and windowing system allows it.
+   *
+   * The %GLContext must not have been realized.
+   *
+   * By default, GDK will attempt to automatically detect whether the
+   * underlying GL implementation is OpenGL or OpenGL ES once the %GLContext
+   * is realized.
+   *
+   * You should check the return value of get_use_es() after
+   * calling realize() to decide whether to use the OpenGL or
+   * OpenGL ES API, extensions, or shaders.
+   *
+   * @newin{3,22}
+   *
+   * @param use_es Whether the context should use OpenGL ES instead of OpenGL.
+   */
   _WRAP_METHOD(void set_use_es(bool use_es = true), gdk_gl_context_set_use_es)
+
+  /** Undo a previous call to set_use_es().
+   *
+   * GDK will attempt to automatically detect whether the underlying
+   * GL implementation is OpenGL or OpenGL ES once the %GLContext is realized.
+   *
+   * @newin{3,92}
+   */
+  void unset_use_es();
+
   _WRAP_METHOD(bool get_use_es() const, gdk_gl_context_get_use_es)
   _WRAP_METHOD(bool realize(), gdk_gl_context_realize, errthrow, newin "3,18")
 


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