From 640fc369b474e395975e82471a1e4be291d23407 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Aug 2013 12:06:41 +0300 Subject: fix images converting and drawing issues in SDL2 and OpenGL. --- src/resources/openglimagehelper.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/resources') 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); -- cgit v1.2.3-70-g09d2