From e70ef920d1f9d5b21c93e1ded5fb320174489458 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 20 Jan 2013 12:31:03 +1000 Subject: Stabilise the GL image with respect to window resizes. Still needs some clean up. --- ClientHamr/extantz/crappisspuke.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ClientHamr/extantz/crappisspuke.cpp') diff --git a/ClientHamr/extantz/crappisspuke.cpp b/ClientHamr/extantz/crappisspuke.cpp index 47a6353..90cbbed 100644 --- a/ClientHamr/extantz/crappisspuke.cpp +++ b/ClientHamr/extantz/crappisspuke.cpp @@ -116,6 +116,11 @@ EAPI int startIrr(GLData *gld) driver = device->getVideoDriver(); gld->driver = driver; smgr = device->getSceneManager(); gld->smgr = smgr; + device->setResizable(true); + driver->OnResize(dimension2d(gld->sfc_w, gld->sfc_h)); + // Just gives me a blank screen. grrrr +// driver->setViewPort(rect(0, 0, gld->sfc_w, gld->sfc_h)); + // set ambient light smgr->setAmbientLight (video::SColorf(0x00c0c0c0)); @@ -202,6 +207,7 @@ EAPI void drawIrr_start(GLData *gld) call everything is presented on the screen. */ driver->beginScene(true, true, SColor(255, 100, 101, 140), videoData, NULL); // This does the context change, then clearBuffers() + smgr->drawAll(); } } -- cgit v1.1