Mercurial > sdl-ios-xcode
diff src/video/SDL_renderer_sw.c @ 3053:aa34d1180d30
When creating a software texture, synchronize the surface with the texture.
When creating a texture from a surface, synchronize the texture with the surface.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 30 Jan 2009 06:40:16 +0000 |
parents | 2133d2d300fd |
children | 36cf454ba065 |
line wrap: on
line diff
--- a/src/video/SDL_renderer_sw.c Fri Jan 30 06:38:44 2009 +0000 +++ b/src/video/SDL_renderer_sw.c Fri Jan 30 06:40:16 2009 +0000 @@ -380,6 +380,12 @@ texture->driverdata = SDL_CreateRGBSurface(0, texture->w, texture->h, bpp, Rmask, Gmask, Bmask, Amask); + SDL_SetSurfaceColorMod(texture->driverdata, texture->r, texture->g, + texture->b); + SDL_SetSurfaceAlphaMod(texture->driverdata, texture->a); + SDL_SetSurfaceBlendMode(texture->driverdata, texture->blendMode); + SDL_SetSurfaceScaleMode(texture->driverdata, texture->scaleMode); + if (texture->access == SDL_TEXTUREACCESS_STATIC) { SDL_SetSurfaceRLE(texture->driverdata, 1); }