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

@ -6,6 +6,23 @@ namespace TinyGL {
#define ZCMP(z, zpix) ((z) >= (zpix))
void ZB_fillTriangleDepthOnly(ZBuffer *zb, ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2) {
#define INTERP_Z
#define DRAW_INIT()
#define PUT_PIXEL(_a) { \
if (ZCMP(z, pz[_a])) { \
pz[_a] = z; \
} \
z += dzdx; \
}
#include "graphics/tinygl/ztriangle.h"
}
void ZB_fillTriangleFlat(ZBuffer *zb, ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2) {
int color;