24 float x,
float y,
float w,
float h,
25 float s1,
float t1,
float s2,
float t2,
26 uint32_t
color,
int texnum,
int flags)
41 Vector4Set(dst_vert, x, y, s1, t1);
42 Vector4Set(dst_vert + 4, x + w, y, s2, t1);
43 Vector4Set(dst_vert + 8, x + w, y + h, s2, t2);
44 Vector4Set(dst_vert + 12, x, y + h, s1, t2);
60 if (flags & IF_TRANSPARENT) {
61 if ((flags & IF_PALETTED) &&
draw.
scale == 1) {
68 if ((
color & U32_ALPHA) != U32_ALPHA) {
76 #define GL_StretchPic(x,y,w,h,s1,t1,s2,t2,color,image) \
77 _GL_StretchPic(x,y,w,h,s1,t1,s2,t2,color,(image)->texnum,(image)->flags)
133 rc.left = clip->left * scale;
134 rc.top = clip->top * scale;
135 rc.right = clip->right * scale;
136 rc.bottom = clip->bottom * scale;
146 if (rc.right < rc.left)
148 if (rc.bottom < rc.top)
153 rc.right - rc.left, rc.bottom - rc.top);
166 Q_rint(
r_config.height * scale), 0, -1, 1);
175 GL_StretchPic(x, y, w, h, image->sl, image->tl, image->sh, image->th,
184 image->sl, image->tl, image->sh, image->th,
draw.
colors[0].u32, image);
187 #define DIV64 (1.0f / 64.0f)
199 _GL_StretchPic(x, y, w, h, 0, 0, 1, 1,
d_8to24table[
c & 0xff],
TEXNUM_WHITE, 0);
206 _GL_StretchPic(x, y, w, h, 0, 0, 1, 1,
color,
TEXNUM_WHITE, 0);
213 if ((
c & 127) == 32) {
217 if (flags & UI_ALTCOLOR) {
220 if (flags & UI_XORCOLOR) {
224 s = (
c & 15) * 0.0625f;
225 t = (
c >> 4) * 0.0625f;
228 uint32_t black = MakeColor(0, 0, 0,
draw.
colors[0].u8[3]);
231 s + 0.0625f, t + 0.0625f, black, image);
235 s + 0.0625f, t + 0.0625f, black, image);
239 s + 0.0625f, t + 0.0625f,
draw.
colors[
c >> 7].u32, image);
247 int R_DrawString_GL(
int x,
int y,
int flags,
size_t maxlen,
const char *s, qhandle_t font)
251 while (maxlen-- && *s) {
264 void Draw_Stringf(
int x,
int y,
const char *fmt, ...)
267 char buffer[MAX_STRING_CHARS];
272 va_start(argptr, fmt);
280 s = (
c & 15) * 0.0625f;
281 t = (
c >> 4) * 0.0625f;
284 s + 0.0625f, t + 0.0625f, U32_WHITE, r_charset);
289 void Draw_Stats(
void)
295 tmp = R_RegisterFont(
"conchars");
300 Draw_Stringf(x, y,
"Nodes visible : %i",
c.
nodesVisible); y += 10;
301 Draw_Stringf(x, y,
"Nodes culled : %i",
c.
nodesCulled); y += 10;
302 Draw_Stringf(x, y,
"Nodes drawn : %i",
c.
nodesDrawn); y += 10;
303 Draw_Stringf(x, y,
"Leaves drawn : %i",
c.
leavesDrawn); y += 10;
304 Draw_Stringf(x, y,
"Faces drawn : %i",
c.
facesDrawn); y += 10;
306 Draw_Stringf(x, y,
"Faces culled : %i",
c.
facesCulled); y += 10;
309 Draw_Stringf(x, y,
"Boxes culled : %i",
c.
boxesCulled); y += 10;
312 Draw_Stringf(x, y,
"Spheres culled : %i",
c.
spheresCulled); y += 10;
317 Draw_Stringf(x, y,
"Tris drawn : %i",
c.
trisDrawn); y += 10;
318 Draw_Stringf(x, y,
"Tex switches : %i",
c.
texSwitches); y += 10;
320 Draw_Stringf(x, y,
"Tex uploads : %i",
c.
texUploads); y += 10;
323 Draw_Stringf(x, y,
"Batches drawn: %i",
c.
batchesDrawn); y += 10;
332 void Draw_Lightmaps(
void)
340 0, 0, 1, 1, U32_WHITE,
lm.
texnums[i], 0);
344 void Draw_Scrap(
void)
347 0, 0, 1, 1, U32_WHITE,
TEXNUM_SCRAP, IF_PALETTED | IF_TRANSPARENT);