From: havoc Date: Sun, 29 May 2005 22:48:14 +0000 (+0000) Subject: fixed EF_NODEPTHTEST support on q1bsp/q3bsp/models X-Git-Tag: xonotic-v0.1.0preview~4829 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=314b9bb1fb023bd937838cd7504838628a0e20ac;p=xonotic%2Fdarkplaces.git fixed EF_NODEPTHTEST support on q1bsp/q3bsp/models git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5353 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 760e60ce..656aa118 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -1482,6 +1482,8 @@ void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t) t->currentmaterialflags |= MATERIALFLAG_ADD | MATERIALFLAG_TRANSPARENT; else if (t->currentalpha < 1) t->currentmaterialflags |= MATERIALFLAG_ALPHA | MATERIALFLAG_TRANSPARENT; + if (ent->effects & EF_NODEPTHTEST) + t->currentmaterialflags |= MATERIALFLAG_NODEPTHTEST; } void R_UpdateAllTextureInfo(entity_render_t *ent) @@ -2339,7 +2341,7 @@ void R_QueueTextureSurfaceList(entity_render_t *ent, texture_t *texture, int tex tempcenter[1] = (surface->mins[1] + surface->maxs[1]) * 0.5f; tempcenter[2] = (surface->mins[2] + surface->maxs[2]) * 0.5f; Matrix4x4_Transform(&ent->matrix, tempcenter, center); - R_MeshQueue_AddTransparent(ent->effects & EF_NODEPTHTEST ? r_vieworigin : center, RSurfShader_Transparent_Callback, ent, surface - ent->model->data_surfaces); + R_MeshQueue_AddTransparent(texture->currentmaterialflags & MATERIALFLAG_NODEPTHTEST ? r_vieworigin : center, RSurfShader_Transparent_Callback, ent, surface - ent->model->data_surfaces); } } } diff --git a/r_shadow.c b/r_shadow.c index 7578751a..523457a0 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -1572,7 +1572,7 @@ void R_Shadow_RenderLighting(int firstvertex, int numvertices, int numtriangles, int renders; float color[3], color2[3], colorscale, specularscale; rmeshstate_t m; - // FIXME: support EF_NODEPTHTEST + // FIXME: support MATERIALFLAG_NODEPTHTEST if (!basetexture) basetexture = r_texture_white; if (!bumptexture)