[gtkmm/gtkmm-3-24] Gdk::GLContext: Add unset_use_es()
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-3-24] Gdk::GLContext: Add unset_use_es()
- Date: Sun, 4 Nov 2018 16:17:58 +0000 (UTC)
commit b1c1cfbc7772a7de35817e35769fb68bf3215e7a
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Sun Nov 4 17:13:26 2018 +0100
Gdk::GLContext: Add unset_use_es()
Bug #787898
gdk/src/glcontext.ccg | 4 ++++
gdk/src/glcontext.hg | 28 ++++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
---
diff --git a/gdk/src/glcontext.ccg b/gdk/src/glcontext.ccg
index a983de1d..c3666b14 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 7c54ef60..9193efa2 100644
--- a/gdk/src/glcontext.hg
+++ b/gdk/src/glcontext.hg
@@ -53,7 +53,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,24}
+ */
+ 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")
_WRAP_METHOD(void make_current(), gdk_gl_context_make_current, newin "3,18")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]