diff options
author | David Walter Seikel | 2014-05-03 23:40:48 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-03 23:40:48 +1000 |
commit | 160c161b57595fdae637936c50a162d193f1a982 (patch) | |
tree | 4400c1a5e91e402e9af612fecec61aed152d2e30 /src/extantz/extantz.c | |
parent | White space clean ups from uncrustify. (diff) | |
download | SledjHamr-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 '')
-rw-r--r-- | src/extantz/extantz.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index d1fdf50..ace5150 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c | |||
@@ -89,7 +89,6 @@ static void _on_resize(void *data, Evas *evas, Evas_Object *obj, void *event_inf | |||
89 | static void _clean_gl(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | 89 | static void _clean_gl(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) |
90 | { | 90 | { |
91 | globals *ourGlobals = data; | 91 | globals *ourGlobals = data; |
92 | GLData *gld = &ourGlobals->gld; | ||
93 | 92 | ||
94 | ecore_animator_del(ourGlobals->animator); | 93 | ecore_animator_del(ourGlobals->animator); |
95 | 94 | ||
@@ -97,7 +96,9 @@ static void _clean_gl(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNU | |||
97 | // evas_gl_make_current(NULL, NULL, NULL); | 96 | // evas_gl_make_current(NULL, NULL, NULL); |
98 | 97 | ||
99 | // TODO - Since this is created on the render thread, better hope this is being deleted on the render thread. | 98 | // TODO - Since this is created on the render thread, better hope this is being deleted on the render thread. |
100 | finishIrr(gld); | 99 | #if USE_IRR |
100 | finishIrr(ourGlobals); | ||
101 | #endif | ||
101 | 102 | ||
102 | #if DO_GEARS | 103 | #if DO_GEARS |
103 | Evas_GL_API *gl = gld->glApi; | 104 | Evas_GL_API *gl = gld->glApi; |
@@ -141,14 +142,19 @@ static void _draw_gl(Evas_Object *obj) | |||
141 | GLData *gld = &ourGlobals->gld; | 142 | GLData *gld = &ourGlobals->gld; |
142 | if (!ourGlobals) return; | 143 | if (!ourGlobals) return; |
143 | 144 | ||
144 | if (!gld->doneIrr) gld->doneIrr = startIrr(gld); // Needs to be after gld->win is shown, and needs to be done in the render thread. | 145 | #if USE_IRR |
146 | if (!gld->doneIrr) gld->doneIrr = startIrr(ourGlobals); // Needs to be after gld->win is shown, and needs to be done in the render thread. | ||
147 | #endif | ||
148 | |||
145 | #if DO_GEARS | 149 | #if DO_GEARS |
146 | if (!gld->gearsInited) gears_init(gld); | 150 | if (!gld->gearsInited) gears_init(gld); |
147 | #endif | 151 | #endif |
148 | 152 | ||
149 | // if (gld->resized) _resize(gld); | 153 | // if (gld->resized) _resize(gld); |
150 | 154 | ||
151 | drawIrr_start(gld); | 155 | #if USE_IRR |
156 | drawIrr_start(ourGlobals); | ||
157 | #endif | ||
152 | 158 | ||
153 | #if DO_GEARS | 159 | #if DO_GEARS |
154 | drawGears(gld); | 160 | drawGears(gld); |
@@ -156,7 +162,9 @@ static void _draw_gl(Evas_Object *obj) | |||
156 | 162 | ||
157 | _animate_scene(ourGlobals); | 163 | _animate_scene(ourGlobals); |
158 | 164 | ||
159 | drawIrr_end(gld); | 165 | #if USE_IRR |
166 | drawIrr_end(ourGlobals); | ||
167 | #endif | ||
160 | 168 | ||
161 | #if USE_IRR | 169 | #if USE_IRR |
162 | #else | 170 | #else |
@@ -349,12 +357,14 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
349 | // Set preferred engine back to default from config | 357 | // Set preferred engine back to default from config |
350 | elm_config_preferred_engine_set(NULL); | 358 | elm_config_preferred_engine_set(NULL); |
351 | 359 | ||
352 | // TODO, or not TODO - I keep getting rid of these, but keep bringing them back. Leave ee commented for now. | 360 | // TODO, or not TODO - I keep getting rid of these, but keep bringing them back. |
353 | // Get the Evas / canvas from the elm window (that the Evas_Object "lives on"), which is itself an Evas_Object created by Elm, so not sure if it was created internally with Ecore_Evas. | 361 | // Get the Evas / canvas from the elm window (that the Evas_Object "lives on"), which is itself an Evas_Object created by Elm, so not sure if it was created internally with Ecore_Evas. |
354 | ourGlobals.evas = evas_object_evas_get(ourGlobals.win); | 362 | ourGlobals.evas = evas_object_evas_get(ourGlobals.win); |
355 | // An Ecore_Evas holds an Evas. | 363 | // An Ecore_Evas holds an Evas. |
356 | // Get the Ecore_Evas that wraps an Evas. | 364 | // Get the Ecore_Evas that wraps an Evas. |
357 | //ourGlobals.ee = ecore_evas_ecore_evas_get(ourGlobals.evas); // Only use this on Evas that was created with Ecore_Evas. | 365 | #if USE_IRR |
366 | ourGlobals.ee = ecore_evas_ecore_evas_get(ourGlobals.evas); // Only use this on Evas that was created with Ecore_Evas. | ||
367 | #endif | ||
358 | 368 | ||
359 | #if USE_PHYSICS | 369 | #if USE_PHYSICS |
360 | if (!ephysics_init()) | 370 | if (!ephysics_init()) |