mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 01:38:27 +00:00
SDL_Renderer simplifications:
- Factorize PrepQueueCmdDraw{,DrawTexture,Solid) into one single function - Change SDL_Texture/Renderer r,g,b,a Uint8 into an SDL_Color, so that it can be passed directly to RenderGeometry - Don't automatically queue a SET_DRAW_COLOR cmd for RenderGeometry (and update GLES2 renderer)
This commit is contained in:
parent
23e252bfc5
commit
502e9c3b45
4 changed files with 70 additions and 106 deletions
|
@ -117,9 +117,8 @@ SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
|||
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_SetSurfaceColorMod(texture->driverdata, texture->color.r, texture->color.g, texture->color.b);
|
||||
SDL_SetSurfaceAlphaMod(texture->driverdata, texture->color.a);
|
||||
SDL_SetSurfaceBlendMode(texture->driverdata, texture->blendMode);
|
||||
|
||||
/* Only RLE encode textures without an alpha channel since the RLE coder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue