summaryrefslogtreecommitdiff
path: root/src/resources/openglimagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-25 17:50:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-25 17:50:46 +0300
commit8e6ab562dd62383d191806e88548e89b4d0a9d65 (patch)
tree36fa576cdb6ff9aa950ec04165eab095f794f385 /src/resources/openglimagehelper.cpp
parente195e09e86d18c45676431813f98c56d85cc8201 (diff)
downloadmanaplus-8e6ab562dd62383d191806e88548e89b4d0a9d65.tar.gz
manaplus-8e6ab562dd62383d191806e88548e89b4d0a9d65.tar.bz2
manaplus-8e6ab562dd62383d191806e88548e89b4d0a9d65.tar.xz
manaplus-8e6ab562dd62383d191806e88548e89b4d0a9d65.zip
Add support for simple texture size detection.
This test check from 1024 to max texture size reported by driver.
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r--src/resources/openglimagehelper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index 7c4e08501..7421dc852 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -133,7 +133,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
return nullptr;
// Flush current error flag.
- glGetError();
+ graphicsManager.getLastError();
if (!width)
width = tmpImage->w;
@@ -273,7 +273,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
if (oldImage)
MSDL_FreeSurface(tmpImage);
- GLenum error = glGetError();
+ GLenum error = graphicsManager.getLastError();
if (error)
{
std::string errmsg = GraphicsManager::errorToString(error);