From c56e6cafebb6a5e017bf5221d9ff61f57b8c1dc9 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Wed, 26 Feb 2014 00:43:18 -0800 Subject: [PATCH] EGL context fix, minor Tizen cleanup --- project/include/platform/tizen/TizenApplication.h | 5 ----- project/include/renderer/opengl/OGL.h | 4 ++-- project/src/platform/tizen/TizenApplication.cpp | 7 ------- project/src/renderer/opengl/Egl.cpp | 2 +- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/project/include/platform/tizen/TizenApplication.h b/project/include/platform/tizen/TizenApplication.h index dd5c46071..f4670d7ad 100644 --- a/project/include/platform/tizen/TizenApplication.h +++ b/project/include/platform/tizen/TizenApplication.h @@ -10,7 +10,6 @@ #include #include #include -#include //#include @@ -52,10 +51,6 @@ namespace lime { void Cleanup (void); - Tizen::Graphics::Opengl::EGLDisplay mEGLDisplay; - Tizen::Graphics::Opengl::EGLSurface mEGLSurface; - Tizen::Graphics::Opengl::EGLConfig mEGLConfig; - Tizen::Graphics::Opengl::EGLContext mEGLContext; Tizen::Ui::Controls::Form* mForm; //Tizen::Uix::Sensor::SensorManager* mSensorManager; Tizen::Base::Runtime::Timer* mTimer; diff --git a/project/include/renderer/opengl/OGL.h b/project/include/renderer/opengl/OGL.h index 187a644ea..20ea3f82d 100644 --- a/project/include/renderer/opengl/OGL.h +++ b/project/include/renderer/opengl/OGL.h @@ -23,9 +23,9 @@ //#include //#include -#include +#include -using namespace Tizen::Graphics::Opengl; +//using namespace Tizen::Graphics::Opengl; //#include #define ALLOW_OGL2 diff --git a/project/src/platform/tizen/TizenApplication.cpp b/project/src/platform/tizen/TizenApplication.cpp index 3cbb482ed..201589fe5 100644 --- a/project/src/platform/tizen/TizenApplication.cpp +++ b/project/src/platform/tizen/TizenApplication.cpp @@ -1,9 +1,6 @@ #include "platform/tizen/TizenApplication.h" -using namespace Tizen::Graphics::Opengl; - - namespace lime { @@ -69,10 +66,6 @@ namespace lime { //mAccelX = 0; //mAccelY = 0; //mAccelZ = 0; - mEGLDisplay = EGL_NO_DISPLAY; - mEGLSurface = EGL_NO_SURFACE; - mEGLConfig = null; - mEGLContext = EGL_NO_CONTEXT; mForm = null; mTimer = null; diff --git a/project/src/renderer/opengl/Egl.cpp b/project/src/renderer/opengl/Egl.cpp index 29dbb154c..63682f0de 100644 --- a/project/src/renderer/opengl/Egl.cpp +++ b/project/src/renderer/opengl/Egl.cpp @@ -130,7 +130,7 @@ bool limeEGLResize(void *inWindow, int &ioWidth, int &ioHeight) // Use GLES version 1.x EGLint contextParams[] = {EGL_CONTEXT_CLIENT_VERSION, g_eglVersion, EGL_NONE}; - g_eglContext = eglCreateContext(g_eglDisplay, g_eglConfig, NULL, NULL); + g_eglContext = eglCreateContext(g_eglDisplay, g_eglConfig, EGL_NO_CONTEXT, contextParams); if (g_eglContext == EGL_NO_CONTEXT) { printf("Unable to create GLES context!\n");