fix color format

This commit is contained in:
Greg Wells
2025-05-14 06:00:50 -04:00
parent 92ef68938a
commit d7596d315d

View File

@@ -1,8 +1,6 @@
#include "../math/gryphn_vec4.h" #include "../math/gryphn_vec4.h"
#ifdef GN_UTILS_CPP typedef struct gnColor {
struct gnColor {
public:
union { union {
struct { struct {
int r, g, b; int r, g, b;
@@ -14,7 +12,8 @@ public:
float alpha; float alpha;
}; };
}; };
public:
#ifdef GN_UTILS_CPP
gnColor(int red, int green, int blue, float alpha = 1.0) { gnColor(int red, int green, int blue, float alpha = 1.0) {
this->red = red; this->red = red;
this->green = green; this->green = green;
@@ -28,19 +27,5 @@ public:
this->blue = color; this->blue = color;
this->alpha = alpha; this->alpha = alpha;
} }
};
#else
typedef struct gnColor {
union {
struct {
int r, g, b;
float a;
};
struct {
int red, green, blue;
float alpha;
};
};
} gnColor;
#endif #endif
} gnColor;