summaryrefslogtreecommitdiff
path: root/lib/glcolor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/glcolor.cc')
-rw-r--r--lib/glcolor.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/glcolor.cc b/lib/glcolor.cc
new file mode 100644
index 0000000..23ade75
--- /dev/null
+++ b/lib/glcolor.cc
@@ -0,0 +1,13 @@
+#include <SDL_opengl.h>
+#include "glcolor.h"
+
+mogltk::ColorP::ColorP(const Color & ac) : c(ac) {
+}
+
+mogltk::ColorP::ColorP(Uint8 ar, Uint8 ag, Uint8 ab, Uint8 aa) : c(ar, ag, ab, aa) {
+}
+
+void mogltk::ColorP::Bind() {
+ glColor4d((double) c.R / 255, (double) c.G / 255, (double) c.B / 255, (double) c.A / 255);
+}
+