From: divverent Date: Wed, 16 May 2012 07:44:52 +0000 (+0000) Subject: fix alphatest surfaces in GL11 path X-Git-Tag: xonotic-v0.7.0~133 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=67c5bcfd320536354506b9898f3e9d36481aee10;p=xonotic%2Fdarkplaces.git fix alphatest surfaces in GL11 path git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11819 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=d76bc3d30f1b197c6f1260875d7bed34f0655e36 --- diff --git a/gl_rmain.c b/gl_rmain.c index ec47acce..62222a73 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -10021,7 +10021,7 @@ static void R_DrawTextureSurfaceList_GL11(int texturenumsurfaces, const msurface switch (layer->type) { case TEXTURELAYERTYPE_LITTEXTURE: - if (layer->blendfunc1 == GL_ONE && layer->blendfunc2 == GL_ZERO) + if (layer->blendfunc1 == GL_ONE && layer->blendfunc2 == GL_ZERO && !(rsurface.texture->currentmaterialflags & MATERIALFLAG_ALPHATEST)) { // two-pass lit texture with 2x rgbscale // first the lightmap pass @@ -10054,6 +10054,8 @@ static void R_DrawTextureSurfaceList_GL11(int texturenumsurfaces, const msurface R_Mesh_TexCoordPointer(0, 2, GL_FLOAT, sizeof(float[2]), rsurface.batchtexcoordtexture2f, rsurface.batchtexcoordtexture2f_vertexbuffer, rsurface.batchtexcoordtexture2f_bufferoffset); if (rsurface.texture->currentmaterialflags & MATERIALFLAG_MODELLIGHT) RSurf_DrawBatch_GL11_VertexShade(layer->color[0], layer->color[1], layer->color[2], layer->color[3], layer->color[0] != 1 || layer->color[1] != 1 || layer->color[2] != 1 || layer->color[3] != 1, applyfog); + else if (FAKELIGHT_ENABLED) + RSurf_DrawBatch_GL11_FakeLight(layer->color[0], layer->color[1], layer->color[2], layer->color[3], layer->color[0] != 1 || layer->color[1] != 1 || layer->color[2] != 1 || layer->color[3] != 1, applyfog); else RSurf_DrawBatch_GL11_VertexColor(layer->color[0], layer->color[1], layer->color[2], layer->color[3], layer->color[0] != 1 || layer->color[1] != 1 || layer->color[2] != 1 || layer->color[3] != 1, applyfog); }