summaryrefslogtreecommitdiff
path: root/lib/glcolor.cc
blob: c38b4e5fefd6c2de602b4f09dc92cd38152906c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <SDL_opengl.h>
#include "glcolor.h"

mogltk::glColorP::glColorP(const Color & ac) : ColorP(ac) {
}

mogltk::glColorP::glColorP(Uint8 ar, Uint8 ag, Uint8 ab, Uint8 aa) : ColorP(ar, ag, ab, aa) {
}

void mogltk::glColorP::Bind() {
    glColor4d((double) MIN(MAX(c.R, Min.R), Max.R) / 255, (double) MIN(MAX(c.G, Min.G), Max.G) / 255, (double) MIN(MAX(c.B, Min.B), Max.B) / 255, (double) MIN(MAX(c.A, Min.A), Max.A) / 255);
}