summaryrefslogtreecommitdiff
path: root/src/resources/openglimagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-10 01:28:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-10 01:33:59 +0300
commit93a30ec5dd65df6f91e028e68f18d6a7965240da (patch)
treef2a7908d565dd1e6f856e8c058fbc40f50dbb1cb /src/resources/openglimagehelper.cpp
parent07daba6efa05a59271ce4173a2b500b27773e523 (diff)
downloadplus-93a30ec5dd65df6f91e028e68f18d6a7965240da.tar.gz
plus-93a30ec5dd65df6f91e028e68f18d6a7965240da.tar.bz2
plus-93a30ec5dd65df6f91e028e68f18d6a7965240da.tar.xz
plus-93a30ec5dd65df6f91e028e68f18d6a7965240da.zip
Add support for mobileopengl2 backend (still copy from modern opengl).
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r--src/resources/openglimagehelper.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index bf051fc0c..b1ddc185e 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -29,6 +29,7 @@
#include "render/mgl.h"
#include "render/mglcheck.h"
+#include "render/mobileopengl2graphics.h"
#include "render/mobileopenglgraphics.h"
#include "render/modernopenglgraphics.h"
#include "render/normalopenglgraphics.h"
@@ -266,6 +267,9 @@ void OpenGLImageHelper::bindTexture(const GLuint texture)
case RENDER_GLES_OPENGL:
MobileOpenGLGraphics::bindTexture(mTextureType, texture);
break;
+ case RENDER_GLES2_OPENGL:
+ MobileOpenGL2Graphics::bindTexture(mTextureType, texture);
+ break;
case RENDER_SOFTWARE:
case RENDER_SDL2_DEFAULT:
case RENDER_NULL:
@@ -305,8 +309,11 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
if (SDL_MUSTLOCK(tmpImage))
SDL_LockSurface(tmpImage);
- if (mUseOpenGL != RENDER_MODERN_OPENGL && mUseOpenGL != RENDER_GLES_OPENGL)
+ if (mUseOpenGL != RENDER_MODERN_OPENGL &&
+ mUseOpenGL != RENDER_GLES_OPENGL)
+ {
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+ }
if (!mUseTextureSampler)
{