comparison 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
comparison
equal deleted inserted replaced
3052:b7197d7e8566 3053:aa34d1180d30
378 } 378 }
379 379
380 texture->driverdata = 380 texture->driverdata =
381 SDL_CreateRGBSurface(0, texture->w, texture->h, bpp, Rmask, Gmask, 381 SDL_CreateRGBSurface(0, texture->w, texture->h, bpp, Rmask, Gmask,
382 Bmask, Amask); 382 Bmask, Amask);
383 SDL_SetSurfaceColorMod(texture->driverdata, texture->r, texture->g,
384 texture->b);
385 SDL_SetSurfaceAlphaMod(texture->driverdata, texture->a);
386 SDL_SetSurfaceBlendMode(texture->driverdata, texture->blendMode);
387 SDL_SetSurfaceScaleMode(texture->driverdata, texture->scaleMode);
388
383 if (texture->access == SDL_TEXTUREACCESS_STATIC) { 389 if (texture->access == SDL_TEXTUREACCESS_STATIC) {
384 SDL_SetSurfaceRLE(texture->driverdata, 1); 390 SDL_SetSurfaceRLE(texture->driverdata, 1);
385 } 391 }
386 } 392 }
387 393