aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/extantz/crappisspuke.cpp
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/crappisspuke.cpp
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/crappisspuke.cpp')
-rw-r--r--ClientHamr/extantz/crappisspuke.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/ClientHamr/extantz/crappisspuke.cpp b/ClientHamr/extantz/crappisspuke.cpp
index 5bfb6e2..15cb523 100644
--- a/ClientHamr/extantz/crappisspuke.cpp
+++ b/ClientHamr/extantz/crappisspuke.cpp
@@ -3,7 +3,6 @@
3#include "extantz.h" 3#include "extantz.h"
4#include "CDemo.h" 4#include "CDemo.h"
5 5
6#define USE_DEMO 1
7 6
8SExposedVideoData videoData; 7SExposedVideoData videoData;
9 8
@@ -28,7 +27,7 @@ EAPI int startIrr(GLData *gld)
28 bool additive = true; 27 bool additive = true;
29 28
30 if (!gld->useIrr) 29 if (!gld->useIrr)
31 return 0; 30 return 1; // Return 1 so that the caller stops asking on each frame.
32 31
33#if USE_IRR 32#if USE_IRR
34 void *display = NULL; 33 void *display = NULL;
@@ -39,12 +38,9 @@ EAPI int startIrr(GLData *gld)
39 myDemo = new CDemo(gld, additive); 38 myDemo = new CDemo(gld, additive);
40#endif 39#endif
41 40
42 evas_gl_make_current(gld->evasgl, gld->sfc, gld->ctx);
43
44 display = glXGetCurrentDisplay(); 41 display = glXGetCurrentDisplay();
45 sfc = ecore_evas_window_get(ecore_evas_ecore_evas_get(evas_object_evas_get(gld->win))); 42 sfc = ecore_evas_window_get(gld->ee);
46 ctx = glXGetCurrentContext(); 43 ctx = glXGetCurrentContext();
47
48 /* For using a pre existing X11 window (with optional OpenGL). */ 44 /* For using a pre existing X11 window (with optional OpenGL). */
49 videoData = SExposedVideoData(); 45 videoData = SExposedVideoData();
50 videoData.OpenGLLinux.X11Display = display; // void * - Connection to the X server. 46 videoData.OpenGLLinux.X11Display = display; // void * - Connection to the X server.
@@ -116,10 +112,11 @@ EAPI int startIrr(GLData *gld)
116 driver = device->getVideoDriver(); gld->driver = driver; 112 driver = device->getVideoDriver(); gld->driver = driver;
117 smgr = device->getSceneManager(); gld->smgr = smgr; 113 smgr = device->getSceneManager(); gld->smgr = smgr;
118 114
119 device->setResizable(true); 115 // FIXME - this is what makes the window vanish in EFL 1.8, but worked fine in 1.7 I think.
120 driver->OnResize(dimension2d<u32>(gld->sfc_w, gld->sfc_h)); 116// device->setResizable(true);
117 driver->OnResize(dimension2d<u32>(gld->img_w, gld->img_h));
121 // Just gives me a blank screen. grrrr 118 // Just gives me a blank screen. grrrr
122// driver->setViewPort(rect<s32>(0, 0, gld->sfc_w, gld->sfc_h)); 119// driver->setViewPort(rect<s32>(0, 0, gld->img_w, gld->img_h));
123 120
124 // set ambient light 121 // set ambient light
125 smgr->setAmbientLight (video::SColorf(0x00c0c0c0)); 122 smgr->setAmbientLight (video::SColorf(0x00c0c0c0));
@@ -191,6 +188,7 @@ EAPI void drawIrr_start(GLData *gld)
191 const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds 188 const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds
192 then = now; 189 then = now;
193 190
191
194#if USE_DEMO 192#if USE_DEMO
195 myDemo->preDraw(gld, now); 193 myDemo->preDraw(gld, now);
196#else 194#else
@@ -206,7 +204,7 @@ EAPI void drawIrr_start(GLData *gld)
206 the GUI Environment draw their content. With the endScene() 204 the GUI Environment draw their content. With the endScene()
207 call everything is presented on the screen. 205 call everything is presented on the screen.
208 */ 206 */
209 driver->beginScene(true, true, SColor(255, 100, 101, 140), videoData, NULL); // This does the context change, then clearBuffers() 207 driver->beginScene(true, true, SColor(255, 255, 255, 255), videoData, NULL); // This does the context change, then clearBuffers()
210 208
211 smgr->drawAll(); 209 smgr->drawAll();
212 } 210 }