summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/render/mgl.hpp6
-rw-r--r--src/resources/openglimagehelper.cpp14
2 files changed, 13 insertions, 7 deletions
diff --git a/src/render/mgl.hpp b/src/render/mgl.hpp
index 7da8ebabb..68ffe4ad6 100644
--- a/src/render/mgl.hpp
+++ b/src/render/mgl.hpp
@@ -95,6 +95,12 @@ defName(glActiveTexture);
glClear(__VA_ARGS__)
#define mglGetString(...) \
glGetString(__VA_ARGS__)
+#define mglTexParameteri(...) \
+ glTexParameteri(__VA_ARGS__)
+#define mglTexImage2D(...) \
+ glTexImage2D(__VA_ARGS__)
+#define mglGenTextures(...) \
+ glGenTextures(__VA_ARGS__)
#endif
defName(glGetAttribLocation);
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index 0d98fcfe7..ebb4f27a0 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -336,20 +336,20 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
{
if (mBlur)
{
- glTexParameteri(mTextureType, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(mTextureType, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ mglTexParameteri(mTextureType, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ mglTexParameteri(mTextureType, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
}
else
{
- glTexParameteri(mTextureType, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(mTextureType, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ mglTexParameteri(mTextureType, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ mglTexParameteri(mTextureType, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
}
}
#ifndef ANDROID
- glTexParameteri(mTextureType, GL_TEXTURE_MAX_LEVEL, 0);
+ mglTexParameteri(mTextureType, GL_TEXTURE_MAX_LEVEL, 0);
#endif
- glTexImage2D(mTextureType, 0, mInternalTextureType,
+ mglTexImage2D(mTextureType, 0, mInternalTextureType,
tmpImage->w, tmpImage->h,
0, GL_RGBA, GL_UNSIGNED_BYTE, tmpImage->pixels);
@@ -445,7 +445,7 @@ GLuint OpenGLImageHelper::getNewTexture()
void OpenGLImageHelper::postInit()
{
- glGenTextures(texturesSize, &mTextures[mFreeTextureIndex]);
+ mglGenTextures(texturesSize, &mTextures[mFreeTextureIndex]);
}
void OpenGLImageHelper::invalidate(const GLuint textureId)