- int numtriangles, numverts;
- float alpha;
- rmeshstate_t m;
- const explosion_t *e;
- e = calldata1;
-
- memset(&m, 0, sizeof(m));
- m.blendfunc1 = GL_SRC_ALPHA;
- m.blendfunc2 = GL_ONE;
- m.tex[0] = R_GetTexture(explosiontexture);
- R_Mesh_Matrix(&r_identitymatrix);
-
- numtriangles = EXPLOSIONTRIS;
- numverts = EXPLOSIONVERTS;
- alpha = e->alpha * r_colorscale;
- GL_Color(alpha, alpha, alpha, 1);
- if (gl_mesh_copyarrays.integer)
- {
- R_Mesh_State(&m);
- R_Mesh_GetSpace(numverts);
- R_Mesh_CopyVertex3f(e->vert[0], numverts);
- R_Mesh_CopyTexCoord2f(0, explosiontexcoord2f[0], numverts);
- }
- else
+ int surfacelistindex = 0;
+ const int numtriangles = EXPLOSIONTRIS, numverts = EXPLOSIONVERTS;
+ 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(r_refdef.view.cullface_back);
+ R_EntityMatrix(&identitymatrix);
+
+// R_Mesh_ResetTextureState();
+ R_SetupShader_Generic(explosiontexture, NULL, GL_MODULATE, 1, false, false, false);
+ for (surfacelistindex = 0;surfacelistindex < numsurfaces;surfacelistindex++)