summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphicsmanager.h')
-rw-r--r--src/graphicsmanager.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index 8e5aba51f..ff70e7634 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -148,7 +148,7 @@ class GraphicsManager final
bool isUseTextureSampler() const A_WARN_UNUSED
{ return mUseTextureSampler; }
- static GLenum getLastError() A_WARN_UNUSED;
+ static GLenum getLastError();
static std::string errorToString(const GLenum error) A_WARN_UNUSED;
@@ -156,6 +156,12 @@ class GraphicsManager final
std::string getGLVersion() const
{ return mGlVersionString; }
+
+ GLenum getLastErrorCached() const
+ { return mLastError; }
+
+ void resetCachedError()
+ { mLastError = GL_NO_ERROR; }
#endif
private:
@@ -169,6 +175,10 @@ class GraphicsManager final
std::string mGlRenderer;
+#ifdef USE_OPENGL
+ static GLenum mLastError;
+#endif
+
int mMinor;
int mMajor;