summaryrefslogtreecommitdiff
path: root/lib/glcolor.cc
blob: 23ade75f5a8d0ea10c25e124177eeca8f5c6eefd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
}