GLboolean depthmask;
int colormask; // stored as bottom 4 bits: r g b a (3 2 1 0 order)
int depthtest;
+ int alphatest;
int scissortest;
unsigned int unit;
unsigned int clientunit;
{
memset(&gl_state, 0, sizeof(gl_state));
gl_state.depthtest = true;
+ gl_state.alphatest = false;
gl_state.blendfunc1 = GL_ONE;
gl_state.blendfunc2 = GL_ZERO;
gl_state.blend = false;
}
}
+void GL_AlphaTest(int state)
+{
+ if (gl_state.alphatest != state)
+ {
+ gl_state.alphatest = state;
+ if (gl_state.alphatest)
+ {
+ qglEnable(GL_ALPHA_TEST);CHECKGLERROR
+ }
+ else
+ {
+ qglDisable(GL_ALPHA_TEST);CHECKGLERROR
+ }
+ }
+}
+
void GL_ColorMask(int r, int g, int b, int a)
{
int state = r*8 + g*4 + b*2 + a*1;
void GL_BlendFunc(int blendfunc1, int blendfunc2);
void GL_DepthMask(int state);
void GL_DepthTest(int state);
+void GL_AlphaTest(int state);
void GL_ColorMask(int r, int g, int b, int a);
void GL_Color(float cr, float cg, float cb, float ca);
void GL_TransformToScreen(const vec4_t in, vec4_t out);