mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-17 11:38:49 +00:00
Added support for SDL_PIXELFORMAT_ABGR8888 textures
This is the output format of stb_image for image decoding, so let's avoid a texture format conversion where possible. Also standardized SDL_PIXELFORMAT_ARGB8888 as the default texture format for all renderers.
This commit is contained in:
parent
5ccee77190
commit
3cfa476d3f
5 changed files with 39 additions and 3 deletions
|
|
@ -1242,10 +1242,10 @@ static bool GPU_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_P
|
|||
|
||||
SDL_SetGPUAllowedFramesInFlight(data->device, 1);
|
||||
|
||||
SDL_AddSupportedTextureFormat(renderer, SDL_PIXELFORMAT_RGBA32);
|
||||
SDL_AddSupportedTextureFormat(renderer, SDL_PIXELFORMAT_BGRA32);
|
||||
SDL_AddSupportedTextureFormat(renderer, SDL_PIXELFORMAT_RGBX32);
|
||||
SDL_AddSupportedTextureFormat(renderer, SDL_PIXELFORMAT_RGBA32);
|
||||
SDL_AddSupportedTextureFormat(renderer, SDL_PIXELFORMAT_BGRX32);
|
||||
SDL_AddSupportedTextureFormat(renderer, SDL_PIXELFORMAT_RGBX32);
|
||||
|
||||
SDL_SetNumberProperty(SDL_GetRendererProperties(renderer), SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER, 16384);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue