- GL_ConvertColorsFloatToByte();
-
- m[0] = buf_mesh.matrix.m[0][0];
- m[1] = buf_mesh.matrix.m[0][1];
- m[2] = buf_mesh.matrix.m[0][2];
- m[3] = buf_mesh.matrix.m[0][3];
- m[4] = buf_mesh.matrix.m[1][0];
- m[5] = buf_mesh.matrix.m[1][1];
- m[6] = buf_mesh.matrix.m[1][2];
- m[7] = buf_mesh.matrix.m[1][3];
- m[8] = buf_mesh.matrix.m[2][0];
- m[9] = buf_mesh.matrix.m[2][1];
- m[10] = buf_mesh.matrix.m[2][2];
- m[11] = buf_mesh.matrix.m[2][3];
- for (i = 0, v = buf_vertex[buf_mesh.firstvert].v;i < buf_mesh.verts;i++, v += 4)
- {
- VectorCopy(v, tempv);
- //Matrix4x4_Transform(&buf_mesh.matrix, tempv, v);
- v[0] = tempv[0] * m[0] + tempv[1] * m[1] + tempv[2] * m[2] + m[3];
- v[1] = tempv[0] * m[4] + tempv[1] * m[5] + tempv[2] * m[6] + m[7];
- v[2] = tempv[0] * m[8] + tempv[1] * m[9] + tempv[2] * m[10] + m[11];
- }
- GL_LockArray(0, currentvertex);
- GL_DrawRangeElements(buf_mesh.firstvert, buf_mesh.firstvert + buf_mesh.verts, buf_mesh.triangles * 3, (unsigned int *)&buf_tri[buf_mesh.firsttriangle].index[0]);CHECKGLERROR
-
- currenttriangle = 0;
- currentvertex = 0;
-
+ GL_ConvertColorsFloatToByte(buf_mesh.verts);
+ GL_TransformVertices(buf_mesh.verts);
+ GL_LockArray(0, buf_mesh.verts);CHECKGLERROR
+ GL_DrawRangeElements(0, buf_mesh.verts, buf_mesh.triangles * 3, &buf_tri[0].index[0]);CHECKGLERROR