3 ms·
> I didn't see anything at a cursory glance. > What format is the frame buffer in? It's a pointer to a screen-sized number of u32s. I'd hazard a guess that it
by deathanatos 4y ago
> I didn't see anything at a cursory glance.
> What format is the frame buffer in?
It's a pointer to a screen-sized number of u32s. I'd hazard a guess that it's either RGBA or ABGR, and if you render one and everything looks wrong, it's the other. (Where the A channel is unused, as it's a framebuffer.)
Certainly not fool-proof and vulnerable to endian swaps if you somehow ended up on a big endian device. But this is also a port-doom-to-my-toaster level thing?
- rzzzt 4y agoThe SDL code snippet on the last screenshot says SDL_PIXELFORMAT_RGB888, which is in XRGB order (not a 24-bit format, that would be RGB24).
- schemescape 4y agoQuick, open a PR to add this documentation ;)