From c0826c48402594d86f8f75db96b54c58ce00968d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 5 Jun 2012 00:27:08 +0300 Subject: Fix OpenGL fast image load. Add also check for rmaks. Remove debug code. --- src/resources/image.cpp | 10 ++-------- 1 file 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); -- cgit v1.2.3-60-g2f50