aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/extantz/extantz.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-03 23:40:48 +1000
committerDavid Walter Seikel2014-05-03 23:40:48 +1000
commit160c161b57595fdae637936c50a162d193f1a982 (patch)
tree4400c1a5e91e402e9af612fecec61aed152d2e30 /src/extantz/extantz.h
parentWhite space clean ups from uncrustify. (diff)
downloadSledjHamr-160c161b57595fdae637936c50a162d193f1a982.zip
SledjHamr-160c161b57595fdae637936c50a162d193f1a982.tar.gz
SledjHamr-160c161b57595fdae637936c50a162d193f1a982.tar.bz2
SledjHamr-160c161b57595fdae637936c50a162d193f1a982.tar.xz
More shuffling of gld -> ourGlobals and related cleanups.
Diffstat (limited to 'src/extantz/extantz.h')
-rw-r--r--src/extantz/extantz.h51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/extantz/extantz.h b/src/extantz/extantz.h
index fab6708..3c671bb 100644
--- a/src/extantz/extantz.h
+++ b/src/extantz/extantz.h
@@ -1,6 +1,6 @@
1#define USE_PHYSICS 1 1#define USE_PHYSICS 1
2#define USE_IRR 0 2#define USE_IRR 0
3#define USE_DEMO 1 3#define USE_DEMO 0
4#define DO_GEARS 0 4#define DO_GEARS 0
5 5
6 6
@@ -57,9 +57,14 @@ typedef struct ICameraSceneNode ICameraSceneNode;
57#endif 57#endif
58 58
59 59
60 60#if DO_GEARS
61typedef struct _Gear Gear; 61typedef struct _Gear
62typedef struct _GLData GLData; 62{
63 GLfloat *vertices;
64 GLuint vbo;
65 int count;
66} Gear;
67#endif
63 68
64typedef enum 69typedef enum
65{ 70{
@@ -98,7 +103,6 @@ typedef struct
98 ezPlatform platform; 103 ezPlatform platform;
99 ezViewer *viewer; 104 ezViewer *viewer;
100 Elm_Object_Item *item; 105 Elm_Object_Item *item;
101GLData *gld; // Just a temporary evil hack to pass gld to _grid_sel_cb().
102} ezGrid; 106} ezGrid;
103 107
104typedef struct 108typedef struct
@@ -120,16 +124,6 @@ typedef struct
120} ezLandmark; 124} ezLandmark;
121 125
122 126
123
124struct _Gear
125{
126 GLfloat *vertices;
127 GLuint vbo;
128 int count;
129};
130
131
132
133typedef struct _Scene_Data 127typedef struct _Scene_Data
134{ 128{
135 Evas_Object *image; // Our Elm image. 129 Evas_Object *image; // Our Elm image.
@@ -162,7 +156,7 @@ typedef struct _Scene_Data
162} Scene_Data; 156} Scene_Data;
163 157
164// Elm GL view related data here. 158// Elm GL view related data here.
165struct _GLData 159typedef struct _GLData
166{ 160{
167 Evas_Object *winwin; 161 Evas_Object *winwin;
168 Evas_Object *elmGl; 162 Evas_Object *elmGl;
@@ -204,11 +198,13 @@ struct _GLData
204 GLfloat proj[16]; 198 GLfloat proj[16];
205 GLfloat light[3]; 199 GLfloat light[3];
206#endif 200#endif
207}; 201} GLData;
208 202
209typedef struct _globals 203typedef struct _globals
210{ 204{
211// Ecore_Evas *ee; 205#if USE_IRR
206 Ecore_Evas *ee;
207#endif
212 Evas *evas; 208 Evas *evas;
213 Evas_Object *win; // Our Elm window. 209 Evas_Object *win; // Our Elm window.
214 Evas_Object *tb; // Our Elm toolbar. 210 Evas_Object *tb; // Our Elm toolbar.
@@ -222,29 +218,33 @@ typedef struct _globals
222 218
223 Ecore_Animator *animator; 219 Ecore_Animator *animator;
224 220
225 struct _GLData gld; 221 GLData gld;
226 Scene_Data *scene; 222 Scene_Data *scene;
227} globals; 223} globals;
228 224
229extern globals ourGlobals; 225extern globals ourGlobals;
230 226
231 227
228#if DO_GEARS
232void gears_init(GLData *gld); 229void gears_init(GLData *gld);
233void drawGears(GLData *gld); 230void drawGears(GLData *gld);
234void free_gear(Gear *gear); 231void free_gear(Gear *gear);
232#endif
235 233
236EPhysics_World *ephysicsAdd(globals *ourGlobals); 234EPhysics_World *ephysicsAdd(globals *ourGlobals);
237 235
238EAPI int startIrr(GLData *gld); 236#if USE_IRR
239EAPI void drawIrr_start(GLData *gld); 237EAPI int startIrr(globals *ourGlobals);
240EAPI void drawIrr_end(GLData *gld); 238EAPI void drawIrr_start(globals *ourGlobals);
241EAPI void finishIrr(GLData *gld); 239EAPI void drawIrr_end(globals *ourGlobals);
240EAPI void finishIrr(globals *ourGlobals);
241#endif
242 242
243EAPI void Evas_3D_Demo_add(globals *ourGlobals); 243EAPI void Evas_3D_Demo_add(globals *ourGlobals);
244Eina_Bool _animate_scene(void *data); 244Eina_Bool _animate_scene(globals *ourGlobals);
245void Evas_3D_Demo_fini(globals *ourGlobals); 245void Evas_3D_Demo_fini(globals *ourGlobals);
246 246
247void cameraAdd(Evas_Object *win, GLData *gld); 247void cameraAdd(globals *ourGlobals, Evas_Object *win);
248 248
249Evas_Object *fang_win_add(globals *ourGlobals); 249Evas_Object *fang_win_add(globals *ourGlobals);
250void fang_win_complete(globals *ourGlobals, Evas_Object *win, int x, int y, int w, int h); 250void fang_win_complete(globals *ourGlobals, Evas_Object *win, int x, int y, int w, int h);
@@ -257,4 +257,3 @@ void woMan_add(globals *ourGlobals);
257#ifdef __cplusplus 257#ifdef __cplusplus
258} 258}
259#endif 259#endif
260