\begin{DoxySince}{Since}
1.\+10
\end{DoxySince}
\hypertarget{eina_cxx_main_toc}{}\section{Table of Contents}\label{eina_cxx_main_toc}
\begin{DoxyItemize}
\item \hyperlink{evas_3d_main_evas_3d_intro}{Introduction} \item \hyperlink{evas_3d_main_evas_3d_example}{Introductory Example}\end{DoxyItemize}
\hypertarget{evas_3d_main_evas_3d_intro}{}\section{Introduction}\label{evas_3d_main_evas_3d_intro}
Evas 3\+D is an extension to support 3\+D scene graph rendering into 2\+D Evas canvas supporting typicall tree-\/based scene graph manipulation and other 3\+D graphics rendering techniques.

Evas 3\+D provides 3\+D objects which are used for describing 3\+D scene and A\+P\+Is to connect the scene with an evas image object so that the scene is rendered on that image object.

Contruction of a 3\+D scene is process of locating desired cameras, lights and meshes in the scene. Typically the scene is structured with some hierarchical data structure. Evas 3\+D support n-\/ary tree structure for describing the scene. Node is used to build the tree representation of the scene. Other objects, like camera, light and mesh can be located in the scene by being contained in a node.

Like other 3\+D graphics engine, Evas 3\+D support standard 3\+D rendering method like flat shading, phong shading and normal map and other features like texture mapping, triangle meshes.

Besides all the traditional 3\+D rendering things, one of the key feature of the Evas 3\+D is that it is able to use existing evas objects as textures inside of the 3\+D scene. \char`\"{}\+Existing evas objects\char`\"{} means all the E\+F\+L widgets and applications. By supporting this, it is easy to make 3\+D version of an application without modifying the original source that much.

Also, 3\+D scene can be located on the canvas naturally stacked with existing evas objects. This can make it possible putting 3\+D things into existing 2\+D application layouts.\hypertarget{evas_3d_main_evas_3d_example}{}\section{Introductory Example}\label{evas_3d_main_evas_3d_example}

\begin{DoxyCodeInclude}
\textcolor{preprocessor}{#define EFL\_EO\_API\_SUPPORT}
\textcolor{preprocessor}{#define EFL\_BETA\_API\_SUPPORT}

\textcolor{preprocessor}{#include <Eo.h>}
\textcolor{preprocessor}{#include <Evas.h>}
\textcolor{preprocessor}{#include <Ecore.h>}
\textcolor{preprocessor}{#include <\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}>}

\textcolor{preprocessor}{#define  WIDTH          400}
\textcolor{preprocessor}{#define  HEIGHT         400}

\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Scene\_Data
\{
   \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *scene;
   \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *root\_node;
   \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *camera\_node;
   \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *light\_node;
   \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *mesh\_node;

   \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *camera;
   \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *light;
   \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *mesh;
   \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *material;
\} Scene\_Data;

\textcolor{keyword}{static} Ecore\_Evas *ecore\_evas = NULL;
\textcolor{keyword}{static} \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *evas = NULL;
\textcolor{keyword}{static} \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *background = NULL;
\textcolor{keyword}{static} \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} *image = NULL;

\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{float} cube\_vertices[] =
\{
   \textcolor{comment}{/* Front */}
   -1.0,  1.0,  1.0,     0.0,  0.0,  1.0,     1.0, 0.0, 0.0, 1.0,     0.0,  1.0,
    1.0,  1.0,  1.0,     0.0,  0.0,  1.0,     1.0, 0.0, 0.0, 1.0,     1.0,  1.0,
   -1.0, -1.0,  1.0,     0.0,  0.0,  1.0,     1.0, 0.0, 0.0, 1.0,     0.0,  0.0,
    1.0, -1.0,  1.0,     0.0,  0.0,  1.0,     1.0, 0.0, 0.0, 1.0,     1.0,  0.0,

   \textcolor{comment}{/* Back */}
    1.0,  1.0, -1.0,     0.0,  0.0, -1.0,     0.0, 0.0, 1.0, 1.0,     0.0,  1.0,
   -1.0,  1.0, -1.0,     0.0,  0.0, -1.0,     0.0, 0.0, 1.0, 1.0,     1.0,  1.0,
    1.0, -1.0, -1.0,     0.0,  0.0, -1.0,     0.0, 0.0, 1.0, 1.0,     0.0,  0.0,
   -1.0, -1.0, -1.0,     0.0,  0.0, -1.0,     0.0, 0.0, 1.0, 1.0,     1.0,  0.0,

   \textcolor{comment}{/* Left */}
   -1.0,  1.0, -1.0,    -1.0,  0.0,  0.0,     0.0, 1.0, 0.0, 1.0,     0.0,  1.0,
   -1.0,  1.0,  1.0,    -1.0,  0.0,  0.0,     0.0, 1.0, 0.0, 1.0,     1.0,  1.0,
   -1.0, -1.0, -1.0,    -1.0,  0.0,  0.0,     0.0, 1.0, 0.0, 1.0,     0.0,  0.0,
   -1.0, -1.0,  1.0,    -1.0,  0.0,  0.0,     0.0, 1.0, 0.0, 1.0,     1.0,  0.0,

   \textcolor{comment}{/* Right */}
    1.0,  1.0,  1.0,     1.0,  0.0,  0.0,     1.0, 1.0, 0.0, 1.0,     0.0,  1.0,
    1.0,  1.0, -1.0,     1.0,  0.0,  0.0,     1.0, 1.0, 0.0, 1.0,     1.0,  1.0,
    1.0, -1.0,  1.0,     1.0,  0.0,  0.0,     1.0, 1.0, 0.0, 1.0,     0.0,  0.0,
    1.0, -1.0, -1.0,     1.0,  0.0,  0.0,     1.0, 1.0, 0.0, 1.0,     1.0,  0.0,

   \textcolor{comment}{/* Top */}
   -1.0,  1.0, -1.0,     0.0,  1.0,  0.0,     1.0, 0.0, 1.0, 1.0,     0.0,  1.0,
    1.0,  1.0, -1.0,     0.0,  1.0,  0.0,     1.0, 0.0, 1.0, 1.0,     1.0,  1.0,
   -1.0,  1.0,  1.0,     0.0,  1.0,  0.0,     1.0, 0.0, 1.0, 1.0,     0.0,  0.0,
    1.0,  1.0,  1.0,     0.0,  1.0,  0.0,     1.0, 0.0, 1.0, 1.0,     1.0,  0.0,

   \textcolor{comment}{/* Bottom */}
    1.0, -1.0, -1.0,     0.0, -1.0,  0.0,     0.0, 1.0, 1.0, 1.0,     0.0,  1.0,
   -1.0, -1.0, -1.0,     0.0, -1.0,  0.0,     0.0, 1.0, 1.0, 1.0,     1.0,  1.0,
    1.0, -1.0,  1.0,     0.0, -1.0,  0.0,     0.0, 1.0, 1.0, 1.0,     0.0,  0.0,
   -1.0, -1.0,  1.0,     0.0, -1.0,  0.0,     0.0, 1.0, 1.0, 1.0,     1.0,  0.0,
\};

\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} cube\_indices[] =
\{
   \textcolor{comment}{/* Front */}
   0,   1,  2,  2,  1,  3,

   \textcolor{comment}{/* Back */}
   4,   5,  6,  6,  5,  7,

   \textcolor{comment}{/* Left */}
   8,   9, 10, 10,  9, 11,

   \textcolor{comment}{/* Right */}
   12, 13, 14, 14, 13, 15,

   \textcolor{comment}{/* Top */}
   16, 17, 18, 18, 17, 19,

   \textcolor{comment}{/* Bottom */}
   20, 21, 22, 22, 21, 23
\};

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_delete(Ecore\_Evas *ee EINA\_UNUSED)
\{
   \hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}();
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_canvas\_resize(Ecore\_Evas *ee)
\{
   \textcolor{keywordtype}{int} w, h;

   \hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}(ee, NULL, NULL, &w, &h);
   eo\_do(background, evas\_obj\_size\_set(w, h));
   eo\_do(image, evas\_obj\_size\_set(w, h));
\}

\textcolor{keyword}{static} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}
\_animate\_scene(\textcolor{keywordtype}{void} *data)
\{
   \textcolor{keyword}{static} \textcolor{keywordtype}{float} angle = 0.0f;
   Scene\_Data *scene = (Scene\_Data *)data;

   angle += 0.5;

   eo\_do(scene->mesh\_node,
         evas\_3d\_node\_orientation\_angle\_axis\_set(angle, 1.0, 1.0, 1.0));

   \textcolor{comment}{/* Rotate */}
   \textcolor{keywordflow}{if} (angle > 360.0) angle -= 360.0f;

   \textcolor{keywordflow}{return} \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE};
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_camera\_setup(Scene\_Data *data)
\{
   data->camera = eo\_add(EVAS\_3D\_CAMERA\_CLASS, evas);

   eo\_do(data->camera,
         \hyperlink{group__Evas__3D__Camera_ga705c9685e3015c63afae56d8ffadd4e3}{evas\_3d\_camera\_projection\_perspective\_set}(60.0, 1.0, 2.0,
       50.0));

   data->camera\_node =
      eo\_add(EVAS\_3D\_NODE\_CLASS, evas,
                    evas\_3d\_node\_constructor(\hyperlink{group__Evas__3D__Types_gga0ac4d9216e340a488f38bc8d9d0b7b4ca9de620aa79ece904f82b3899dba9cb80}{EVAS\_3D\_NODE\_TYPE\_CAMERA}));
   eo\_do(data->camera\_node,
         evas\_3d\_node\_camera\_set(data->camera),
         evas\_3d\_node\_position\_set(0.0, 0.0, 10.0),
         evas\_3d\_node\_look\_at\_set(\hyperlink{group__Evas__3D__Types_ggaffb750e39c1d909b48c2d3ec9a361bd5a388e0e973381cdd64bf1eee610161460}{EVAS\_3D\_SPACE\_PARENT}, 0.0, 0.0, 0.0,
                                  \hyperlink{group__Evas__3D__Types_ggaffb750e39c1d909b48c2d3ec9a361bd5a388e0e973381cdd64bf1eee610161460}{EVAS\_3D\_SPACE\_PARENT}, 0.0, 1.0, 0.0));
   eo\_do(data->root\_node, evas\_3d\_node\_member\_add(data->camera\_node));
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_light\_setup(Scene\_Data *data)
\{
   data->light = eo\_add(EVAS\_3D\_LIGHT\_CLASS, evas);
   eo\_do(data->light,
         \hyperlink{group__Evas__3D__Light_ga3afd01d21ce3ed7aed5ddb168b72c10c}{evas\_3d\_light\_ambient\_set}(0.2, 0.2, 0.2, 1.0),
         \hyperlink{group__Evas__3D__Light_ga71030d9a715a0ca47849107c4d8e9ed3}{evas\_3d\_light\_diffuse\_set}(1.0, 1.0, 1.0, 1.0),
         \hyperlink{group__Evas__3D__Light_ga27f4a5a9e95e37edd5866fe14bbe6f43}{evas\_3d\_light\_specular\_set}(1.0, 1.0, 1.0, 1.0));

   data->light\_node =
      eo\_add(EVAS\_3D\_NODE\_CLASS, evas,
                    evas\_3d\_node\_constructor(\hyperlink{group__Evas__3D__Types_gga0ac4d9216e340a488f38bc8d9d0b7b4ca85221deda17f574afd8d688771bf01b5}{EVAS\_3D\_NODE\_TYPE\_LIGHT}));
   eo\_do(data->light\_node,
         evas\_3d\_node\_light\_set(data->light),
         evas\_3d\_node\_position\_set(0.0, 0.0, 10.0),
         evas\_3d\_node\_look\_at\_set(\hyperlink{group__Evas__3D__Types_ggaffb750e39c1d909b48c2d3ec9a361bd5a388e0e973381cdd64bf1eee610161460}{EVAS\_3D\_SPACE\_PARENT}, 0.0, 0.0, 0.0,
                                  \hyperlink{group__Evas__3D__Types_ggaffb750e39c1d909b48c2d3ec9a361bd5a388e0e973381cdd64bf1eee610161460}{EVAS\_3D\_SPACE\_PARENT}, 0.0, 1.0, 0.0));
   eo\_do(data->root\_node, evas\_3d\_node\_member\_add(data->light\_node));
\}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_mesh\_setup(Scene\_Data *data)
\{
   \textcolor{comment}{/* Setup material. */}
   data->material = eo\_add(EVAS\_3D\_MATERIAL\_CLASS, evas);

   eo\_do(data->material,
         evas\_3d\_material\_enable\_set(\hyperlink{group__Evas__3D__Types_gga11f82e1cd297484872305991e9203026a9466ee0c6304cec7b0430413704d982a}{EVAS\_3D\_MATERIAL\_AMBIENT}, 
      \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}),
         evas\_3d\_material\_enable\_set(\hyperlink{group__Evas__3D__Types_gga11f82e1cd297484872305991e9203026ad37f6c054818092ffcc4886e3f0701e1}{EVAS\_3D\_MATERIAL\_DIFFUSE}, 
      \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}),
         evas\_3d\_material\_enable\_set(\hyperlink{group__Evas__3D__Types_gga11f82e1cd297484872305991e9203026a8055297490b7e4e545217241f4b9e13a}{EVAS\_3D\_MATERIAL\_SPECULAR}, 
      \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}),

         evas\_3d\_material\_color\_set(\hyperlink{group__Evas__3D__Types_gga11f82e1cd297484872305991e9203026a9466ee0c6304cec7b0430413704d982a}{EVAS\_3D\_MATERIAL\_AMBIENT}, 0.2, 0.2, 0.2, 1.0),
         evas\_3d\_material\_color\_set(\hyperlink{group__Evas__3D__Types_gga11f82e1cd297484872305991e9203026ad37f6c054818092ffcc4886e3f0701e1}{EVAS\_3D\_MATERIAL\_DIFFUSE}, 0.8, 0.8, 0.8, 1.0),
         evas\_3d\_material\_color\_set(\hyperlink{group__Evas__3D__Types_gga11f82e1cd297484872305991e9203026a8055297490b7e4e545217241f4b9e13a}{EVAS\_3D\_MATERIAL\_SPECULAR}, 1.0, 1.0, 1.0, 1.0)
      ,
         evas\_3d\_material\_shininess\_set(100.0));

   \textcolor{comment}{/* Setup mesh. */}
   data->mesh = eo\_add(EVAS\_3D\_MESH\_CLASS, evas);
   eo\_do(data->mesh,
         \hyperlink{group__Evas__3D__Mesh_gae07487ab62d44570fee9eec8614b182d}{evas\_3d\_mesh\_vertex\_count\_set}(24),
         evas\_3d\_mesh\_frame\_add(0),

         \hyperlink{group__Evas__3D__Mesh_ga2fd290b1f826f60d4bcb59a210574847}{evas\_3d\_mesh\_frame\_vertex\_data\_set}(0, 
      \hyperlink{group__Evas__3D__Types_ggaefbcb40695cf5472d74b3d028ebf67b9aa637e9050c7dd7dadce1f29ac3a6fd84}{EVAS\_3D\_VERTEX\_POSITION},
                                            12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[ 0]),
         \hyperlink{group__Evas__3D__Mesh_ga2fd290b1f826f60d4bcb59a210574847}{evas\_3d\_mesh\_frame\_vertex\_data\_set}(0, 
      \hyperlink{group__Evas__3D__Types_ggaefbcb40695cf5472d74b3d028ebf67b9ac9be4864a780fa802b5964ad98fccf8a}{EVAS\_3D\_VERTEX\_NORMAL},
                                            12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[ 3]),
         \hyperlink{group__Evas__3D__Mesh_ga2fd290b1f826f60d4bcb59a210574847}{evas\_3d\_mesh\_frame\_vertex\_data\_set}(0, 
      \hyperlink{group__Evas__3D__Types_ggaefbcb40695cf5472d74b3d028ebf67b9a6c35cef527b3369720081687612ae8a3}{EVAS\_3D\_VERTEX\_COLOR},
                                            12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[ 6]),
         \hyperlink{group__Evas__3D__Mesh_ga2fd290b1f826f60d4bcb59a210574847}{evas\_3d\_mesh\_frame\_vertex\_data\_set}(0, 
      \hyperlink{group__Evas__3D__Types_ggaefbcb40695cf5472d74b3d028ebf67b9a66dfa732b5a1de48e18c448d71199fb2}{EVAS\_3D\_VERTEX\_TEXCOORD},
                                            12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[10]),

         evas\_3d\_mesh\_index\_data\_set(\hyperlink{group__Evas__3D__Types_gga0f68fc6350e3b61d53b3fcc5f2cabb28a996beb95a8d31236a2bf7d5b72c5423c}{EVAS\_3D\_INDEX\_FORMAT\_UNSIGNED\_SHORT}
      ,
                                     36, &cube\_indices[0]),
         evas\_3d\_mesh\_vertex\_assembly\_set(\hyperlink{group__Evas__3D__Types_gga78e436674a2bcdaf9c6017f6ee513731a75612696f6d23f00c319c9d304df1c28}{EVAS\_3D\_VERTEX\_ASSEMBLY\_TRIANGLES}
      ),

         evas\_3d\_mesh\_shade\_mode\_set(\hyperlink{group__Evas__3D__Types_ggaf13f85a5e754fbb57d83d67ccd873199a9a0ddeb2aace7c0f6c7378b8a549fcf3}{EVAS\_3D\_SHADE\_MODE\_PHONG}),

         evas\_3d\_mesh\_frame\_material\_set(0, data->material));

   data->mesh\_node =
      eo\_add(EVAS\_3D\_NODE\_CLASS, evas,
                    evas\_3d\_node\_constructor(\hyperlink{group__Evas__3D__Types_gga0ac4d9216e340a488f38bc8d9d0b7b4caa8ae28315aa2f23ff707a3e8c286af55}{EVAS\_3D\_NODE\_TYPE\_MESH}));
   eo\_do(data->root\_node, evas\_3d\_node\_member\_add(data->mesh\_node));
   eo\_do(data->mesh\_node, evas\_3d\_node\_mesh\_add(data->mesh));
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_scene\_setup(Scene\_Data *data)
\{
   data->scene = eo\_add(EVAS\_3D\_SCENE\_CLASS, evas);
   eo\_do(data->scene,
         evas\_3d\_scene\_size\_set(WIDTH, HEIGHT);
         evas\_3d\_scene\_background\_color\_set(0.0, 0.0, 0.0, 0.0));

   data->root\_node =
      eo\_add(EVAS\_3D\_NODE\_CLASS, evas,
                    evas\_3d\_node\_constructor(\hyperlink{group__Evas__3D__Types_gga0ac4d9216e340a488f38bc8d9d0b7b4cac1e1ef832d6e4bf982f1c11d4415690c}{EVAS\_3D\_NODE\_TYPE\_NODE}));

   \_camera\_setup(data);
   \_light\_setup(data);
   \_mesh\_setup(data);

   eo\_do(data->scene,
         evas\_3d\_scene\_root\_node\_set(data->root\_node),
         evas\_3d\_scene\_camera\_node\_set(data->camera\_node));
\}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{void})
\{
   \textcolor{comment}{//Unless Evas 3D supports Software renderer, we set gl backened forcely.}
   \hyperlink{group__Evil__Stdlib__Group_ga1c8b16a3abcb4dc450a0a62b42c554dd}{setenv}(\textcolor{stringliteral}{"ECORE\_EVAS\_ENGINE"}, \textcolor{stringliteral}{"opengl\_x11"}, 1);

   Scene\_Data data;

   \textcolor{keywordflow}{if} (!\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}()) \textcolor{keywordflow}{return} 0;

   ecore\_evas = \hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}(NULL, 10, 10, WIDTH, HEIGHT, NULL);
   \textcolor{keywordflow}{if} (!ecore\_evas) \textcolor{keywordflow}{return} 0;

   \hyperlink{group__Ecore__Evas__Group_ga3d478e975e2101b9b821ef24baf3dd9e}{ecore\_evas\_callback\_delete\_request\_set}(ecore\_evas, \_on\_delete);
   \hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}(ecore\_evas, \_on\_canvas\_resize);
   \hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}(ecore\_evas);

   evas = \hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}(ecore\_evas);

   \_scene\_setup(&data);

   \textcolor{comment}{/* Add a background rectangle objects. */}
   background = eo\_add(EVAS\_RECTANGLE\_CLASS, evas);
   eo\_do(background,
         \hyperlink{group__Evas__Object__Group__Basic_ga0edb6cead08bdc24d0cd25455e361980}{evas\_obj\_color\_set}(0, 0, 0, 255),
         evas\_obj\_size\_set(WIDTH, HEIGHT),
         evas\_obj\_visibility\_set(\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}));

   \textcolor{comment}{/* Add an image object for 3D scene rendering. */}
   image = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(evas);
   eo\_do(image,
         evas\_obj\_size\_set(WIDTH, HEIGHT),
         evas\_obj\_visibility\_set(\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}));

   \textcolor{comment}{/* Set the image object as render target for 3D scene. */}
   eo\_do(image, evas\_obj\_image\_scene\_set(data.scene));

   \textcolor{comment}{/* Add animation timer callback. */}
   ecore\_timer\_add(0.016, \_animate\_scene, &data);

   \textcolor{comment}{/* Enter main loop. */}
   \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}();

   \hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}(ecore\_evas);
   \hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}();

   \textcolor{keywordflow}{return} 0;
\}
\end{DoxyCodeInclude}
 