diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-23 12:06:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:16 +0300 |
commit | 640fc369b474e395975e82471a1e4be291d23407 (patch) | |
tree | 877823a1caf7ac5803a8ee3512fd4038af50395b /src/resources | |
parent | d80453b5cbf958084a21e624b1dcd2798f19659a (diff) | |
download | manaplus-640fc369b474e395975e82471a1e4be291d23407.tar.gz manaplus-640fc369b474e395975e82471a1e4be291d23407.tar.bz2 manaplus-640fc369b474e395975e82471a1e4be291d23407.tar.xz manaplus-640fc369b474e395975e82471a1e4be291d23407.zip |
fix images converting and drawing issues in SDL2 and OpenGL.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/openglimagehelper.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 6aed74113..67af6655f 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -152,7 +152,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage, } #ifdef USE_SDL2 - SDL_SetSurfaceAlphaMod(tmpImage, 255); + SDL_SetSurfaceAlphaMod(tmpImage, SDL_ALPHA_OPAQUE); #else // Make sure the alpha channel is not used, but copied to destination SDL_SetAlpha(tmpImage, 0, SDL_ALPHA_OPAQUE); @@ -180,6 +180,9 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage, || amask != tmpImage->format->Amask) { oldImage = tmpImage; +#ifdef USE_SDL2 + SDL_SetSurfaceBlendMode (oldImage, SDL_BLENDMODE_NONE); +#endif tmpImage = SDL_CreateRGBSurface(SDL_SWSURFACE, realWidth, realHeight, 32, rmask, gmask, bmask, amask); |