summaryrefslogtreecommitdiff
path: root/lib/glcolor.cc
diff options
context:
space:
mode:
authorpixel <pixel>2003-03-14 13:36:40 +0000
committerpixel <pixel>2003-03-14 13:36:40 +0000
commit2ef9753588b02155faf8bc5a176e4fcf7489dae2 (patch)
treeeaa482c393ca29af35350fd033570989f1fcaff8 /lib/glcolor.cc
parent700cd603a7ceced2fe8b6a064330d6f88d278dce (diff)
glcolor, first episode
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);
+}
+