void CQuickSpriteSystem::EndGroup(void) { Flush(); qglColor4ub(255,255,255,255); qglEnable(GL_CULL_FACE); }
/* * ================ Draw_Char * * Draws one 8*8 graphics character with 0 being transparent. It can be clipped * to the top of the screen to allow the console to be smoothly scrolled off. * ================ */ void Draw_Char(int x, int y, int num, int alpha) { int row, col; float frow, fcol, size; num &= 255; if (alpha >= 254) alpha = 254; else if (alpha <= 1) alpha = 1; if ((num & 127) == 32) return; /* space */ if (y <= -8) return; /* totally off screen */ row = num >> 4; col = num & 15; frow = row * 0.0625; fcol = col * 0.0625; size = 0.0625; { /* GLSTATE_DISABLE_ALPHATEST */ qglDisable(GL_ALPHA_TEST); GL_TexEnv(GL_MODULATE); qglColor4ub(255, 255, 255, alpha); /* GLSTATE_ENABLE_BLEND */ qglEnable(GL_BLEND); qglDepthMask(false); } GL_Bind(draw_chars->texnum); qglBegin(GL_QUADS); qglTexCoord2f(fcol, frow); qglVertex2f(x, y); qglTexCoord2f(fcol + size, frow); qglVertex2f(x + 8, y); qglTexCoord2f(fcol + size, frow + size); qglVertex2f(x + 8, y + 8); qglTexCoord2f(fcol, frow + size); qglVertex2f(x, y + 8); qglEnd(); { qglDepthMask(true); GL_TexEnv(GL_REPLACE); /* GLSTATE_DISABLE_BLEND */ qglDisable(GL_BLEND); qglColor4f(1,1,1,1); /* GLSTATE_ENABLE_ALPHATEST */ qglEnable(GL_ALPHA_TEST); } }
void CQuickSpriteSystem::EndGroup(void) { Flush(); qglColor4ub(255,255,255,255); if(mTurnCullBackOn) { qglEnable(GL_CULL_FACE); } }
static void APIENTRY R_ArrayElementDiscrete( GLint index ) { qglColor4ub( tess.svars.colors[ index ][0], tess.svars.colors[ index ][1], tess.svars.colors[ index ][2], tess.svars.colors[ index ][3] ); if ( glState.currenttmu ) { qglMultiTexCoord2fARB( 0, tess.svars.texcoords[ 0 ][ index ][0], tess.svars.texcoords[ 0 ][ index ][1] ); qglMultiTexCoord2fARB( 1, tess.svars.texcoords[ 1 ][ index ][0], tess.svars.texcoords[ 1 ][ index ][1] ); } else { qglTexCoord2fv( tess.svars.texcoords[ 0 ][ index ] ); } qglVertex3fv( tess.xyz[ index ] ); }