Files
Gryphn-Utils/utils/gryphn_color.h
Greg Wells 2483e32a9a clear value
2025-06-06 20:23:50 -04:00

44 lines
794 B
C

#pragma once
typedef struct gnColor {
union {
struct {
int r, g, b;
float a;
};
struct {
int red, green, blue;
float alpha;
};
};
#ifdef GN_UTILS_CPP
gnColor(int red, int green, int blue, float alpha = 1.0) {
this->red = red;
this->green = green;
this->blue = blue;
this->alpha = alpha;
}
gnColor(int color, float alpha = 1.0) {
this->red = color;
this->green = color;
this->blue = color;
this->alpha = alpha;
}
#endif
} gnColor;
typedef struct gnClearValue {
union {
struct {
float r, g, b, a;
};
struct {
float red, green, blue, alpha;
};
};
} gnClearValue;