summaryrefslogtreecommitdiff
path: root/src/render/mobileopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-04-25 16:55:35 +0300
committerAndrei Karas <akaras@inbox.ru>2017-04-25 16:55:35 +0300
commit4821f538a888370eb80ec28f9bab269a4427a63c (patch)
tree8e78fcb52df8b10cdd4cd2ed3859ad29c4c4c711 /src/render/mobileopenglgraphics.cpp
parent51b81830c032fe255254a269b85679a89aa3728d (diff)
downloadplus-4821f538a888370eb80ec28f9bab269a4427a63c.tar.gz
plus-4821f538a888370eb80ec28f9bab269a4427a63c.tar.bz2
plus-4821f538a888370eb80ec28f9bab269a4427a63c.tar.xz
plus-4821f538a888370eb80ec28f9bab269a4427a63c.zip
Report into log OpenGL errors if enabled configure option --enable-openglerrors.
Diffstat (limited to 'src/render/mobileopenglgraphics.cpp')
-rw-r--r--src/render/mobileopenglgraphics.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index c5faad5c9..2194405a5 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -207,6 +207,9 @@ static inline void drawQuad(const Image *restrict const image,
MobileOpenGLGraphics::mDrawCalls ++;
#endif // DEBUG_DRAW_CALLS
mglDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+#ifdef OPENGLERRORS
+ graphicsManager.logError();
+#endif // OPENGLERRORS
}
}
@@ -260,6 +263,9 @@ static inline void drawRescaledQuad(const Image *restrict const image,
MobileOpenGLGraphics::mDrawCalls ++;
#endif // DEBUG_DRAW_CALLS
mglDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+#ifdef OPENGLERRORS
+ graphicsManager.logError();
+#endif // OPENGLERRORS
}
}
@@ -1120,6 +1126,9 @@ void MobileOpenGLGraphics::drawRectangle(const Rect &restrict rect,
#endif // DEBUG_DRAW_CALLS
mglDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+#ifdef OPENGLERRORS
+ graphicsManager.logError();
+#endif // OPENGLERRORS
}
else
{
@@ -1137,6 +1146,9 @@ void MobileOpenGLGraphics::drawRectangle(const Rect &restrict rect,
#endif // DEBUG_DRAW_CALLS
mglDrawArrays(GL_LINE_LOOP, 0, 4);
+#ifdef OPENGLERRORS
+ graphicsManager.logError();
+#endif // OPENGLERRORS
}
BLOCK_END("Graphics::drawRectangle")
}
@@ -1214,6 +1226,9 @@ inline void MobileOpenGLGraphics::drawTriangleArrayfs(const int size) restrict2
#endif // DEBUG_DRAW_CALLS
mglDrawArrays(GL_TRIANGLES, 0, size / 2);
+#ifdef OPENGLERRORS
+ graphicsManager.logError();
+#endif // OPENGLERRORS
}
inline void MobileOpenGLGraphics::drawTriangleArrayfsCached(const int size)
@@ -1227,6 +1242,9 @@ inline void MobileOpenGLGraphics::drawTriangleArrayfsCached(const int size)
#endif // DEBUG_DRAW_CALLS
mglDrawArrays(GL_TRIANGLES, 0, size / 2);
+#ifdef OPENGLERRORS
+ graphicsManager.logError();
+#endif // OPENGLERRORS
}
inline void MobileOpenGLGraphics::drawTriangleArrayfs(const GLshort *restrict
@@ -1243,6 +1261,9 @@ inline void MobileOpenGLGraphics::drawTriangleArrayfs(const GLshort *restrict
#endif // DEBUG_DRAW_CALLS
mglDrawArrays(GL_TRIANGLES, 0, size / 2);
+#ifdef OPENGLERRORS
+ graphicsManager.logError();
+#endif // OPENGLERRORS
}
inline void MobileOpenGLGraphics::drawLineArrays(const int size) restrict2
@@ -1254,6 +1275,9 @@ inline void MobileOpenGLGraphics::drawLineArrays(const int size) restrict2
#endif // DEBUG_DRAW_CALLS
mglDrawArrays(GL_LINES, 0, size / 2);
+#ifdef OPENGLERRORS
+ graphicsManager.logError();
+#endif // OPENGLERRORS
}
void MobileOpenGLGraphics::dumpSettings()