mirror of https://github.com/ocornut/imgui.git
Browse Source
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.pull/4995/head
Clownacy
3 years ago
committed by
ocornut
2 changed files with 2 additions and 1 deletions
Loading…
Reference in new issue