mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-15 19:05:32 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user