TINYGL: Support ColorMask

Note, this is just basic support, it is either all or nothing.
Disabling select channels is not possible.
This commit is contained in:
Dries Harnie 2013-07-02 00:11:26 +02:00
parent 3196c0a0fb
commit 6bd38b1801
10 changed files with 43 additions and 0 deletions

View file

@ -156,6 +156,15 @@ void tglFrontFace(int mode) {
TinyGL::gl_add_op(p);
}
void tglColorMask(TGLboolean r, TGLboolean g, TGLboolean b, TGLboolean a) {
TinyGL::GLParam p[2];
p[0].op = TinyGL::OP_ColorMask;
p[1].i = (r << 24) | (g << 16) | (b << 8) | (a << 0);
TinyGL::gl_add_op(p);
}
void tglPolygonMode(int face, int mode) {
TinyGL::GLParam p[3];