- int i, index, *indexlist = &explosiontris[0][0], alpha = bound(0, e->alpha * 255.0f, 255);
- float s = cl.time * 1, t = cl.time * 0.75;
- s -= (int) s;
- t -= (int) t;
- /*
- glColor4f(1,1,1,e->alpha);
- glDisable(GL_TEXTURE_2D);
-// glBindTexture(GL_TEXTURE_2D, explosiontexture);
- if (gl_vertexarrays.value)
- {
- qglVertexPointer(3, GL_FLOAT, 0, (float *) &e->vert[0][0]);
-// qglTexCoordPointer(2, GL_FLOAT, 0, (float *) &explosiontexcoords[0][0]);
- glEnableClientState(GL_VERTEX_ARRAY);
-// glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- qglDrawElements(GL_TRIANGLES, EXPLOSIONTRIS, GL_UNSIGNED_INT, indexlist);
-// glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- glDisableClientState(GL_VERTEX_ARRAY);
- }
- else
- {
- glBegin(GL_TRIANGLES);
- for (i = 0;i < EXPLOSIONTRIS * 3;i++)
- {
- index = *indexlist++;
-// glTexCoord2fv(explosiontexcoords[index]);
- glVertex3fv(e->vert[index]);
- }
- glEnd();
- }
- glEnable(GL_TEXTURE_2D);
- */
- 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++)