\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_canvas3d_main_evas_canvas3d_intro}{Introduction} \item \hyperlink{evas_canvas3d_main_evas_canvas3d_example}{Introductory Example}\end{DoxyItemize}
\hypertarget{evas_canvas3d_main_evas_canvas3d_intro}{}\section{Introduction}\label{evas_canvas3d_main_evas_canvas3d_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.

Construction 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_canvas3d_main_evas_canvas3d_example}{}\section{Introductory Example}\label{evas_canvas3d_main_evas_canvas3d_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, efl\_gfx\_size\_set(w, h));
   eo\_do(image, efl\_gfx\_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,
         \hyperlink{group__Evas__Canvas3D__Node_ga26c0bdfc7b79c6818e7c7f6f9210bcef}{evas\_canvas3d\_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 = \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EVAS\_CANVAS3D\_CAMERA\_CLASS, evas);

   eo\_do(data->camera,
         \hyperlink{group__Evas__Canvas3D__Camera_gaf71a7b0af07a514a23befe4f14b0473d}{evas\_canvas3d\_camera\_projection\_perspective\_set}(60.
      0, 1.0, 2.0, 50.0));

   data->camera\_node =
      \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EVAS\_CANVAS3D\_NODE\_CLASS, evas,
                    \hyperlink{group__Evas__Canvas3D__Node_ga48c406ee9be456281a51976e68016f1b}{evas\_canvas3d\_node\_constructor}(
      EVAS\_CANVAS3D\_NODE\_TYPE\_CAMERA));
   eo\_do(data->camera\_node,
         \hyperlink{group__Evas__Canvas3D__Node_gaf5997a4a63ecad4d836e1956d0323d93}{evas\_canvas3d\_node\_camera\_set}(data->camera),
         \hyperlink{group__Evas__Canvas3D__Node_ga3ae6aa423b619559f1681df11358262e}{evas\_canvas3d\_node\_position\_set}(0.0, 0.0, 10.0),
         \hyperlink{group__Evas__Canvas3D__Node_ga35efbb89636f8f2fac6793f87e004bb1}{evas\_canvas3d\_node\_look\_at\_set}(EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 0.0,
       0.0,
                                  EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 1.0, 0.0));
   eo\_do(data->root\_node, \hyperlink{group__Evas__Canvas3D__Node_gaccdd3e31623dba65c3124b1a6dd26489}{evas\_canvas3d\_node\_member\_add}(data->camera\_node));
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_light\_setup(Scene\_Data *data)
\{
   data->light = \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EVAS\_CANVAS3D\_LIGHT\_CLASS, evas);
   eo\_do(data->light,
         \hyperlink{group__Evas__Canvas3D__Light_gaf6f85bf078ca39c20847ad2ff3f474fc}{evas\_canvas3d\_light\_ambient\_set}(0.2, 0.2, 0.2, 1.0),
         \hyperlink{group__Evas__Canvas3D__Light_ga156b00736a9f9aad4be58e37140f7023}{evas\_canvas3d\_light\_diffuse\_set}(1.0, 1.0, 1.0, 1.0),
         \hyperlink{group__Evas__Canvas3D__Light_ga5cf389319e2c959d0a66d23217019a97}{evas\_canvas3d\_light\_specular\_set}(1.0, 1.0, 1.0, 1.0));

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

   eo\_do(data->material,
         \hyperlink{group__Evas__Canvas3D__Material_ga6313801b7b686df5b5219e37427ac74d}{evas\_canvas3d\_material\_enable\_set}(
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_AMBIENT, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}),
         \hyperlink{group__Evas__Canvas3D__Material_ga6313801b7b686df5b5219e37427ac74d}{evas\_canvas3d\_material\_enable\_set}(
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_DIFFUSE, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}),
         \hyperlink{group__Evas__Canvas3D__Material_ga6313801b7b686df5b5219e37427ac74d}{evas\_canvas3d\_material\_enable\_set}(
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_SPECULAR, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}),

         \hyperlink{group__Evas__Canvas3D__Material_ga3275204e3932b15881703a9c60af76db}{evas\_canvas3d\_material\_color\_set}(
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_AMBIENT, 0.2, 0.2, 0.2, 1.0),
         \hyperlink{group__Evas__Canvas3D__Material_ga3275204e3932b15881703a9c60af76db}{evas\_canvas3d\_material\_color\_set}(
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
         \hyperlink{group__Evas__Canvas3D__Material_ga3275204e3932b15881703a9c60af76db}{evas\_canvas3d\_material\_color\_set}(
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_SPECULAR, 1.0, 1.0, 1.0, 1.0),
         \hyperlink{group__Evas__Canvas3D__Material_ga25b6e671258eec890ac7c073ec3695b7}{evas\_canvas3d\_material\_shininess\_set}(100.0));

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

         \hyperlink{group__Evas__Canvas3D__Mesh_ga86b73b6acc371e1771b201d51ca65181}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}(0, 
      EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_POSITION,
                                            12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[ 0]),
         \hyperlink{group__Evas__Canvas3D__Mesh_ga86b73b6acc371e1771b201d51ca65181}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}(0, 
      EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_NORMAL,
                                            12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[ 3]),
         \hyperlink{group__Evas__Canvas3D__Mesh_ga86b73b6acc371e1771b201d51ca65181}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}(0, 
      EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_COLOR,
                                            12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[ 6]),
         \hyperlink{group__Evas__Canvas3D__Mesh_ga86b73b6acc371e1771b201d51ca65181}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}(0, 
      EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_TEXCOORD,
                                            12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[10]),

         \hyperlink{group__Evas__Canvas3D__Mesh_gaeb3a4c6f4a27b969689fd64f9afdfc90}{evas\_canvas3d\_mesh\_index\_data\_set}(
      EVAS\_CANVAS3D\_INDEX\_FORMAT\_UNSIGNED\_SHORT,
                                     36, &cube\_indices[0]),
         \hyperlink{group__Evas__Canvas3D__Mesh_ga3c1e964cfbba1126f343fa240217b017}{evas\_canvas3d\_mesh\_vertex\_assembly\_set}(
      EVAS\_CANVAS3D\_VERTEX\_ASSEMBLY\_TRIANGLES),

         \hyperlink{group__Evas__Canvas3D__Mesh_ga1af764f724b873018a0f8ac535774c49}{evas\_canvas3d\_mesh\_shade\_mode\_set}(EVAS\_CANVAS3D\_SHADE\_MODE\_PHONG)
      ,

         \hyperlink{group__Evas__Canvas3D__Mesh_gaa46a6cce407c63a2347dfbb6d52a0fbe}{evas\_canvas3d\_mesh\_frame\_material\_set}(0, data->material));

   data->mesh\_node =
      \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EVAS\_CANVAS3D\_NODE\_CLASS, evas,
                    \hyperlink{group__Evas__Canvas3D__Node_ga48c406ee9be456281a51976e68016f1b}{evas\_canvas3d\_node\_constructor}(
      EVAS\_CANVAS3D\_NODE\_TYPE\_MESH));
   eo\_do(data->root\_node, \hyperlink{group__Evas__Canvas3D__Node_gaccdd3e31623dba65c3124b1a6dd26489}{evas\_canvas3d\_node\_member\_add}(data->mesh\_node));
   eo\_do(data->mesh\_node, \hyperlink{group__Evas__Canvas3D__Node_gaec8d74b134e6dbdc5911a030f4fd76ec}{evas\_canvas3d\_node\_mesh\_add}(data->mesh));
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_scene\_setup(Scene\_Data *data)
\{
   data->scene = \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EVAS\_CANVAS3D\_SCENE\_CLASS, evas);
   eo\_do(data->scene,
         \hyperlink{group__Evas__Canvas3D__Scene_gac14536e0dea2b29e44f2ead354a1b665}{evas\_canvas3d\_scene\_size\_set}(WIDTH, HEIGHT);
         \hyperlink{group__Evas__Canvas3D__Scene_ga171c9a49e95d179d1610ff3537584296}{evas\_canvas3d\_scene\_background\_color\_set}(0.0, 0.0, 0.0, 0.
      0));

   data->root\_node =
      \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EVAS\_CANVAS3D\_NODE\_CLASS, evas,
                    \hyperlink{group__Evas__Canvas3D__Node_ga48c406ee9be456281a51976e68016f1b}{evas\_canvas3d\_node\_constructor}(
      EVAS\_CANVAS3D\_NODE\_TYPE\_NODE));

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

   eo\_do(data->scene,
         \hyperlink{group__Evas__Canvas3D__Scene_ga56e50e146e4c8eb75e999a42077ffeb8}{evas\_canvas3d\_scene\_root\_node\_set}(data->root\_node),
         \hyperlink{group__Evas__Canvas3D__Scene_ga57c2dbbc51bcaf66ca62c60c44ce52d9}{evas\_canvas3d\_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 = \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EVAS\_RECTANGLE\_CLASS, evas);
   eo\_do(background,
         efl\_gfx\_color\_set(0, 0, 0, 255),
         efl\_gfx\_size\_set(WIDTH, HEIGHT),
         efl\_gfx\_visible\_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,
         efl\_gfx\_size\_set(WIDTH, HEIGHT),
         efl\_gfx\_visible\_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. */}
   \hyperlink{group__Ecore__Timer__Group_ga7b9cb9d24ecebfdbb957436e2e669402}{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}
 