}
if (colors)
{
- glColorPointer(4, GL_UNSIGNED_BYTE, 0, colors);
+ glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(byte[4]), colors);
glEnableClientState(GL_COLOR_ARRAY);
}
// prep the vertex array as early as possible
if (r_render.value)
{
- glVertexPointer(3, GL_FLOAT, 0, aliasvert);
+ glVertexPointer(3, GL_FLOAT, sizeof(float[3]), aliasvert);
glEnableClientState(GL_VERTEX_ARRAY);
- glTexCoordPointer(2, GL_FLOAT, 0, (void *)((int) maliashdr->texdata + (int) maliashdr));
+ glTexCoordPointer(2, GL_FLOAT, sizeof(float[2]), (void *)((int) maliashdr->texdata + (int) maliashdr));
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
GL_LockArray(0, maliashdr->numverts);
}
// LordHavoc: big mess...
// using vertex arrays only slightly, although it is enough to prevent duplicates
// (saving half the transforms)
- glVertexPointer(3, GL_FLOAT, 0, aliasvert);
- glColorPointer(4, GL_UNSIGNED_BYTE, 0, aliasvertcolor);
+ glVertexPointer(3, GL_FLOAT, sizeof(float[3]), aliasvert);
+ glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(byte[4]), aliasvertcolor);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
// LordHavoc: big mess...
// using vertex arrays only slightly, although it is enough to prevent duplicates
// (saving half the transforms)
- glVertexPointer(3, GL_FLOAT, 0, aliasvert);
+ glVertexPointer(3, GL_FLOAT, sizeof(float[3]), aliasvert);
glEnableClientState(GL_VERTEX_ARRAY);
order = (int *)((int)pheader + pheader->ofs_glcmds);
return;
renderlist = (int *)(m->lump_render.start + (int) m);
texture = (rtexture_t **)(m->lump_shaders.start + (int) m);
- glVertexPointer(3, GL_FLOAT, 0, aliasvert);
+ glVertexPointer(3, GL_FLOAT, sizeof(float[3]), aliasvert);
glEnableClientState(GL_VERTEX_ARRAY);
- glColorPointer(4, GL_UNSIGNED_BYTE, 0, colors);
+ glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(byte[4]), colors);
glEnableClientState(GL_COLOR_ARRAY);
- glTexCoordPointer(2, GL_FLOAT, 0, (float *)(m->lump_texcoords.start + (int) m));
+ glTexCoordPointer(2, GL_FLOAT, sizeof(float[2]), (float *)(m->lump_texcoords.start + (int) m));
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
for (i = 0;i < m->numshaders;i++)
VectorSubtract(org, r_origin, diff);
glColor4f(fogcolor[0], fogcolor[1], fogcolor[2], exp(fogdensity/DotProduct(diff,diff)));
- glVertexPointer(3, GL_FLOAT, 0, aliasvert);
+ glVertexPointer(3, GL_FLOAT, sizeof(float[3]), aliasvert);
glEnableClientState(GL_VERTEX_ARRAY);
for (i = 0;i < m->numshaders;i++)
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]);
+ glVertexPointer(3, GL_FLOAT, sizeof(float[3]), (float *) &e->vert[0][0]);
+// glTexCoordPointer(2, GL_FLOAT, sizeof(float[2]), (float *) &explosiontexcoords[0][0]);
glEnableClientState(GL_VERTEX_ARRAY);
// glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glDrawElements(GL_TRIANGLES, EXPLOSIONTRIS, GL_UNSIGNED_INT, indexlist);