\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 3D is an extension to support 3D scene graph rendering into 2D Evas canvas supporting typicall tree-\/based scene graph manipulation and other 3D graphics rendering techniques.

Evas 3D provides 3D objects which are used for describing 3D 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 3D scene is process of locating desired cameras, lights and meshes in the scene. Typically the scene is structured with some hierarchical data structure. Evas 3D 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 3D graphics engine, Evas 3D support standard 3D rendering method like flat shading, phong shading and normal map and other features like texture mapping, triangle meshes.

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

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

\begin{DoxyCodeInclude}

\textcolor{preprocessor}{#ifdef HAVE\_CONFIG\_H}
\textcolor{preprocessor}{#include "config.h"}
\textcolor{preprocessor}{#else}
\textcolor{preprocessor}{#define EFL\_BETA\_API\_SUPPORT}
\textcolor{preprocessor}{#define EFL\_EO\_API\_SUPPORT}
\textcolor{preprocessor}{#endif}

\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);
   efl\_gfx\_size\_set(background, w, h);
   efl\_gfx\_size\_set(image, 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;

   \hyperlink{group__Evas__Canvas3D__Node_ga3f85075551014b524acd2898e9651397}{evas\_canvas3d\_node\_orientation\_angle\_axis\_set}(scene->
      mesh\_node, 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);

   \hyperlink{group__Evas__Canvas3D__Camera_ga5027c6be4dc48861aa4d44b0e1c8eb76}{evas\_canvas3d\_camera\_projection\_perspective\_set}(data->
      camera, 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_ga8ccb2cc018aed216db6f8cd6ff26891e}{evas\_canvas3d\_node\_constructor}(eo\_self, EVAS\_CANVAS3D\_NODE\_TYPE\_CAMERA));
   \hyperlink{group__Evas__Canvas3D__Node_gada82d511931d224183241f6573aeb016}{evas\_canvas3d\_node\_camera\_set}(data->camera\_node, data->camera);
   \hyperlink{group__Evas__Canvas3D__Node_ga34226725e6f77397123da2fd927f8dca}{evas\_canvas3d\_node\_position\_set}(data->camera\_node, 0.0, 0.0, 10.0);
   \hyperlink{group__Evas__Canvas3D__Node_ga8ae46000ed15a96a2b1fb6c8001cc890}{evas\_canvas3d\_node\_look\_at\_set}(data->camera\_node, 
      EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 0.0, 0.0, EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 1.0, 0.0);
   \hyperlink{group__Evas__Canvas3D__Node_gafe4b1558adbb99add423014a33f66a42}{evas\_canvas3d\_node\_member\_add}(data->root\_node, 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);
   \hyperlink{group__Evas__Canvas3D__Light_gaba32530c3f4a03ad3db6b4d83c893e4e}{evas\_canvas3d\_light\_ambient\_set}(data->light, 0.2, 0.2, 0.2, 1.0);
   \hyperlink{group__Evas__Canvas3D__Light_ga33fd09219eec857754f3c7a0a3116665}{evas\_canvas3d\_light\_diffuse\_set}(data->light, 1.0, 1.0, 1.0, 1.0);
   \hyperlink{group__Evas__Canvas3D__Light_gab8ac412e68c33037dd8f07345a67f8dc}{evas\_canvas3d\_light\_specular\_set}(data->light, 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_ga8ccb2cc018aed216db6f8cd6ff26891e}{evas\_canvas3d\_node\_constructor}(eo\_self, EVAS\_CANVAS3D\_NODE\_TYPE\_LIGHT));
   \hyperlink{group__Evas__Canvas3D__Node_ga7084e99ee4ddc80564cc5038f381d70a}{evas\_canvas3d\_node\_light\_set}(data->light\_node, data->light);
   \hyperlink{group__Evas__Canvas3D__Node_ga34226725e6f77397123da2fd927f8dca}{evas\_canvas3d\_node\_position\_set}(data->light\_node, 0.0, 0.0, 10.0);
   \hyperlink{group__Evas__Canvas3D__Node_ga8ae46000ed15a96a2b1fb6c8001cc890}{evas\_canvas3d\_node\_look\_at\_set}(data->light\_node, 
      EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 0.0, 0.0, EVAS\_CANVAS3D\_SPACE\_PARENT, 0.0, 1.0, 0.0);
   \hyperlink{group__Evas__Canvas3D__Node_gafe4b1558adbb99add423014a33f66a42}{evas\_canvas3d\_node\_member\_add}(data->root\_node, 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);

   \hyperlink{group__Evas__Canvas3D__Material_ga2e7d668fb9dbba6aabb06294cbece424}{evas\_canvas3d\_material\_enable\_set}(data->material, 
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_AMBIENT, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   \hyperlink{group__Evas__Canvas3D__Material_ga2e7d668fb9dbba6aabb06294cbece424}{evas\_canvas3d\_material\_enable\_set}(data->material, 
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_DIFFUSE, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   \hyperlink{group__Evas__Canvas3D__Material_ga2e7d668fb9dbba6aabb06294cbece424}{evas\_canvas3d\_material\_enable\_set}(data->material, 
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_SPECULAR, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   \hyperlink{group__Evas__Canvas3D__Material_ga5ced565c2c89331cea8cf707b435177a}{evas\_canvas3d\_material\_color\_set}(data->material, 
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_AMBIENT, 0.2, 0.2, 0.2, 1.0);
   \hyperlink{group__Evas__Canvas3D__Material_ga5ced565c2c89331cea8cf707b435177a}{evas\_canvas3d\_material\_color\_set}(data->material, 
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
   \hyperlink{group__Evas__Canvas3D__Material_ga5ced565c2c89331cea8cf707b435177a}{evas\_canvas3d\_material\_color\_set}(data->material, 
      EVAS\_CANVAS3D\_MATERIAL\_ATTRIB\_SPECULAR, 1.0, 1.0, 1.0, 1.0);
   \hyperlink{group__Evas__Canvas3D__Material_ga677ab1157d7068a15f885976988a5357}{evas\_canvas3d\_material\_shininess\_set}(data->material, 100.0);

   \textcolor{comment}{/* Setup mesh. */}
   data->mesh = \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EVAS\_CANVAS3D\_MESH\_CLASS, evas);
   \hyperlink{group__Evas__Canvas3D__Mesh_gaa9003ece67c1b894a120bb4fce31f853}{evas\_canvas3d\_mesh\_vertex\_count\_set}(data->mesh, 24);
   \hyperlink{group__Evas__Canvas3D__Mesh_ga14c55769f8923769e496be2635d7bb8c}{evas\_canvas3d\_mesh\_frame\_add}(data->mesh, 0);
   \hyperlink{group__Evas__Canvas3D__Mesh_gaf9c98c1519090bebf45db043a901c103}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}(data->mesh, 0, 
      EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_POSITION, 12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[ 0]);
   \hyperlink{group__Evas__Canvas3D__Mesh_gaf9c98c1519090bebf45db043a901c103}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}(data->mesh, 0, 
      EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_NORMAL, 12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[ 3]);
   \hyperlink{group__Evas__Canvas3D__Mesh_gaf9c98c1519090bebf45db043a901c103}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}(data->mesh, 0, 
      EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_COLOR, 12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[ 6]);
   \hyperlink{group__Evas__Canvas3D__Mesh_gaf9c98c1519090bebf45db043a901c103}{evas\_canvas3d\_mesh\_frame\_vertex\_data\_set}(data->mesh, 0, 
      EVAS\_CANVAS3D\_VERTEX\_ATTRIB\_TEXCOORD, 12 * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{float}), &cube\_vertices[10]);
   \hyperlink{group__Evas__Canvas3D__Mesh_ga72517810ec5bb87fdb14968bc8719b00}{evas\_canvas3d\_mesh\_index\_data\_set}(data->mesh, 
      EVAS\_CANVAS3D\_INDEX\_FORMAT\_UNSIGNED\_SHORT, 36, &cube\_indices[0]);
   \hyperlink{group__Evas__Canvas3D__Mesh_gabd3e82c79b161dc35f417f9819e59002}{evas\_canvas3d\_mesh\_vertex\_assembly\_set}(data->mesh, 
      EVAS\_CANVAS3D\_VERTEX\_ASSEMBLY\_TRIANGLES);
   \hyperlink{group__Evas__Canvas3D__Mesh_ga26638a558bddc06da4fcfa0437393f59}{evas\_canvas3d\_mesh\_shader\_mode\_set}(data->mesh, 
      EVAS\_CANVAS3D\_SHADER\_MODE\_PHONG);
   \hyperlink{group__Evas__Canvas3D__Mesh_ga00cec1f7c3a757540f0b4dee377fd2f7}{evas\_canvas3d\_mesh\_frame\_material\_set}(data->mesh, 0, data->material
      );

   data->mesh\_node =
      \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EVAS\_CANVAS3D\_NODE\_CLASS, evas, 
      \hyperlink{group__Evas__Canvas3D__Node_ga8ccb2cc018aed216db6f8cd6ff26891e}{evas\_canvas3d\_node\_constructor}(eo\_self, EVAS\_CANVAS3D\_NODE\_TYPE\_MESH));
   \hyperlink{group__Evas__Canvas3D__Node_gafe4b1558adbb99add423014a33f66a42}{evas\_canvas3d\_node\_member\_add}(data->root\_node, data->mesh\_node);
   \hyperlink{group__Evas__Canvas3D__Node_ga1c590f8577ced65a875cbbbee494e375}{evas\_canvas3d\_node\_mesh\_add}(data->mesh\_node, 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);
   \hyperlink{group__Evas__Canvas3D__Scene_gae15d6ae4c998ee2948c327524e4583a9}{evas\_canvas3d\_scene\_size\_set}(data->scene, WIDTH, HEIGHT);
   \hyperlink{group__Evas__Canvas3D__Scene_ga739849c2bcc4456736155d906a1d9300}{evas\_canvas3d\_scene\_background\_color\_set}(data->scene, 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_ga8ccb2cc018aed216db6f8cd6ff26891e}{evas\_canvas3d\_node\_constructor}(eo\_self, EVAS\_CANVAS3D\_NODE\_TYPE\_NODE));

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

   \hyperlink{group__Evas__Canvas3D__Scene_ga1bf3ce3e21e478974e30a88133f47c3d}{evas\_canvas3d\_scene\_root\_node\_set}(data->scene, data->root\_node);
   \hyperlink{group__Evas__Canvas3D__Scene_ga137e26bf40efe75b24197091d888c874}{evas\_canvas3d\_scene\_camera\_node\_set}(data->scene, 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}(EFL\_CANVAS\_RECTANGLE\_CLASS, evas);
   efl\_gfx\_color\_set(background, 0, 0, 0, 255);
   efl\_gfx\_size\_set(background, WIDTH, HEIGHT);
   efl\_gfx\_visible\_set(background, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

   \textcolor{comment}{/* Add an image object for 3D scene rendering. */}
   image = \hyperlink{group__Eo_ga5a832ab70d280281cca80fc6d4f29741}{eo\_add}(EFL\_CANVAS\_SCENE3D\_CLASS, evas);
   efl\_gfx\_size\_set(image, WIDTH, HEIGHT);
   efl\_gfx\_visible\_set(image, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

   \textcolor{comment}{/* Set the image object as render target for 3D scene. */}
   efl\_canvas\_scene3d\_set(image, 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}
 