]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
added GL_DepthRange function and MATERIALFLAG_SHORTDEPTHRANGE (now used by viewmodels...
[xonotic/darkplaces.git] / gl_rsurf.c
index 91042d0a89c5dc51edb0ce612eac5411f3171567..a5d1e3f3f71a4b2144948069aaa95712adfa1c42 100644 (file)
@@ -337,6 +337,7 @@ static void R_DrawPortal_Callback(const entity_render_t *ent, const rtlight_t *r
        CHECKGLERROR
        GL_BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        GL_DepthMask(false);
+       GL_DepthRange(0, 1);
        GL_DepthTest(true);
        GL_CullFace(GL_NONE);
        R_Mesh_Matrix(&identitymatrix);
@@ -1020,7 +1021,7 @@ void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surface
                        rsurface_texture = tex->currentframe;
                        if (rsurface_texture->currentmaterialflags & (MATERIALFLAG_WALL | MATERIALFLAG_WATER))
                        {
-                               if (rsurface_texture->currentmaterialflags & MATERIALFLAG_BLENDED)
+                               if (rsurface_texture->currentmaterialflags & MATERIALFLAGMASK_DEPTHSORTED)
                                {
                                        vec3_t tempcenter, center;
                                        for (l = k;l < batchnumsurfaces && tex == batchsurfacelist[l]->texture;l++)