mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Allow formats with alpha channels for window textures
Because the blend mode is explicitly set to SDL_BLENDMODE_NONE, it doesn't matter if there's a transparency channel in the texture format or not for opaque windows. This ensures that a 32-bit format is used with Metal instead of SDL_PIXELFORMAT_RGB565.
(cherry picked from commit b1f390255a)
This commit is contained in:
parent
a7482a1acb
commit
17cf746550
1 changed files with 1 additions and 1 deletions
|
|
@ -422,7 +422,7 @@ static bool SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window *window,
|
|||
!SDL_ISPIXELFORMAT_10BIT(texture_format) &&
|
||||
!SDL_ISPIXELFORMAT_FLOAT(texture_format) &&
|
||||
!SDL_ISPIXELFORMAT_INDEXED(texture_format) &&
|
||||
transparent == SDL_ISPIXELFORMAT_ALPHA(texture_format)) {
|
||||
(!transparent || SDL_ISPIXELFORMAT_ALPHA(texture_format))) {
|
||||
*format = texture_format;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue