summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-05 00:27:08 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-05 00:27:08 +0300
commitc0826c48402594d86f8f75db96b54c58ce00968d (patch)
tree8f1c95ac00b39c0006ffc4211ea1fdcab06ebaf7 /src
parentb1eac7d3738dcff22a3b553459f1587c18a23c23 (diff)
downloadmanaverse-c0826c48402594d86f8f75db96b54c58ce00968d.tar.gz
manaverse-c0826c48402594d86f8f75db96b54c58ce00968d.tar.bz2
manaverse-c0826c48402594d86f8f75db96b54c58ce00968d.tar.xz
manaverse-c0826c48402594d86f8f75db96b54c58ce00968d.zip
Fix OpenGL fast image load. Add also check for rmaks.
Remove debug code.
Diffstat (limited to 'src')
-rw-r--r--src/resources/image.cpp10
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);