aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/extantz/extantz.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-01-13 00:44:33 +1000
committerDavid Walter Seikel2014-01-13 00:44:33 +1000
commit469329e0b46350053ef28bf814dc91e76463625e (patch)
tree6908aed67a04b48272e96438f2e98db294206326 /ClientHamr/extantz/extantz.h
parentBit more anti bit rot and standards conforming comments. (diff)
downloadSledjHamr-469329e0b46350053ef28bf814dc91e76463625e.zip
SledjHamr-469329e0b46350053ef28bf814dc91e76463625e.tar.gz
SledjHamr-469329e0b46350053ef28bf814dc91e76463625e.tar.bz2
SledjHamr-469329e0b46350053ef28bf814dc91e76463625e.tar.xz
Fix EFL 1.7 -> 1.8 bit rot, make it work with Elm_glview to, and lots of cleanup.
Diffstat (limited to 'ClientHamr/extantz/extantz.h')
-rw-r--r--ClientHamr/extantz/extantz.h50
1 files changed, 39 insertions, 11 deletions
diff --git a/ClientHamr/extantz/extantz.h b/ClientHamr/extantz/extantz.h
index 336e965..af0c1d3 100644
--- a/ClientHamr/extantz/extantz.h
+++ b/ClientHamr/extantz/extantz.h
@@ -1,3 +1,18 @@
1#define USE_EO 0
2#define USE_PHYSICS 1
3#define USE_EGL 1 // If using Evas_GL, though it might be via Elm.
4#define USE_ELM_GL 1
5#define USE_IRR 1
6#define USE_DEMO 1
7#define DO_GEARS 0
8
9#if USE_EO
10 /* Enable access to unstable EFL API that are still in beta */
11 #define EFL_BETA_API_SUPPORT 1
12 /* Enable access to unstable EFL EO API. */
13 #define EFL_EO_API_SUPPORT 1
14#endif
15
1#include <Elementary.h> 16#include <Elementary.h>
2#include <elm_widget_glview.h> 17#include <elm_widget_glview.h>
3#include <Evas_GL.h> 18#include <Evas_GL.h>
@@ -50,11 +65,18 @@ typedef struct ICameraSceneNode ICameraSceneNode;
50#endif 65#endif
51 66
52 67
53#define USE_PHYSICS 0 68#define CRI(...) EINA_LOG_DOM_CRIT(_log_domain, _VA_ARGS__)
54#define USE_EGL 0 69#define ERR(...) EINA_LOG_DOM_ERR(_log_domain, __VA_ARGS__)
55#define USE_IRR 0 70#define WRN(...) EINA_LOG_DOM_WARN(_log_domain, __VA_ARGS__)
71#define INF(...) EINA_LOG_DOM_INFO(_log_domain, __VA_ARGS__)
72#define DBG(...) EINA_LOG_DOM_DBG(_log_domain, __VA_ARGS__)
73
74extern int _log_domain;
56 75
57 76
77typedef struct _Gear Gear;
78typedef struct _GLData GLData;
79
58typedef enum 80typedef enum
59{ 81{
60 EZP_NONE, 82 EZP_NONE,
@@ -92,6 +114,7 @@ typedef struct
92 ezPlatform platform; 114 ezPlatform platform;
93 ezViewer *viewer; 115 ezViewer *viewer;
94 Elm_Object_Item *item; 116 Elm_Object_Item *item;
117GLData *gld; // Just a temporary evil hack to pass gld to _grid_sel_cb().
95} ezGrid; 118} ezGrid;
96 119
97typedef struct 120typedef struct
@@ -113,9 +136,6 @@ typedef struct
113} ezLandmark; 136} ezLandmark;
114 137
115 138
116typedef struct _Gear Gear;
117typedef struct _GLData GLData;
118
119 139
120struct _Gear 140struct _Gear
121{ 141{
@@ -129,21 +149,29 @@ struct _GLData
129{ 149{
130 Evas_Object *win; 150 Evas_Object *win;
131 151
152 Ecore_Evas *ee;
153 Evas *canvas;
154 Evas_Native_Surface ns;
155
132 Evas_GL_Context *ctx; 156 Evas_GL_Context *ctx;
133 Evas_GL_Surface *sfc; 157 Evas_GL_Surface *sfc;
134 Evas_GL_Config *cfg; 158 Evas_GL_Config *cfg;
135 Evas_GL *evasgl; 159 Evas_GL *evasGl; // The Evas way.
136 Evas_GL_API *glapi; 160 Evas_Object *elmGl; // The Elm way.
161 Evas_GL_API *glApi;
137 162
138 GLuint program; 163 GLuint program;
139 GLuint vtx_shader; 164 GLuint vtx_shader;
140 GLuint fgmt_shader; 165 GLuint fgmt_shader;
141 int scr_w, scr_h; 166 int scr_w, scr_h; // The size of the screen.
142 int sfc_w, sfc_h; 167 int win_w, win_h; // The size of the window.
143 int img_w, img_h; 168 int win_x, win_y; // The position of the window.
169 int sfc_w, sfc_h; // This is what Irrlicht is using, size of the GL image surface / glview.
170 int img_w, img_h; // Size of the viewport. DON'T reuse sfc_* here. Despite the fach that sfc_* is only used in the init when Irricht is disabled? WTF?
144 int useEGL : 1; 171 int useEGL : 1;
145 int useIrr : 1; 172 int useIrr : 1;
146 int doneIrr : 1; 173 int doneIrr : 1;
174 int gearsInited : 1;
147 int resized : 1; 175 int resized : 1;
148 int camFocus : 1; 176 int camFocus : 1;
149 177