summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/render/mgl.hpp4
-rw-r--r--src/render/mobileopengl2graphics.cpp6
-rw-r--r--src/render/mobileopenglgraphics.cpp6
-rw-r--r--src/render/modernopenglgraphics.cpp6
4 files changed, 13 insertions, 9 deletions
diff --git a/src/render/mgl.hpp b/src/render/mgl.hpp
index 68ffe4ad6..edf3882cf 100644
--- a/src/render/mgl.hpp
+++ b/src/render/mgl.hpp
@@ -101,6 +101,10 @@ defName(glActiveTexture);
glTexImage2D(__VA_ARGS__)
#define mglGenTextures(...) \
glGenTextures(__VA_ARGS__)
+#define mglPixelStorei(...) \
+ glPixelStorei(__VA_ARGS__)
+#define mglReadPixels(...) \
+ glReadPixels(__VA_ARGS__)
#endif
defName(glGetAttribLocation);
diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp
index 8fdb43655..979d17224 100644
--- a/src/render/mobileopengl2graphics.cpp
+++ b/src/render/mobileopengl2graphics.cpp
@@ -887,8 +887,8 @@ SDL_Surface* MobileOpenGL2Graphics::getScreenshot()
// Grap the pixel buffer and write it to the SDL surface
mglGetIntegerv(GL_PACK_ALIGNMENT, &pack);
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, screenshot->pixels);
+ mglPixelStorei(GL_PACK_ALIGNMENT, 1);
+ mglReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, screenshot->pixels);
// Flip the screenshot, as OpenGL has 0,0 in bottom left
const int h2 = h / 2;
@@ -909,7 +909,7 @@ SDL_Surface* MobileOpenGL2Graphics::getScreenshot()
if (config.getBoolValue("usefbo"))
graphicsManager.deleteFBO(&mFbo);
- glPixelStorei(GL_PACK_ALIGNMENT, pack);
+ mglPixelStorei(GL_PACK_ALIGNMENT, pack);
if (SDL_MUSTLOCK(screenshot))
SDL_UnlockSurface(screenshot);
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index 4eecfa232..0b3d4e4dc 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -965,8 +965,8 @@ SDL_Surface* MobileOpenGLGraphics::getScreenshot()
// Grap the pixel buffer and write it to the SDL surface
mglGetIntegerv(GL_PACK_ALIGNMENT, &pack);
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, screenshot->pixels);
+ mglPixelStorei(GL_PACK_ALIGNMENT, 1);
+ mglReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, screenshot->pixels);
// Flip the screenshot, as OpenGL has 0,0 in bottom left
const int h2 = h / 2;
@@ -987,7 +987,7 @@ SDL_Surface* MobileOpenGLGraphics::getScreenshot()
if (config.getBoolValue("usefbo"))
graphicsManager.deleteFBO(&mFbo);
- glPixelStorei(GL_PACK_ALIGNMENT, pack);
+ mglPixelStorei(GL_PACK_ALIGNMENT, pack);
if (SDL_MUSTLOCK(screenshot))
SDL_UnlockSurface(screenshot);
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index 2c7ecf120..fc59a7413 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -876,8 +876,8 @@ SDL_Surface* ModernOpenGLGraphics::getScreenshot()
// Grap the pixel buffer and write it to the SDL surface
mglGetIntegerv(GL_PACK_ALIGNMENT, &pack);
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, screenshot->pixels);
+ mglPixelStorei(GL_PACK_ALIGNMENT, 1);
+ mglReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, screenshot->pixels);
// Flip the screenshot, as OpenGL has 0,0 in bottom left
const int h2 = h / 2;
@@ -898,7 +898,7 @@ SDL_Surface* ModernOpenGLGraphics::getScreenshot()
if (config.getBoolValue("usefbo"))
graphicsManager.deleteFBO(&mFbo);
- glPixelStorei(GL_PACK_ALIGNMENT, pack);
+ mglPixelStorei(GL_PACK_ALIGNMENT, pack);
if (SDL_MUSTLOCK(screenshot))
SDL_UnlockSurface(screenshot);