TINYGL: added tglAlphaTest stubs

This commit is contained in:
Pawel Kolodziejski 2014-07-04 08:43:19 +02:00
parent 2bf63a5f52
commit b4962f645e
11 changed files with 61 additions and 7 deletions

View file

@ -61,6 +61,10 @@ void glopEnableDisable(GLContext *c, GLParam *p) {
case TGL_DEPTH_TEST:
c->depth_test = v;
break;
case TGL_ALPHA_TEST:
c->_alphaTestEnabled = v;
c->fb->enableAlphaTest(v);
break;
case TGL_BLEND:
c->enableBlend = v;
c->fb->enableBlending(v);
@ -111,6 +115,12 @@ void glopBlendFunc(GLContext *c, GLParam *p) {
c->fb->setBlendingFactors(sfactor, dfactor);
}
void glopAlphaFunc(GLContext *c, GLParam *p) {
TGLenum func = p[1].i;
float ref = p[2].i;
c->fb->setAlphaTestFunc(func, ref);
}
void glopShadeModel(GLContext *c, GLParam *p) {
int code = p[1].i;
c->current_shade_model = code;