+ varray_texcoord[0][ 0] = 0;varray_texcoord[0][ 1] = 0;
+ varray_texcoord[0][ 4] = 1;varray_texcoord[0][ 5] = 0;
+ varray_texcoord[0][ 8] = 1;varray_texcoord[0][ 9] = 1;
+ varray_texcoord[0][12] = 0;varray_texcoord[0][13] = 1;
+ varray_vertex[ 0] = x ;varray_vertex[ 1] = y ;varray_vertex[ 2] = 10;
+ varray_vertex[ 4] = x+w;varray_vertex[ 5] = y ;varray_vertex[ 6] = 10;
+ varray_vertex[ 8] = x+w;varray_vertex[ 9] = y+h;varray_vertex[10] = 10;
+ varray_vertex[12] = x ;varray_vertex[13] = y+h;varray_vertex[14] = 10;
+ GL_Color(cr, cg, cb, ca);
+ R_Mesh_Draw(4, 2, quadelements);
+ break;
+ case DRAWQUEUE_STRING:
+ str = (char *)(dq + 1);
+ if (strcmp("gfx/conchars", currentpic))
+ {
+ currentpic = "gfx/conchars";
+ m.tex[0] = chartexnum;
+ R_Mesh_TextureState(&m);
+ }
+ batchcount = 0;
+ at = varray_texcoord[0];
+ av = varray_vertex;
+ GL_Color(cr, cg, cb, ca);
+ while ((num = *str++) && x < vid.conwidth)
+ {
+ if (num != ' ')
+ {
+ s = (num & 15)*0.0625f + (0.5f / 256.0f);
+ t = (num >> 4)*0.0625f + (0.5f / 256.0f);
+ u = 0.0625f - (1.0f / 256.0f);
+ v = 0.0625f - (1.0f / 256.0f);
+ at[ 0] = s ;at[ 1] = t ;
+ at[ 4] = s+u;at[ 5] = t ;
+ at[ 8] = s+u;at[ 9] = t+v;
+ at[12] = s ;at[13] = t+v;
+ av[ 0] = x ;av[ 1] = y ;av[ 2] = 10;
+ av[ 4] = x+w;av[ 5] = y ;av[ 6] = 10;
+ av[ 8] = x+w;av[ 9] = y+h;av[10] = 10;
+ av[12] = x ;av[13] = y+h;av[14] = 10;
+ at += 16;
+ av += 16;
+ batchcount++;
+ if (batchcount >= 128)
+ {
+ R_Mesh_Draw(batchcount * 4, batchcount * 2, quadelements);
+ batchcount = 0;
+ at = varray_texcoord[0];
+ av = varray_vertex;
+ }
+ }
+ x += w;
+ }
+ if (batchcount > 0)
+ R_Mesh_Draw(batchcount * 4, batchcount * 2, quadelements);
+ break;
+ case DRAWQUEUE_MESH:
+ mesh = (void *)(dq + 1);
+ m.tex[0] = R_GetTexture(mesh->texture);
+ R_Mesh_TextureState(&m);
+ R_Mesh_ResizeCheck(mesh->numvertices);
+ memcpy(varray_vertex, mesh->vertices, sizeof(float[4]) * mesh->numvertices);
+ memcpy(varray_texcoord[0], mesh->texcoords, sizeof(float[4]) * mesh->numvertices);
+ memcpy(varray_color, mesh->colors, sizeof(float[4]) * mesh->numvertices);
+ GL_UseColorArray();
+ R_Mesh_Draw(mesh->numvertices, mesh->numtriangles, mesh->indices);
+ currentpic = "\0";
+ break;