Skip to content

Commit

Permalink
Change SDL_BLENDMODE_MUL for gl renderers
Browse files Browse the repository at this point in the history
 Add FIXME for PSP and DirectFB
  • Loading branch information
1bsyl committed Mar 16, 2023
1 parent c078dfc commit 23bce27
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/SDL_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ this should probably be removed at some point in the future. --ryan. */

#define SDL_BLENDMODE_MUL_FULL \
SDL_COMPOSE_BLENDMODE(SDL_BLENDFACTOR_DST_COLOR, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD, \
SDL_BLENDFACTOR_DST_ALPHA, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD)
SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_ADD)

#if !SDL_RENDER_DISABLED
static const SDL_RenderDriver *render_drivers[] = {
Expand Down
1 change: 1 addition & 0 deletions src/render/psp/SDL_render_psp.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ static void PSP_SetBlendState(PSP_RenderData *data, PSP_BlendState *state)
break;
case SDL_BLENDMODE_MUL:
sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
/* FIXME SDL_BLENDMODE_MUL is simplified, and dstA is in fact un-changed.*/
sceGuBlendFunc(GU_ADD, GU_DST_COLOR, GU_ONE_MINUS_SRC_ALPHA, 0, 0);
sceGuEnable(GU_BLEND);
break;
Expand Down
1 change: 1 addition & 0 deletions src/video/directfb/SDL_DirectFB_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ SetBlendMode(DirectFB_RenderData * data, int blendMode,
case SDL_BLENDMODE_MUL:
data->blitFlags = DSBLIT_BLEND_ALPHACHANNEL;
data->drawFlags = DSDRAW_BLEND;
/* FIXME SDL_BLENDMODE_MUL is simplified, and dstA is in fact un-changed.*/
SDL_DFB_CHECK(destsurf->SetSrcBlendFunction(destsurf, DSBF_DESTCOLOR));
SDL_DFB_CHECK(destsurf->SetDstBlendFunction(destsurf, DSBF_INVSRCALPHA));

Expand Down

0 comments on commit 23bce27

Please sign in to comment.