SDL_ISPIXELFORMAT_ALPHA3
A macro to determine if an sdl_pixelformat has an alpha channel.
Usage
#include "SDL3/SDL.h"
#define SDL_ISPIXELFORMAT_ALPHA(format) .BI ((SDL_ISPIXELFORMAT_PACKED(format)&&.BI ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || .BI (SDL_PIXELORDER(format)==SDL_PACKEDORDER_RGBA)||.BI (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || .BI (SDL_PIXELORDER(format)==SDL_PACKEDORDER_BGRA)))||.BI (SDL_ISPIXELFORMAT_ARRAY(format) && .BI ((SDL_PIXELORDER(format)==SDL_ARRAYORDER_ARGB)||.BI (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || .BI (SDL_PIXELORDER(format)==SDL_ARRAYORDER_ABGR)||.BI (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))
Header file
Defined in SDL3/SDL_pixels.h
Overview
Note that this macro double-evaluates its parameter, so do not use expressions with side-effects here.
Return value
Returns true if the format has alpha, false otherwise.
Thread safety
It is safe to call this macro from any thread.