summaryrefslogtreecommitdiff
path: root/src/examples/elementary/performance/graphical_struct.h
blob: a38806d94f43c68c7a89ef781e7faa4939e5e235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef GRAPHICAL_STRUCT_H
#define GRAPHICAL_STRUCT_H

typedef struct _vec4
{
    float   x;
    float   y;
    float   z;
    float   w;
} vec4;

typedef struct _vec3
{
    float   x;
    float   y;
    float   z;
} vec3;

typedef struct _vec2
{
    float   x;
    float   y;
} vec2;
typedef struct _vertex
{
    vec3    position;
    vec3    normal;
    vec3    tangent;
    vec4    color;
    vec3    texcoord;
} vertex;

typedef struct _place
{
   vec3    position;
} place;

typedef struct _Flags_Change
{
   Eina_Bool fog_enable;
   Eina_Bool shadow_enable;
   Eina_Bool colorpick_enable;
   Eina_Bool blend_enable;
   Eina_Bool fps_enable;
} Changes;

typedef struct _Graphical
{
   Evas *evas;
   Evas_Object *img;
   Eo *scene;
   Eo *root_node;
   Eo *light_node;
   Eo *light;
   Eo *camera_node;
   Eo *camera;
   Eo *mesh_node;
   Eo *mesh;
   Eo *material;
   Eo *material_box;
   Eo *texture;
   Eo *mesh_box;
   Eo *mesh_nodebox;
   Eo *texture_box;

   Eina_List *list_nodes;
   Eina_List *list_meshes;

   const char *model_path;

   void (*init_scene)();
   void (*change_scene_setup)();

   vertex *vertices;
   place *places;
   unsigned short *indices;
   int index_count;
   int vertex_count;

   int count;
   int speed;
   int precision;
   int angle;

   Changes flags;

} Graphical;

extern Graphical globalGraphical;
#endif