- int i, index, *indexlist = &explosiontris[0][0], alpha = bound(0, e->alpha * 128.0f, 128), texnum, fogtexnum;
- float s, t;
-// s = cl.time * 1;
-// t = cl.time * 0.75;
-// s -= (int) s;
-// t -= (int) t;
- s = 0;
- t = 0;
- /*
- glColor4f(1,1,1,e->alpha);
- glDisable(GL_TEXTURE_2D);
-// glBindTexture(GL_TEXTURE_2D, explosiontexture);
- glVertexPointer(3, GL_FLOAT, 0, (float *) &e->vert[0][0]);
-// glTexCoordPointer(2, GL_FLOAT, 0, (float *) &explosiontexcoords[0][0]);
- glEnableClientState(GL_VERTEX_ARRAY);
-// glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glDrawElements(GL_TRIANGLES, EXPLOSIONTRIS, GL_UNSIGNED_INT, indexlist);
-// glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- glDisableClientState(GL_VERTEX_ARRAY);
- glEnable(GL_TEXTURE_2D);
- */
- texnum = R_GetTexture(explosiontexture);
- fogtexnum = R_GetTexture(explosiontexturefog);
- for (i = 0;i < EXPLOSIONTRIS;i++)
+ 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);
+ for (surfacelistindex = 0;surfacelistindex < numsurfaces;surfacelistindex++)