From 410dd6c3d845cc0e19fd678090d95669bdeb5885 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 8 Jun 2014 01:04:33 +0300 Subject: Add Modern OpenGL render type. Now it using normal OpenGL renderer. --- src/resources/image.cpp | 6 ++++-- src/resources/map/map.cpp | 7 +++++-- src/resources/openglimagehelper.cpp | 2 ++ 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/resources') diff --git a/src/resources/image.cpp b/src/resources/image.cpp index d2a1eb2dd..d9d2a8a01 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -439,8 +439,10 @@ Image *Image::getSubImage(const int x, const int y, // Create a new clipped sub-image #ifdef USE_OPENGL const RenderType mode = OpenGLImageHelper::mUseOpenGL; - if (mode == RENDER_NORMAL_OPENGL || mode == RENDER_SAFE_OPENGL - || mode == RENDER_GLES_OPENGL) + if (mode == RENDER_NORMAL_OPENGL + || mode == RENDER_SAFE_OPENGL + || mode == RENDER_GLES_OPENGL + || mode == RENDER_MODERN_OPENGL) { return new SubImage(this, mGLImage, x, y, width, height, mTexWidth, mTexHeight); diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 7ba798319..279262124 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -352,7 +352,9 @@ void Map::draw(Graphics *const graphics, int scrollX, int scrollY) #ifdef USE_OPENGL int updateFlag = 0; - if (mOpenGL == RENDER_NORMAL_OPENGL || mOpenGL == RENDER_GLES_OPENGL) + if (mOpenGL == RENDER_NORMAL_OPENGL + || mOpenGL == RENDER_GLES_OPENGL + || mOpenGL == RENDER_MODERN_OPENGL) { if (mLastX != startX || mLastY != startY || mLastScrollX != scrollX || mLastScrollY != scrollY) @@ -411,7 +413,8 @@ void Map::draw(Graphics *const graphics, int scrollX, int scrollY) { #ifdef USE_OPENGL if (mOpenGL == RENDER_NORMAL_OPENGL - || mOpenGL == RENDER_GLES_OPENGL) + || mOpenGL == RENDER_GLES_OPENGL + || mOpenGL == RENDER_MODERN_OPENGL) { if (updateFlag) { diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 6d25aa952..ca5f6410a 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -202,6 +202,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage, { #ifndef ANDROID case RENDER_NORMAL_OPENGL: + case RENDER_MODERN_OPENGL: NormalOpenGLGraphics::bindTexture(mTextureType, texture); break; case RENDER_SAFE_OPENGL: @@ -210,6 +211,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage, #else case RENDER_NORMAL_OPENGL: case RENDER_SAFE_OPENGL: + case RENDER_MODERN_OPENGL: #endif case RENDER_GLES_OPENGL: MobileOpenGLGraphics::bindTexture(mTextureType, texture); -- cgit v1.2.3-70-g09d2