- case DRAWQUEUE_PIC:
- str = (char *)(dq + 1);
- if (strcmp(str, currentpic))
- {
- currentpic = str;
- if (*str)
- {
- pic = Draw_CachePic(str);
- m.tex[0] = R_GetTexture(pic->tex);
- }
- else
- m.tex[0] = 0;
- R_Mesh_TextureState(&m);
- }
- if (*str)
- {
- if (w == 0)
- w = pic->width;
- if (h == 0)
- h = pic->height;
- }
- 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;