+ GL_Color(c[0], c[1], c[2], c[3]);
+ R_Mesh_GetSpace(4);
+ varray_texcoord2f[0][0] = 0;varray_texcoord2f[0][1] = 0;
+ varray_texcoord2f[0][2] = 1;varray_texcoord2f[0][3] = 0;
+ varray_texcoord2f[0][4] = 1;varray_texcoord2f[0][5] = 1;
+ varray_texcoord2f[0][6] = 0;varray_texcoord2f[0][7] = 1;
+ varray_vertex3f[ 0] = x ;varray_vertex3f[ 1] = y ;varray_vertex3f[ 2] = 10;
+ varray_vertex3f[ 3] = x+w;varray_vertex3f[ 4] = y ;varray_vertex3f[ 5] = 10;
+ varray_vertex3f[ 6] = x+w;varray_vertex3f[ 7] = y+h;varray_vertex3f[ 8] = 10;
+ varray_vertex3f[ 9] = x ;varray_vertex3f[10] = y+h;varray_vertex3f[11] = 10;
+ 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 = texttexcoords;
+ av = textverts;
+ GL_Color(c[0], c[1], c[2], c[3]);
+ 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[ 2] = s+u;at[ 3] = t ;
+ at[ 4] = s+u;at[ 5] = t+v;
+ at[ 6] = s ;at[ 7] = t+v;
+ av[ 0] = x ;av[ 1] = y ;av[ 2] = 10;
+ av[ 3] = x+w;av[ 4] = y ;av[ 5] = 10;
+ av[ 6] = x+w;av[ 7] = y+h;av[ 8] = 10;
+ av[ 9] = x ;av[10] = y+h;av[11] = 10;
+ at += 8;
+ av += 12;
+ batchcount++;
+ if (batchcount >= 128)
+ {
+ R_Mesh_GetSpace(batchcount * 4);
+ R_Mesh_CopyVertex3f(textverts, batchcount * 4);
+ R_Mesh_CopyTexCoord2f(0, texttexcoords, batchcount * 4);
+ R_Mesh_Draw(batchcount * 4, batchcount * 2, quadelements);
+ batchcount = 0;
+ at = texttexcoords;
+ av = textverts;
+ }
+ }
+ x += w;
+ }
+ if (batchcount > 0)
+ {
+ R_Mesh_GetSpace(batchcount * 4);
+ R_Mesh_CopyVertex3f(textverts, batchcount * 4);
+ R_Mesh_CopyTexCoord2f(0, texttexcoords, batchcount * 4);
+ 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);
+ GL_UseColorArray();
+ R_Mesh_GetSpace(mesh->numvertices);
+ R_Mesh_CopyVertex3f(mesh->vertex3f, mesh->numvertices);
+ R_Mesh_CopyTexCoord2f(0, mesh->texcoord2f, mesh->numvertices);
+ R_Mesh_CopyColor4f(mesh->color4f, mesh->numvertices);
+ R_Mesh_Draw(mesh->numvertices, mesh->numtriangles, mesh->element3i);
+ currentpic = "\0";
+ break;