]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_explosion.c
added polygonoffset as a texture property, used on submodels (such as
[xonotic/darkplaces.git] / r_explosion.c
index 0c343154e66a809be0b484f5d4e2865235bc6177..48ce2ef3ec4e3566f524cd74b7085d4633aaff0d 100644 (file)
@@ -187,11 +187,13 @@ static void R_DrawExplosion_TransparentCallback(const entity_render_t *ent, cons
        rmeshstate_t m;
        GL_BlendFunc(GL_SRC_ALPHA, GL_ONE);
        GL_DepthMask(false);
+       GL_DepthRange(0, 1);
+       GL_PolygonOffset(r_refdef.polygonfactor, r_refdef.polygonoffset);
        GL_DepthTest(true);
        GL_CullFace(GL_FRONT); // quake is backwards, this culls back faces
        R_Mesh_Matrix(&identitymatrix);
 
-       R_Mesh_ColorPointer(NULL);
+       R_Mesh_ColorPointer(NULL, 0, 0);
        memset(&m, 0, sizeof(m));
        m.tex[0] = R_GetTexture(explosiontexture);
        m.pointer_texcoord[0] = explosiontexcoord2f[0];
@@ -199,11 +201,11 @@ static void R_DrawExplosion_TransparentCallback(const entity_render_t *ent, cons
        for (surfacelistindex = 0;surfacelistindex < numsurfaces;surfacelistindex++)
        {
                const explosion_t *e = explosion + surfacelist[surfacelistindex];
-               R_Mesh_VertexPointer(e->vert[0]);
+               R_Mesh_VertexPointer(e->vert[0], 0, 0);
                // FIXME: fixed function path can't properly handle r_view.colorscale > 1
                GL_Color(e->alpha * r_view.colorscale, e->alpha * r_view.colorscale, e->alpha * r_view.colorscale, 1);
                GL_LockArrays(0, numverts);
-               R_Mesh_Draw(0, numverts, numtriangles, explosiontris[0]);
+               R_Mesh_Draw(0, numverts, numtriangles, explosiontris[0], 0, 0);
                GL_LockArrays(0, 0);
        }
 }