mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
Backends: SDL_Renderer: Fix texture atlas format on big-endian hardware (#4927)
SDL_PIXELFORMAT_RGBA32 is intended for byte arrays where the channels are specifically in the RGBA order. However, this is not what GetTexDataAsRGBA32 does: rather, it constructs an array where each pixel is an unsigned int in ABGR order. On little-endian platforms, this does indeed result in an RGBA byte order, however, on big-endian platforms, this results in an ABGR byte order, which does not match the PIXELFORMAT enum. What should be used is the SDL_PIXELFORMAT_ABGR8888 enum, which specifies that the pixels are in native-endian ABGR, which they are.
This commit is contained in:
@ -160,6 +160,7 @@ Other Changes:
|
||||
- Backends: Metal: Ignore ImDrawCmd where ElemCount == 0, which are normally not emitted by the library but
|
||||
can theorically be created by user code manipulating a ImDrawList. (#4857)
|
||||
- Backends: Vulkan: Added support for ImTextureID as VkDescriptorSet, add ImGui_ImplVulkan_AddTexture(). (#914) [@martty]
|
||||
- Backends: SDL_Renderer: Fix texture atlas format on big-endian hardware (#4927) [@Clownacy]
|
||||
- Backends: WebGPU: Fixed incorrect size parameters in wgpuRenderPassEncoderSetIndexBuffer() and
|
||||
wgpuRenderPassEncoderSetVertexBuffer() calls. (#4891) [@FeepsDev]
|
||||
|
||||
|
Reference in New Issue
Block a user