mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-01 17:37:39 +00:00
Textures with alpha format default to SDL_BLENDMODE_BLEND
Fixes https://github.com/libsdl-org/SDL/issues/9941
This commit is contained in:
parent
2db57e2678
commit
7c0307060d
3 changed files with 9 additions and 0 deletions
|
@ -401,6 +401,12 @@ static void testBlendModeOperation(TestRenderOperation op, int mode, SDL_PixelFo
|
|||
if (dst == NULL) {
|
||||
return;
|
||||
}
|
||||
if (SDL_ISPIXELFORMAT_ALPHA(dst_format)) {
|
||||
SDL_BlendMode blendMode = SDL_BLENDMODE_NONE;
|
||||
ret = SDL_GetTextureBlendMode(dst, &blendMode);
|
||||
SDLTest_AssertCheck(ret == 0, "Verify result from SDL_GetTextureBlendMode(), expected: 0, got: %i", ret);
|
||||
SDLTest_AssertCheck(blendMode == SDL_BLENDMODE_BLEND, "Verify alpha texture blend mode, expected %d, got %" SDL_PRIu32, SDL_BLENDMODE_BLEND, blendMode);
|
||||
}
|
||||
|
||||
/* Set as render target */
|
||||
SDL_SetRenderTarget(renderer, dst);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue