From a39c06ea83dd915f58a241ba27ca50110aade3cd Mon Sep 17 00:00:00 2001 From: DaeKwang Ryu Date: Fri, 7 Aug 2015 13:27:59 +0900 Subject: [PATCH] Graphics: modify GLView direct rendering guide spicify tizen version Change-Id: I5d49ce7a434acd13c8194c2cbc681fd3dd296498 Signed-off-by: DaeKwang Ryu --- org.tizen.guides/html/native/graphics/opengles_n.htm | 2 +- .../html/native/graphics/opengl_tutorial_n.htm | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/org.tizen.guides/html/native/graphics/opengles_n.htm b/org.tizen.guides/html/native/graphics/opengles_n.htm index d8e6d7e..1aef85b 100644 --- a/org.tizen.guides/html/native/graphics/opengles_n.htm +++ b/org.tizen.guides/html/native/graphics/opengles_n.htm @@ -75,7 +75,7 @@

To create a basic application:

-

To develop a GL application, you have to call elm_config_accel_preference_set before creating a window. It makes an application to use GPU. To use the Direct Rendering mode, you have to set the same option values (depth, stencil, and MSAA) to a rendering engine and a GLView object. You can set the option values to a rendering engine using the elm_config_accel_preference_set() function and to a GLView object using the elm_glview_mode_set() function. If the GLView object option values are bigger or higher than the rendering engine's, the Direct Rendering mode is disabled.

+

To develop a GL application, you have to call elm_config_accel_preference_set before creating a window. It makes an application to use GPU. To use the Direct Rendering mode since Tizen 2.4, you have to set the same option values (depth, stencil, and MSAA) to a rendering engine and a GLView object. You can set the option values to a rendering engine using the elm_config_accel_preference_set() function and to a GLView object using the elm_glview_mode_set() function. If the GLView object option values are bigger or higher than the rendering engine's, the Direct Rendering mode is disabled.

First, you should declare the global variable using ELEMENTARY_GLVIEW_GLOBAL_DEFINE(), then create a GLView object and use ELEMENTARY_GLVIEW_GLOBAL_USE(glview). Now, you can call GL functions.

diff --git a/org.tizen.tutorials/html/native/graphics/opengl_tutorial_n.htm b/org.tizen.tutorials/html/native/graphics/opengl_tutorial_n.htm index 3444164..70191bc 100644 --- a/org.tizen.tutorials/html/native/graphics/opengl_tutorial_n.htm +++ b/org.tizen.tutorials/html/native/graphics/opengl_tutorial_n.htm @@ -2350,6 +2350,10 @@ if (gl->evasglCreateSync)

GLView

+// Tizen 2.3
+// elm_config_accel_preference_set("opengl");
+
+// since Tizen 2.4
 elm_config_accel_preference_set("opengl:depth24:stencil8:msaa_high");
 Evas_Object *win = elm_win_util_standard_add("sample", "sample");
 
@@ -2359,11 +2363,15 @@ elm_glview_mode_set(glview, ELM_GLVIEW_DEPTH_24 | ELM_GLVIEW_STENCIL_8 | ELM_GLV
 
 

In GLView, the ELM_GLVIEW_DIRECT option is one of GLView mode's enums and the option can be enabled using the elm_glview_mode_set() function.

-

To use the Direct Rendering mode, set the same option values (depth, stencil, and MSAA) to a rendering engine and a GLView object. You can set the option values to a rendering engine using the elm_config_accel_preference_set() function and to a GLView object using the elm_glview_mode_set() function. If the GLView object option values are bigger or higher than the rendering engine's, the Direct Rendering mode is disabled.

+

To use the Direct Rendering mode since Tizen 2.4, set the same option values (depth, stencil, and MSAA) to a rendering engine and a GLView object. You can set the option values to a rendering engine using the elm_config_accel_preference_set() function and to a GLView object using the elm_glview_mode_set() function. If the GLView object option values are bigger or higher than the rendering engine's, the Direct Rendering mode is disabled.

EvasGL

+// Tizen 2.3
+// elm_config_accel_preference_set("opengl");
+
+// since Tizen 2.4
 elm_config_accel_preference_set("opengl:depth24:stencil8:msaa_high");
 Evas_Object *win = elm_win_util_standard_add("sample", "sample");
 
@@ -2377,7 +2385,7 @@ cfg->options_bits = EVAS_GL_OPTIONS_DIRECT;
 cfg->multisample_bits = EVAS_GL_MULTISAMPLE_HIGH;
 
-

In EvasGL, the EVAS_GL_OPTIONS_DIRECT is one of EvasGL's config options and the option can be enabled by setting the Evas_GL_Config option. To use the Direct Rendering mode, set the same option values (depth, stencil, and MSAA) to a rendering engine and an Evas_GL_Config object. You can set the option values to a rendering engine using the elm_config_accel_preference_set() function. If the Evas_GL_Config object option values are bigger or higher than the rendering engine's, the Direct Rendering mode is disabled.

+

In EvasGL, the EVAS_GL_OPTIONS_DIRECT is one of EvasGL's config options and the option can be enabled by setting the Evas_GL_Config option. To use the Direct Rendering mode since Tizen 2.4, set the same option values (depth, stencil, and MSAA) to a rendering engine and an Evas_GL_Config object. You can set the option values to a rendering engine using the elm_config_accel_preference_set() function. If the Evas_GL_Config object option values are bigger or higher than the rendering engine's, the Direct Rendering mode is disabled.

-- 2.7.4