From 706d2a28aa86ad3fb1d66b0dcb4f61c9ff52a88b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 1 Sep 2014 15:49:10 +0900 Subject: [PATCH 1/7] GLView: Add API to get the Evas_GL Before screaming "don't expose this", here's the reasoning: There will be a few new APIs in evas-gl (support pbuffer, ...) that require a pointer to the Evas_GL to be called. So, instead of exposing each and every one of these evas gl functions in a dummy wrapper in elm_glview, we just give access to the real pointer. GLView will always be a wrapper around evas_gl, because that's what it is by definition. --- legacy/elementary/src/lib/elm_glview.c | 6 ++++++ legacy/elementary/src/lib/elm_glview.eo | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/legacy/elementary/src/lib/elm_glview.c b/legacy/elementary/src/lib/elm_glview.c index 26c11a83c1..0e10f2511e 100644 --- a/legacy/elementary/src/lib/elm_glview.c +++ b/legacy/elementary/src/lib/elm_glview.c @@ -417,6 +417,12 @@ _elm_glview_changed_set(Eo *obj, Elm_Glview_Data *sd) ecore_idle_enterer_before_add((Ecore_Task_Cb)_render_cb, obj); } +EOLIAN static Evas_GL * +_elm_glview_evas_gl_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd) +{ + return sd->evasgl; +} + static void _elm_glview_class_constructor(Eo_Class *klass) { diff --git a/legacy/elementary/src/lib/elm_glview.eo b/legacy/elementary/src/lib/elm_glview.eo index 5dd2e2fc14..cbd065379b 100644 --- a/legacy/elementary/src/lib/elm_glview.eo +++ b/legacy/elementary/src/lib/elm_glview.eo @@ -162,6 +162,23 @@ class Elm_Glview (Elm_Widget) return: Evas_GL_API *; } } + evas_gl { + get { + /*@ + Get the internal Evas GL attached to this view. + + @note The returned Evas_GL must not be destroyed as it is still owned + by the view. But this pointer can be used then to call all the evas_gl_ + functions. + + @since 1.12 + + @return The Evas_GL used by this GLView. + + @ingroup GLView */ + return: Evas_GL *; + } + } } implements { class.constructor; From 5bcc39398f22d230f1aa12db688076e591ce936a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 1 Sep 2014 16:36:36 +0900 Subject: [PATCH 2/7] GLView: Clean up the native surface during deletion --- legacy/elementary/src/lib/elm_glview.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/elm_glview.c b/legacy/elementary/src/lib/elm_glview.c index 0e10f2511e..20216c8694 100644 --- a/legacy/elementary/src/lib/elm_glview.c +++ b/legacy/elementary/src/lib/elm_glview.c @@ -239,6 +239,8 @@ _elm_glview_evas_object_smart_add(Eo *obj, Elm_Glview_Data *priv) EOLIAN static void _elm_glview_evas_object_smart_del(Eo *obj, Elm_Glview_Data *sd) { + ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); + // Call delete func if it's registered if (sd->del_func) { @@ -248,7 +250,11 @@ _elm_glview_evas_object_smart_del(Eo *obj, Elm_Glview_Data *sd) ecore_idle_enterer_del(sd->render_idle_enterer); - if (sd->surface) evas_gl_surface_destroy(sd->evasgl, sd->surface); + if (sd->surface) + { + evas_object_image_native_surface_set(wd->resize_obj, NULL); + evas_gl_surface_destroy(sd->evasgl, sd->surface); + } if (sd->context) evas_gl_context_destroy(sd->evasgl, sd->context); if (sd->config) evas_gl_config_free(sd->config); if (sd->evasgl) evas_gl_free(sd->evasgl); From d0241ad4c9b7dfbafb453a4fa673fc32f765547b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 4 Sep 2014 17:44:21 +0900 Subject: [PATCH 3/7] GLView: Add more configuration flags for the surface This adds precise DEPTH, STENCIL and MSAA configurations. @feature --- legacy/elementary/src/lib/elm_glview.c | 59 +++++++++++++++---- legacy/elementary/src/lib/elm_glview_common.h | 23 +++++++- 2 files changed, 68 insertions(+), 14 deletions(-) diff --git a/legacy/elementary/src/lib/elm_glview.c b/legacy/elementary/src/lib/elm_glview.c index 20216c8694..7d2a236f97 100644 --- a/legacy/elementary/src/lib/elm_glview.c +++ b/legacy/elementary/src/lib/elm_glview.c @@ -301,22 +301,59 @@ _elm_glview_mode_set(Eo *obj, Elm_Glview_Data *sd, Elm_GLView_Mode mode) if (mode & ELM_GLVIEW_ALPHA) sd->config->color_format = EVAS_GL_RGBA_8888; else sd->config->color_format = EVAS_GL_RGB_888; - if (mode & ELM_GLVIEW_DEPTH) sd->config->depth_bits = EVAS_GL_DEPTH_BIT_24; - else sd->config->depth_bits = EVAS_GL_DEPTH_NONE; + if (mode & ELM_GLVIEW_DEPTH) + { + const int mask = 7 << 6; + if ((mode & mask) == (ELM_GLVIEW_DEPTH_8 & mask)) + sd->config->depth_bits = EVAS_GL_DEPTH_BIT_8; + else if ((mode & mask) == (ELM_GLVIEW_DEPTH_16 & mask)) + sd->config->depth_bits = EVAS_GL_DEPTH_BIT_16; + else if ((mode & mask) == (ELM_GLVIEW_DEPTH_24 & mask)) + sd->config->depth_bits = EVAS_GL_DEPTH_BIT_24; + else if ((mode & mask) == (ELM_GLVIEW_DEPTH_32 & mask)) + sd->config->depth_bits = EVAS_GL_DEPTH_BIT_32; + else + sd->config->depth_bits = EVAS_GL_DEPTH_BIT_24; + } + else + sd->config->depth_bits = EVAS_GL_DEPTH_NONE; if (mode & ELM_GLVIEW_STENCIL) - sd->config->stencil_bits = EVAS_GL_STENCIL_BIT_8; - else sd->config->stencil_bits = EVAS_GL_STENCIL_NONE; + { + const int mask = 7 << 9; + if ((mode & mask) == (ELM_GLVIEW_STENCIL_1 & mask)) + sd->config->stencil_bits = EVAS_GL_STENCIL_BIT_1; + else if ((mode & mask) == (ELM_GLVIEW_STENCIL_1 & mask)) + sd->config->stencil_bits = EVAS_GL_STENCIL_BIT_2; + else if ((mode & mask) == (ELM_GLVIEW_STENCIL_4 & mask)) + sd->config->stencil_bits = EVAS_GL_STENCIL_BIT_4; + else if ((mode & mask) == (ELM_GLVIEW_STENCIL_8 & mask)) + sd->config->stencil_bits = EVAS_GL_STENCIL_BIT_8; + else if ((mode & mask) == (ELM_GLVIEW_STENCIL_16 & mask)) + sd->config->stencil_bits = EVAS_GL_STENCIL_BIT_16; + else + sd->config->stencil_bits = EVAS_GL_STENCIL_BIT_8; + } + else + sd->config->stencil_bits = EVAS_GL_STENCIL_NONE; + if (mode & ELM_GLVIEW_MULTISAMPLE_HIGH) + { + if ((mode & ELM_GLVIEW_MULTISAMPLE_HIGH) == ELM_GLVIEW_MULTISAMPLE_LOW) + sd->config->multisample_bits = EVAS_GL_MULTISAMPLE_LOW; + else if ((mode & ELM_GLVIEW_MULTISAMPLE_HIGH) == ELM_GLVIEW_MULTISAMPLE_MED) + sd->config->multisample_bits = EVAS_GL_MULTISAMPLE_MED; + else + sd->config->multisample_bits = EVAS_GL_MULTISAMPLE_HIGH; + } + else + sd->config->multisample_bits = EVAS_GL_MULTISAMPLE_NONE; + + sd->config->options_bits = EVAS_GL_OPTIONS_NONE; if (mode & ELM_GLVIEW_DIRECT) sd->config->options_bits = EVAS_GL_OPTIONS_DIRECT; - else sd->config->options_bits = EVAS_GL_OPTIONS_NONE; - - // Check for Alpha Channel and enable it - if (mode & ELM_GLVIEW_ALPHA) - evas_object_image_alpha_set(wd->resize_obj, EINA_TRUE); - else - evas_object_image_alpha_set(wd->resize_obj, EINA_FALSE); + if (mode & ELM_GLVIEW_CLIENT_SIDE_ROTATION) + sd->config->options_bits |= EVAS_GL_OPTIONS_CLIENT_SIDE_ROTATION; sd->mode = mode; diff --git a/legacy/elementary/src/lib/elm_glview_common.h b/legacy/elementary/src/lib/elm_glview_common.h index 0417b9e5ba..7e6dc96630 100644 --- a/legacy/elementary/src/lib/elm_glview_common.h +++ b/legacy/elementary/src/lib/elm_glview_common.h @@ -8,10 +8,27 @@ typedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj); typedef enum _Elm_GLView_Mode { ELM_GLVIEW_NONE = 0, + // 0x1 is reserved for future use ELM_GLVIEW_ALPHA = (1<<1), /**< Alpha channel enabled rendering mode */ - ELM_GLVIEW_DEPTH = (1<<2), /**< Depth buffer enabled rendering mode */ - ELM_GLVIEW_STENCIL = (1<<3), /**< Stencil buffer enabled rendering mode */ - ELM_GLVIEW_DIRECT = (1<<4) /**< Direct rendering optimization hint */ + ELM_GLVIEW_DEPTH = (1<<2), /**< Depth buffer enabled rendering mode (24 bits by default) */ + ELM_GLVIEW_STENCIL = (1<<3), /**< Stencil buffer enabled rendering mode (8 bits by default) */ + ELM_GLVIEW_DIRECT = (1<<4), /**< Request direct rendering, unless there must be a fallback */ + ELM_GLVIEW_CLIENT_SIDE_ROTATION = (1<<5), /**< Client will handle GL view rotation if direct rendering is enabled */ + // Depth buffer sizes (3 bits) + ELM_GLVIEW_DEPTH_8 = ELM_GLVIEW_DEPTH | (1 << 6), /**< Request min. 8 bits for the depth buffer */ + ELM_GLVIEW_DEPTH_16 = ELM_GLVIEW_DEPTH | (2 << 6), /**< Request min. 16 bits for the depth buffer */ + ELM_GLVIEW_DEPTH_24 = ELM_GLVIEW_DEPTH | (3 << 6), /**< Request min. 24 bits for the depth buffer (default) */ + ELM_GLVIEW_DEPTH_32 = ELM_GLVIEW_DEPTH | (4 << 6), /**< Request min. 32 bits for the depth buffer */ + // Stencil buffer sizes (3 bits) + ELM_GLVIEW_STENCIL_1 = ELM_GLVIEW_STENCIL | (1 << 9), /**< Request min. 1 bits for the stencil buffer */ + ELM_GLVIEW_STENCIL_2 = ELM_GLVIEW_STENCIL | (2 << 9), /**< Request min. 2 bits for the stencil buffer */ + ELM_GLVIEW_STENCIL_4 = ELM_GLVIEW_STENCIL | (3 << 9), /**< Request min. 4 bits for the stencil buffer */ + ELM_GLVIEW_STENCIL_8 = ELM_GLVIEW_STENCIL | (4 << 9), /**< Request min. 8 bits for the stencil buffer (default) */ + ELM_GLVIEW_STENCIL_16 = ELM_GLVIEW_STENCIL | (5 << 9), /**< Request min. 16 bits for the stencil buffer */ + // MSAA params (2 bits) + ELM_GLVIEW_MULTISAMPLE_LOW = (1 << 12), /**< MSAA with minimum number of samples */ + ELM_GLVIEW_MULTISAMPLE_MED = (2 << 12), /**< MSAA with half the number of maximum samples */ + ELM_GLVIEW_MULTISAMPLE_HIGH = (3 << 12) /**< MSAA with maximum number of samples */ } Elm_GLView_Mode; /** From 37cb18740ce4d6fa7915bc0d61cd29111d9b532f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Fri, 19 Sep 2014 13:10:02 +0900 Subject: [PATCH 4/7] GLView: Add support for client-side rotation See recent changes in Evas GL for reference. This also introduces the EO function rotation_get() @feature --- legacy/elementary/src/lib/elm_glview.c | 12 ++++++++++ legacy/elementary/src/lib/elm_glview.eo | 22 +++++++++++++++++++ legacy/elementary/src/lib/elm_glview_common.h | 15 ++++++++++++- 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/elm_glview.c b/legacy/elementary/src/lib/elm_glview.c index 7d2a236f97..97e2dfcdfe 100644 --- a/legacy/elementary/src/lib/elm_glview.c +++ b/legacy/elementary/src/lib/elm_glview.c @@ -355,6 +355,12 @@ _elm_glview_mode_set(Eo *obj, Elm_Glview_Data *sd, Elm_GLView_Mode mode) if (mode & ELM_GLVIEW_CLIENT_SIDE_ROTATION) sd->config->options_bits |= EVAS_GL_OPTIONS_CLIENT_SIDE_ROTATION; + // Check for Alpha Channel and enable it + if (mode & ELM_GLVIEW_ALPHA) + evas_object_image_alpha_set(wd->resize_obj, EINA_TRUE); + else + evas_object_image_alpha_set(wd->resize_obj, EINA_FALSE); + sd->mode = mode; _glview_update_surface(obj); @@ -466,6 +472,12 @@ _elm_glview_evas_gl_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd) return sd->evasgl; } +EOLIAN static int +_elm_glview_rotation_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd) +{ + return evas_gl_rotation_get(sd->evasgl); +} + static void _elm_glview_class_constructor(Eo_Class *klass) { diff --git a/legacy/elementary/src/lib/elm_glview.eo b/legacy/elementary/src/lib/elm_glview.eo index cbd065379b..839cb669ae 100644 --- a/legacy/elementary/src/lib/elm_glview.eo +++ b/legacy/elementary/src/lib/elm_glview.eo @@ -176,9 +176,31 @@ class Elm_Glview (Elm_Widget) @return The Evas_GL used by this GLView. @ingroup GLView */ + legacy: null; return: Evas_GL *; } } + rotation { + get { + /*@ + Get the current GL view's rotation when using direct rendering + + @return A window rotation in degrees (0, 90, 180 or 270) + + @note This rotation can be different from the device orientation. This + rotation value must be used in case of direct rendering and should be + taken into account by the application when setting the internal rotation + matrix for the view. + + @see ELM_GLVIEW_CLIENT_SIDE_ROTATION + + @since 1.12 + + @ingroup GLView */ + legacy: null; + return: int; + } + } } implements { class.constructor; diff --git a/legacy/elementary/src/lib/elm_glview_common.h b/legacy/elementary/src/lib/elm_glview_common.h index 7e6dc96630..6df9f61e18 100644 --- a/legacy/elementary/src/lib/elm_glview_common.h +++ b/legacy/elementary/src/lib/elm_glview_common.h @@ -1,8 +1,21 @@ typedef void (*Elm_GLView_Func_Cb)(Evas_Object *obj); /** - * Defines mode of GLView + * @brief Selects the target surface properties * + * An OR combination of @c Elm_GLView_Mode values should be passed to + * @ref elm_glview_mode_set when setting up a GL widget. These flags will + * specify the properties of the rendering target surface; in particular, + * the mode can request the surface to support alpha, depth and stencil buffers. + * + * @note @c ELM_GLVIEW_CLIENT_SIDE_ROTATION is a special value that indicates + * to EFL that the application will handle the view rotation when the + * device is rotated. This is needed only when the application requests + * direct rendering. Please refer to @ref Evas_GL + * for more information about direct rendering. + * + * @see elm_glview_mode_set + * @see @ref elm_opengl_page * @ingroup GLView */ typedef enum _Elm_GLView_Mode From 5b60f2f7ac0777928f92ebf1ba0b6a696fafd4a0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 23 Sep 2014 11:19:18 +0900 Subject: [PATCH 5/7] GLView: cosmetic changes --- legacy/elementary/src/lib/elm_glview.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/legacy/elementary/src/lib/elm_glview.c b/legacy/elementary/src/lib/elm_glview.c index 97e2dfcdfe..d12012d531 100644 --- a/legacy/elementary/src/lib/elm_glview.c +++ b/legacy/elementary/src/lib/elm_glview.c @@ -47,31 +47,23 @@ _elm_glview_elm_widget_on_focus(Eo *obj, Elm_Glview_Data *_pd EINA_UNUSED) static void _glview_update_surface(Evas_Object *obj) { + Evas_Native_Surface ns = { 0 }; ELM_GLVIEW_DATA_GET(obj, sd); ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); if (!sd) return; if (sd->surface) { - evas_object_image_native_surface_set - (wd->resize_obj, NULL); + evas_object_image_native_surface_set(wd->resize_obj, NULL); evas_gl_surface_destroy(sd->evasgl, sd->surface); - sd->surface = NULL; } evas_object_image_size_set(wd->resize_obj, sd->w, sd->h); - if (!sd->surface) - { - Evas_Native_Surface ns; - - sd->surface = evas_gl_surface_create - (sd->evasgl, sd->config, sd->w, sd->h); - evas_gl_native_surface_get(sd->evasgl, sd->surface, &ns); - evas_object_image_native_surface_set - (wd->resize_obj, &ns); - elm_glview_changed_set(obj); - } + sd->surface = evas_gl_surface_create(sd->evasgl, sd->config, sd->w, sd->h); + evas_gl_native_surface_get(sd->evasgl, sd->surface, &ns); + evas_object_image_native_surface_set(wd->resize_obj, &ns); + elm_glview_changed_set(obj); } EOLIAN static void From cdb6490b7066d5930043b23ead2dce69c87499a1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 23 Sep 2014 14:04:32 +0900 Subject: [PATCH 6/7] GLView: Add constructor for GLES 1.1 context glview This also adds the legacy bindings @feature --- legacy/elementary/src/lib/elm_glview.c | 47 +++++++++++++++---- legacy/elementary/src/lib/elm_glview.eo | 13 ++++- legacy/elementary/src/lib/elm_glview_legacy.h | 13 ++++- legacy/elementary/src/lib/elm_widget_glview.h | 1 + 4 files changed, 64 insertions(+), 10 deletions(-) diff --git a/legacy/elementary/src/lib/elm_glview.c b/legacy/elementary/src/lib/elm_glview.c index d12012d531..ffb2c8ca33 100644 --- a/legacy/elementary/src/lib/elm_glview.c +++ b/legacy/elementary/src/lib/elm_glview.c @@ -173,7 +173,7 @@ _set_render_policy_callback(Evas_Object *obj) } EOLIAN static void -_elm_glview_evas_object_smart_add(Eo *obj, Elm_Glview_Data *priv) +_elm_glview_evas_object_smart_add(Eo *obj, Elm_Glview_Data *priv EINA_UNUSED) { Evas_Object *img; @@ -185,7 +185,11 @@ _elm_glview_evas_object_smart_add(Eo *obj, Elm_Glview_Data *priv) evas_object_image_size_set(img, 1, 1); eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); +} +static void +_elm_glview_constructor(Eo *obj, Elm_Glview_Data *priv) +{ // Evas_GL priv->evasgl = evas_gl_new(evas_object_evas_get(obj)); if (!priv->evasgl) @@ -215,15 +219,22 @@ _elm_glview_evas_object_smart_add(Eo *obj, Elm_Glview_Data *priv) priv->w = 64; priv->h = 64; + // Set context version + if (!priv->gles_version) + priv->gles_version = EVAS_GL_GLES_2_X; + priv->config->gles_version = priv->gles_version; + // Create Context - priv->context = evas_gl_context_create(priv->evasgl, NULL); + if (priv->gles_version == EVAS_GL_GLES_2_X) + priv->context = evas_gl_context_create(priv->evasgl, NULL); + else + priv->context = evas_gl_context_version_create(priv->evasgl, NULL, priv->gles_version); if (!priv->context) { ERR("Error Creating an Evas_GL Context.\n"); - evas_gl_config_free(priv->config); - evas_gl_free(priv->evasgl); - priv->evasgl = NULL; + ELM_SAFE_FREE(priv->config, evas_gl_config_free); + ELM_SAFE_FREE(priv->evasgl, evas_gl_free); return; } } @@ -258,14 +269,34 @@ EAPI Evas_Object * elm_glview_add(Evas_Object *parent) { EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - Evas_Object *obj = eo_add(MY_CLASS, parent); + Evas_Object *obj = eo_add(MY_CLASS, parent, + elm_obj_glview_version_constructor(EVAS_GL_GLES_2_X)); + return obj; +} + +EAPI Evas_Object * +elm_glview_version_add(Evas_Object *parent, Evas_GL_Context_Version version) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); + Evas_Object *obj = eo_add(MY_CLASS, parent, + elm_obj_glview_version_constructor(version)); return obj; } EOLIAN static void -_elm_glview_eo_base_constructor(Eo *obj, Elm_Glview_Data *sd) +_elm_glview_eo_base_constructor(Eo *obj, Elm_Glview_Data *sd EINA_UNUSED) { eo_do_super(obj, MY_CLASS, eo_constructor()); +} + +EOLIAN static void +_elm_glview_version_constructor(Eo *obj, Elm_Glview_Data *sd, + Evas_GL_Context_Version version) +{ + sd->gles_version = + ((version > 0) && (version <= 3)) ? version : EVAS_GL_GLES_2_X; + _elm_glview_constructor(obj, sd); + eo_do(obj, evas_obj_type_set(MY_CLASS_NAME_LEGACY), evas_obj_smart_callbacks_descriptions_set(_smart_callbacks), @@ -281,7 +312,7 @@ _elm_glview_eo_base_constructor(Eo *obj, Elm_Glview_Data *sd) EOLIAN static Evas_GL_API* _elm_glview_gl_api_get(Eo *obj EINA_UNUSED, Elm_Glview_Data *sd) { - return evas_gl_api_get(sd->evasgl); + return evas_gl_context_api_get(sd->evasgl, sd->context); } EOLIAN static Eina_Bool diff --git a/legacy/elementary/src/lib/elm_glview.eo b/legacy/elementary/src/lib/elm_glview.eo index 839cb669ae..cee3277ba9 100644 --- a/legacy/elementary/src/lib/elm_glview.eo +++ b/legacy/elementary/src/lib/elm_glview.eo @@ -1,6 +1,15 @@ class Elm_Glview (Elm_Widget) { eo_prefix: elm_obj_glview; + methods { + version_constructor { + /*@ Constructor with context version number. */ + legacy: null; + params { + @in Evas_GL_Context_Version version; + } + } + } properties { size { set { @@ -216,5 +225,7 @@ class Elm_Glview (Elm_Widget) language,changed; access,changed; } - + constructors { + .version_constructor; + } } diff --git a/legacy/elementary/src/lib/elm_glview_legacy.h b/legacy/elementary/src/lib/elm_glview_legacy.h index b5c545e428..fdfbb6a814 100644 --- a/legacy/elementary/src/lib/elm_glview_legacy.h +++ b/legacy/elementary/src/lib/elm_glview_legacy.h @@ -8,4 +8,15 @@ */ EAPI Evas_Object *elm_glview_add(Evas_Object *parent); -#include "elm_glview.eo.legacy.h" \ No newline at end of file +/** + * Adds a new GLView to the parent, given an OpenGL-ES context version number. + * + * @param[in] parent The parent object + * @param[in] version Requested GL ES version number (default is 2.x, 1.x may also be supported) + * @return The new object or @c NULL if it cannot be created + * + * @since 1.12 + */ +EAPI Evas_Object *elm_glview_version_add(Evas_Object *parent, Evas_GL_Context_Version version); + +#include "elm_glview.eo.legacy.h" diff --git a/legacy/elementary/src/lib/elm_widget_glview.h b/legacy/elementary/src/lib/elm_widget_glview.h index 175bdf1c92..93ce2f8154 100644 --- a/legacy/elementary/src/lib/elm_widget_glview.h +++ b/legacy/elementary/src/lib/elm_widget_glview.h @@ -29,6 +29,7 @@ struct _Elm_Glview_Data Elm_GLView_Mode mode; Elm_GLView_Resize_Policy scale_policy; Elm_GLView_Render_Policy render_policy; + Evas_GL_Context_Version gles_version; Evas_GL *evasgl; Evas_GL_Config *config; From 78f6a0048c3b8d1b0b19e62f8cc8c36b6a0ce447 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 6 Oct 2014 17:47:39 +0900 Subject: [PATCH 7/7] GLView: Add legacy bindings for the new functions rotation_get and evas_gl_get should have legacy bindings as well --- legacy/elementary/src/lib/elm_glview.eo | 2 -- 1 file changed, 2 deletions(-) diff --git a/legacy/elementary/src/lib/elm_glview.eo b/legacy/elementary/src/lib/elm_glview.eo index cee3277ba9..1152b8ee49 100644 --- a/legacy/elementary/src/lib/elm_glview.eo +++ b/legacy/elementary/src/lib/elm_glview.eo @@ -185,7 +185,6 @@ class Elm_Glview (Elm_Widget) @return The Evas_GL used by this GLView. @ingroup GLView */ - legacy: null; return: Evas_GL *; } } @@ -206,7 +205,6 @@ class Elm_Glview (Elm_Widget) @since 1.12 @ingroup GLView */ - legacy: null; return: int; } }