Thanks. I mean in hindsight, I agree because I used the stuff I engineered for. :) Edit: As far as directx, that's true, except for the format used for the last mile native draw surface. the alpha channel is not used in that situation. I actually do use variadic templates to do my template definitions. (background docs if you're interested: https://honeythecodewitch.com/gfx/wiki/pixels.md[^]) Each pixel has one or more channel_traits that are fed into it using variadic templates. Like so:
// creates an RGB pixel by making each channel
// one third of the whole. Any remainder bits
// are added to the green channel
template
using rgb_pixel = pixel<
channel_traits,
channel_traits,
channel_traits
;
// creates an RGBA pixel by making each channel
// one quarter of the whole. Any remainder bits
// are added to the green channel
template
using rgba_pixel = pixel<
channel_traits,
channel_traits,
channel_traits,
channel_traits
;
// creates a grayscale or monochome pixel
template
using gsc_pixel = pixel<
channel_traits
;
// creates a Y'UV pixel by making each channel
// one third of the whole. Any remainder bits
// are added to the Y' channel
template
using yuv_pixel = pixel<
channel_traits,
channel_traits,
channel_traits
;
// creates a Y'UV/A pixel by making each
// channel 1/4 of the whole. Remaining bits
// are added to Y'
template
using yuva_pixel = pixel<
channel_traits,
channel_traits,
channel_traits,
channel_traits
;
And here's the actual pixel class.
// represents the pixel base class
template
str