diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-05 00:27:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-05 00:27:08 +0300 |
commit | c0826c48402594d86f8f75db96b54c58ce00968d (patch) | |
tree | 8f1c95ac00b39c0006ffc4211ea1fdcab06ebaf7 | |
parent | b1eac7d3738dcff22a3b553459f1587c18a23c23 (diff) | |
download | mv-c0826c48402594d86f8f75db96b54c58ce00968d.tar.gz mv-c0826c48402594d86f8f75db96b54c58ce00968d.tar.bz2 mv-c0826c48402594d86f8f75db96b54c58ce00968d.tar.xz mv-c0826c48402594d86f8f75db96b54c58ce00968d.zip |
Fix OpenGL fast image load. Add also check for rmaks.
Remove debug code.
-rw-r--r-- | src/resources/image.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 9bb824ea1..0c4735043 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -762,8 +762,8 @@ Image *Image::_GLload(SDL_Surface *tmpImage) #endif SDL_Surface *oldImage = nullptr; - if (tmpImage->format->BitsPerPixel != 32 - || realWidth != width || realHeight != height) + if (tmpImage->format->BitsPerPixel != 32 || realWidth != width + || realHeight != height || rmask != tmpImage->format->Rmask) { oldImage = tmpImage; tmpImage = SDL_CreateRGBSurface(SDL_SWSURFACE, realWidth, realHeight, @@ -776,12 +776,6 @@ Image *Image::_GLload(SDL_Surface *tmpImage) } SDL_BlitSurface(oldImage, nullptr, tmpImage, nullptr); } - else - { - static int cnt = 0; - cnt ++; - logger->log("fast load: %d", cnt); - } GLuint texture; glGenTextures(1, &texture); |