44 lines
794 B
C
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;
|