From 8e6ab562dd62383d191806e88548e89b4d0a9d65 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 25 May 2014 17:50:46 +0300 Subject: Add support for simple texture size detection. This test check from 1024 to max texture size reported by driver. --- src/graphicsmanager.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/graphicsmanager.h') 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; -- cgit v1.2.3-70-g09d2