evas: refactoring evas examples descriptions.
Summary: Descriptions of evas examples are standardized. Added missing descriptions to examples. Deleted copy of description in evas-init-shutdown.c. Reviewers: Hermet, raster, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2031 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
52152ef757
commit
1f9ac72b8e
|
@ -1,9 +1,12 @@
|
|||
/*
|
||||
/**
|
||||
* This example shows how to get and draw axis-aligned bounding box.
|
||||
|
||||
*
|
||||
* @see _mesh_aabb(Evas_3D_Mesh **mesh_b, const Evas_3D_Node *node);
|
||||
* Rotate axises (keys 1-4) for model and bounding box view from another angle.
|
||||
* Compile with "gcc -o evas-3d-aabb evas-3d-aabb.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`"
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-aabb evas-3d-aabb.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* This example shows how to use color pick algorithm for finding node at scene.
|
||||
* Enable color pick mode of meshes and scene objects.
|
||||
* Click (left for color pick, right for geometry pick) on 3D object and see
|
||||
|
@ -7,7 +7,10 @@
|
|||
* Use key LEFT/RIGHT for scale each node
|
||||
* Use shortcut parameters of commanline: r - rows of objects, c - columns of objects, m - path for model name,
|
||||
* f - path for first texture, s - path for second texture.
|
||||
* Compile with "gcc -o evas-3d-colorpick evas-3d-colorpick.c `pkg-config --libs --cflags evas ecore ecore-evas eo eina efl`"
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-colorpick evas-3d-colorpick.c `pkg-config --libs --cflags evas ecore ecore-evas eo eina efl`
|
||||
* @endverbatim
|
||||
*/
|
||||
//TODO new resources
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
/*
|
||||
* This example shows how the work of events with callback of the mouse could be useful in node rotation.
|
||||
*
|
||||
* After clicking the mouse on cube callbacks began to emit autmatically,
|
||||
* depending on mouse's position change the cube rotates with a certain
|
||||
* speed while mouse is still on the cube, also rotation slows down when
|
||||
* leaving the boundaries of the cube, all this goes on while the mouse
|
||||
* is pressed. Note, that rotation is taking place around one axis only.
|
||||
*
|
||||
* Compile with "gcc -o evas-3d-cube-rotate evas-3d-cube-rotate.c -g `pkg-config --libs --cflags evas ecore ecore-evas eo` -lm"
|
||||
*/
|
||||
/**
|
||||
* This example shows how the work of events with callback of the mouse could be useful in node rotation.
|
||||
*
|
||||
* After clicking the mouse on cube callbacks began to emit autmatically,
|
||||
* depending on mouse's position change the cube rotates with a certain
|
||||
* speed while mouse is still on the cube, also rotation slows down when
|
||||
* leaving the boundaries of the cube, all this goes on while the mouse
|
||||
* is pressed. Note, that rotation is taking place around one axis only.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-cube-rotate evas-3d-cube-rotate.c -g `pkg-config --libs --cflags evas ecore ecore-evas eo` -lm
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#define EFL_EO_API_SUPPORT
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/**
|
||||
* Simple Evas-3D example illustrating how to create simple mesh without any loading.
|
||||
*
|
||||
* This example is the best to start introduction to usage of Evas-3D.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-cube evas-3d-cube.c `pkg-config --libs --cflags evas ecore ecore-evas eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#define EFL_EO_API_SUPPORT
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/**
|
||||
* Simple Evas-3D example illustrating usage of normal mapping and animation created
|
||||
* by interpolation between frames.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-cube2 evas-3d-cube2.c `pkg-config --libs --cflags evas ecore ecore-evas eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
/**
|
||||
* Simple Evas example illustrating .eet import/export
|
||||
*
|
||||
* Take mesh from md2.
|
||||
* Set material to it.
|
||||
* Show it in left side.
|
||||
* Save the first frame of this mesh to eet. (static only)
|
||||
* Take result to another mesh from eet.
|
||||
* Show it in right side.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-eet evas-3d-eet.c `pkg-config --libs --cflags efl eina evas ecore ecore-evas ecore-file eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
* Simple Evas example illustrating .eet import/export
|
||||
*
|
||||
* Take mesh from md2.
|
||||
* Set material to it.
|
||||
* Show it in left side.
|
||||
* Save the first frame of this mesh to eet. (static only)
|
||||
* Take result to another mesh from eet.
|
||||
* Show it in right side.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-eet evas-3d-eet.c `pkg-config --libs --cflags efl eina evas ecore ecore-evas ecore-file eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* This example shows how to work frustum culling.
|
||||
* Use 'w'/'s' key to move far frustum plane from/to the camera.
|
||||
* Use 't'/'g' key to move near frustum plane from/to the camera.
|
||||
|
@ -8,7 +8,10 @@
|
|||
* Use 'z', 'x', 'c', 'Z', 'X' and 'C' keys to change scaling constants of mesh.
|
||||
* See in terminal output value distance to far plane of frustum and value of visibility of node
|
||||
* @see evas_3d_camera_node_visible_get.
|
||||
* Compile with "gcc -o evas-3d-frustum evas-3d-frustum.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo` -lm"
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-frustum evas-3d-frustum.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo` -lm
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/**
|
||||
* Simple Evas-3D example illustrating import from .md2 format.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-md2 evas-3d-md2.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/**
|
||||
* Simple Evas example illustrating import from mmap.
|
||||
*
|
||||
* Open files to Eina_Files.
|
||||
* Read meshes from Eina_Files.
|
||||
* Show the results.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-mmap-set evas-3d-mmap-set.c `pkg-config --libs --cflags evas ecore ecore-evas eina eo` -lm
|
||||
* @endverbatim
|
||||
*/
|
||||
* Simple Evas example illustrating import from mmap.
|
||||
*
|
||||
* Open files to Eina_Files.
|
||||
* Read meshes from Eina_Files.
|
||||
* Show the results.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-mmap-set evas-3d-mmap-set.c `pkg-config --libs --cflags evas ecore ecore-evas eina eo` -lm
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
/*
|
||||
* This example illustrates the work of different callbacks of events from mouse
|
||||
* and keyboard.
|
||||
*
|
||||
* Next tests are available:
|
||||
* 1. All animations of scene will stop on mouse click on the background.
|
||||
* 2. Clicking of any object on scene causes stop of its movement, but if click on
|
||||
* the moon while it is in front of a planet will stop them both.
|
||||
* 3. Camera position can be changed by pressing 'down' or 'up' key. Position of
|
||||
* the camera changes in the respective direction.
|
||||
* 4. The 'n' key pressing returns camera to its default position.
|
||||
* 5. One of four types of vertex assembly of planet could be chosen by clicking on
|
||||
* a number from 1 to 4 on keyboard.
|
||||
|
||||
* Compile with:
|
||||
* gcc -o evas-3d-moon-space evas-3d-moon-space.c -g `pkg-config --libs --cflags evas ecore ecore-evas eo` -lm
|
||||
*/
|
||||
/**
|
||||
* This example illustrates the work of different callbacks of events from mouse
|
||||
* and keyboard.
|
||||
*
|
||||
* Next tests are available:
|
||||
* 1. All animations of scene will stop on mouse click on the background.
|
||||
* 2. Clicking of any object on scene causes stop of its movement, but if click on
|
||||
* the moon while it is in front of a planet will stop them both.
|
||||
* 3. Camera position can be changed by pressing 'down' or 'up' key. Position of
|
||||
* the camera changes in the respective direction.
|
||||
* 4. The 'n' key pressing returns camera to its default position.
|
||||
* 5. One of four types of vertex assembly of planet could be chosen by clicking on
|
||||
* a number from 1 to 4 on keyboard.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-moon-space evas-3d-moon-space.c -g `pkg-config --libs --cflags evas ecore ecore-evas eo` -lm
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
/**
|
||||
* Simple Evas example illustrating import/export of .obj format.
|
||||
* Example demonstrate possibility to load and save mesh without tex_coords or/and normals.
|
||||
*
|
||||
* Read mesh from "sweet_home(parameters).obj".
|
||||
* After that cheange some properties of material.
|
||||
* After that save material to "saved_files/saved_home(parameters).mtl"
|
||||
* and geometry to "saved_files/saved_home(parameters).obj".
|
||||
* If material was not set it will be not saved.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-obj evas-3d-obj.c `pkg-config --libs --cflags efl evas ecore ecore-evas ecore-file eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
* Simple Evas example illustrating import/export of .obj format.
|
||||
* Example demonstrate possibility to load and save mesh without tex_coords or/and normals.
|
||||
*
|
||||
* Read mesh from "sweet_home(parameters).obj".
|
||||
* After that cheange some properties of material.
|
||||
* After that save material to "saved_files/saved_home(parameters).mtl"
|
||||
* and geometry to "saved_files/saved_home(parameters).obj".
|
||||
* If material was not set it will be not saved.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-obj evas-3d-obj.c `pkg-config --libs --cflags efl evas ecore ecore-evas ecore-file eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
/**
|
||||
* This example shows how to attach mechanism of pick.
|
||||
*
|
||||
* Here shown which transformation should be applied to event_info of
|
||||
* _on_mouse_down to make them usable in evas_3d_scene_pick()
|
||||
* and parameters which can be got from this function.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-pick evas-3d-pick.c `pkg-config --libs --cflags evas ecore ecore-evas eo` -lm
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/**
|
||||
* Simple Evas example illustrating import/export of .ply format.
|
||||
*
|
||||
* Read meshes from "tested_man_all_with_mods.ply", "tested_man_only_geometry.ply" and "tested_man_without_UVs.ply".
|
||||
* After that cheange some properties of material.
|
||||
* After that save material to "saved_man.mtl"
|
||||
* and geometry to "saved_man_all_with_mods.ply", "saved_man_only_geometry.ply" and "saved_man_without_UVs.ply".
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-ply evas-3d-ply.c `pkg-config --libs --cflags efl evas ecore ecore-evas ecore-file eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
* Simple Evas example illustrating import/export of .ply format.
|
||||
*
|
||||
* Read meshes from "tested_man_all_with_mods.ply", "tested_man_only_geometry.ply" and "tested_man_without_UVs.ply".
|
||||
* After that cheange some properties of material.
|
||||
* After that save material to "saved_man.mtl"
|
||||
* and geometry to "saved_man_all_with_mods.ply", "saved_man_only_geometry.ply" and "saved_man_without_UVs.ply".
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-ply evas-3d-ply.c `pkg-config --libs --cflags efl evas ecore ecore-evas ecore-file eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
//TODO new resources
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
/**
|
||||
* Evas-3D example illustrating usage of evas_3d_texture_source_set()
|
||||
*
|
||||
* Data which will be used as texture can be generated directly in application.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-3d-proxy evas-3d-proxy.c `pkg-config --libs --cflags evas ecore ecore-evas eo`
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#define EFL_EO_API_SUPPORT
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
/*
|
||||
/**
|
||||
* This example illustrating use of shadows in the scene and callbacks(clicked, collision).
|
||||
* Model and cube are clickable. Model detects collision with sphere.
|
||||
* Cube detects collision with sphere, model and cone.
|
||||
* @see evas_3d_scene_shadows_enable_set(Eina_Bool _shadows_enabled)
|
||||
* @see evas_3d_object_callback_register
|
||||
*
|
||||
* Compile with gcc -o gcc -o evas-3d-shadows evas-3d-shadows.c evas-3d-primitives.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo eina` -lm
|
||||
* @verbatim
|
||||
* gcc -o gcc -o evas-3d-shadows evas-3d-shadows.c evas-3d-primitives.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo eina` -lm
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
|
@ -4,13 +4,11 @@
|
|||
* You must have Evas compiled with the buffer engine, and have the
|
||||
* evas-software-buffer pkg-config files installed.
|
||||
*
|
||||
* Compile with:
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-buffer-simple evas-buffer-simple.c `pkg-config --libs --cflags evas evas-software-buffer`
|
||||
* @endverbatim
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Evas.h>
|
||||
#include <Evas_Engine_Buffer.h>
|
||||
#include <stdio.h>
|
||||
|
@ -28,6 +26,7 @@
|
|||
* automatic render of updates (draw_scene()) when system goes back to
|
||||
* main loop.
|
||||
*/
|
||||
|
||||
static Evas *create_canvas(int width, int height);
|
||||
static void destroy_canvas(Evas *canvas);
|
||||
static void draw_scene(Evas *canvas);
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
//Add Evas_GL.h for Evas GL APIs access.
|
||||
/**
|
||||
* Evas example illustrating work with GL APIs.
|
||||
*
|
||||
* Evas_GL.h should be added for Evas GL APIs access.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-gl evas-gl.c `pkg-config --libs --cflags evas ecore ecore-evas` -lm
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#include <Ecore.h>
|
||||
#include <Ecore_Evas.h>
|
||||
#include <Evas_GL.h>
|
||||
|
|
|
@ -17,17 +17,6 @@
|
|||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
* Simple example illustrating usage of evas_init() and
|
||||
* evas_shutdown(). Usually one would instantiate a canvas to have
|
||||
* something useful out of Evas. For an example of this kind, see the
|
||||
* evas-buffer-simple.c, which requires the buffer engine module
|
||||
* compiled in Evas.
|
||||
*
|
||||
* Here, we are just listing the engine Evas was compiled with support
|
||||
* to.
|
||||
*/
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
/**
|
||||
* Simple Evas example illustrating usage of multi touch.
|
||||
*
|
||||
* You'll need at least one engine built for it (excluding the buffer
|
||||
* one) and the png image loader also built.
|
||||
*
|
||||
* @verbatim
|
||||
* gcc -o evas-multi-touch evas-multi-touch.c `pkg-config --libs --cflags evas ecore ecore-evas eina` -lm
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue