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:
Sylvain 2021-10-24 17:16:49 +02:00 committed by Ryan C. Gordon
parent 23e252bfc5
commit 502e9c3b45
4 changed files with 70 additions and 106 deletions

View file

@ -43,7 +43,7 @@ struct SDL_Texture
int modMode; /**< The texture modulation mode */
SDL_BlendMode blendMode; /**< The texture blend mode */
SDL_ScaleMode scaleMode; /**< The texture scale mode */
Uint8 r, g, b, a; /**< Texture modulation values */
SDL_Color color; /**< Texture modulation values */
SDL_Renderer *renderer;
@ -216,7 +216,7 @@ struct SDL_Renderer
SDL_Texture *target;
SDL_mutex *target_mutex;
Uint8 r, g, b, a; /**< Color for drawing operations values */
SDL_Color color; /**< Color for drawing operations values */
SDL_BlendMode blendMode; /**< The drawing blend mode */
SDL_bool always_batch;