tvxyz[3][0] = rd->origin[0] + vright[0] * scale - vup[0] * scale;
tvxyz[3][1] = rd->origin[1] + vright[1] * scale - vup[1] * scale;
tvxyz[3][2] = rd->origin[2] + vright[2] * scale - vup[2] * scale;
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
}
}
R_RegisterModule("R_Particles", r_part_start, r_part_shutdown, r_part_newmap);
}
-//int partindexarray[6] = {0, 1, 2, 0, 2, 3};
+int partindexarray[6] = {0, 1, 2, 0, 2, 3};
void R_DrawParticles (void)
{
m.transparent = true;
m.blendfunc1 = GL_SRC_ALPHA;
m.blendfunc2 = GL_ONE_MINUS_SRC_ALPHA;
- //m.numtriangles = 2;
- //m.index = partindexarray;
- //m.numverts = 4;
+ m.numtriangles = 2;
+ m.index = partindexarray;
+ m.numverts = 4;
m.vertex = &tvxyz[0][0];
- //m.vertexstep = sizeof(float[4]);
+ m.vertexstep = sizeof(float[4]);
m.tex[0] = R_GetTexture(particlefonttexture);
m.texcoords[0] = &tvst[0][0];
- //m.texcoordstep[0] = sizeof(float[2]);
+ m.texcoordstep[0] = sizeof(float[2]);
for (i = 0, r = r_refdef.particles;i < r_refdef.numparticles;i++, r++)
{
m.cr *= ifog;
m.cg *= ifog;
m.cb *= ifog;
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
}
else
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
else
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
else
{
tvst[2][1] = texfog->t2;
tvst[3][0] = texfog->s2;
tvst[3][1] = texfog->t1;
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
else
{
m.cr += fogcolor[0] * fog;
m.cg += fogcolor[1] * fog;
m.cb += fogcolor[2] * fog;
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
else
{
// render the first pass (alpha), then do additive fog
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
m.blendfunc2 = GL_ONE;
m.cr = fogcolor[0];
tvst[2][1] = texfog->t2;
tvst[3][0] = texfog->s2;
tvst[3][1] = texfog->t1;
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
}
}
else
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
else
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
}
}
R_ClipSpriteImage(org, right, up);
}
-//int spritepolyindex[6] = {0, 1, 2, 0, 2, 3};
+int spritepolyindex[6] = {0, 1, 2, 0, 2, 3};
void GL_DrawSpriteImage (int fog, mspriteframe_t *frame, int texture, vec3_t origin, vec3_t up, vec3_t right, float red, float green, float blue, float alpha)
{
|| (currentrenderentity->model->flags & EF_ADDITIVE)
|| fog)
m.blendfunc2 = GL_ONE;
- //m.numtriangles = 2;
- //m.index = spritepolyindex;
- //m.numverts = 4;
+ m.numtriangles = 2;
+ m.index = spritepolyindex;
+ m.numverts = 4;
m.vertex = &v[0][0];
- //m.vertexstep = sizeof(float[4]);
+ m.vertexstep = sizeof(float[4]);
m.cr = red;
m.cg = green;
m.cb = blue;
m.ca = alpha;
m.tex[0] = texture;
m.texcoords[0] = &st[0][0];
- //m.texcoordstep[0] = sizeof(float[2]);
+ m.texcoordstep[0] = sizeof(float[2]);
v[0][0] = origin[0] + frame->down * up[0] + frame->left * right[0];
v[0][1] = origin[1] + frame->down * up[1] + frame->left * right[1];
st[3][0] = 1;
st[3][1] = 1;
- R_Mesh_DrawDecal(&m);
+ R_Mesh_Draw(&m);
}
/*