- // GL 1.1 but not using vertex arrays - 3dfx glquake minigl driver
- // feed it manually
- qglBegin(GL_TRIANGLES);
- if (gl_state.texture[1]) // if the mesh uses multiple textures
- {
- // the minigl doesn't have this (because it does not have ARB_multitexture)
- for (i = 0;i < indexcount;i++)
- {
- in = index[i];
- c = varray_bcolor + in * 4;
- qglColor4ub(c[0], c[1], c[2], c[3]);
- for (j = 0;j < backendunits;j++)
- {
- if (gl_state.texture[j])
- {
- v = varray_texcoord[j] + in * 2;
- qglMultiTexCoord2f(GL_TEXTURE0_ARB + j, v[0], v[1]);
- }
- }
- v = varray_vertex + in * 4;
- qglVertex3f(v[0], v[1], v[2]);
- }
- }
- else
- {
- for (i = 0;i < indexcount;i++)
- {
- in = index[i];
- c = varray_bcolor + in * 4;
- qglColor4ub(c[0], c[1], c[2], c[3]);
- if (gl_state.texture[0])
- {
- v = varray_texcoord[j] + in * 2;
- qglTexCoord2f(v[0], v[1]);
- }
- v = varray_vertex + in * 4;
- qglVertex3f(v[0], v[1], v[2]);
- }
- }
- qglEnd();