Go to the source code of this file.
|
void | Scrap_Upload (void) |
|
void | Draw_InitLocal (void) |
|
void | Draw_Char (int x, int y, int num) |
|
image_t * | Draw_FindPic (char *name) |
|
void | Draw_GetPicSize (int *w, int *h, char *pic) |
|
void | Draw_StretchPic (int x, int y, int w, int h, char *pic) |
|
void | Draw_Pic (int x, int y, char *pic) |
|
void | Draw_TileClear (int x, int y, int w, int h, char *pic) |
|
void | Draw_Fill (int x, int y, int w, int h, int c) |
|
void | Draw_FadeScreen (void) |
|
void | Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data) |
|
◆ Draw_Char()
Definition at line 56 of file gl_draw.c.
59 float frow, fcol, size;
63 if ( (num&127) == 32 )
81 qglTexCoord2f (fcol, frow);
83 qglTexCoord2f (fcol + size, frow);
84 qglVertex2f (
x+8*scale->
value,
y);
85 qglTexCoord2f (fcol + size, frow + size);
87 qglTexCoord2f (fcol, frow + size);
88 qglVertex2f (
x,
y+8*scale->
value);
◆ Draw_FadeScreen()
Definition at line 296 of file gl_draw.c.
298 qglEnable (GL_BLEND);
299 qglDisable (GL_TEXTURE_2D);
300 qglColor4f (0, 0, 0, 0.8);
309 qglColor4f (1,1,1,1);
310 qglEnable (GL_TEXTURE_2D);
311 qglDisable (GL_BLEND);
◆ Draw_Fill()
Definition at line 258 of file gl_draw.c.
266 if ( (
unsigned)c > 255)
269 qglDisable (GL_TEXTURE_2D);
272 qglColor3f (color.v[0]/255.0,
279 qglVertex2f (
x+
w,
y);
280 qglVertex2f (
x+
w,
y+h);
281 qglVertex2f (
x,
y+h);
285 qglEnable (GL_TEXTURE_2D);
◆ Draw_FindPic()
image_t* Draw_FindPic |
( |
char * |
name | ) |
|
◆ Draw_GetPicSize()
void Draw_GetPicSize |
( |
int * |
w, |
|
|
int * |
h, |
|
|
char * |
pic |
|
) |
| |
◆ Draw_InitLocal()
Definition at line 36 of file gl_draw.c.
41 qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
42 qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
◆ Draw_Pic()
Definition at line 179 of file gl_draw.c.
194 qglDisable (GL_ALPHA_TEST);
198 qglTexCoord2f (gl->
sl, gl->
tl);
200 qglTexCoord2f (gl->
sh, gl->
tl);
202 qglTexCoord2f (gl->
sh, gl->
th);
204 qglTexCoord2f (gl->
sl, gl->
th);
209 qglEnable (GL_ALPHA_TEST);
◆ Draw_StretchPic()
Definition at line 140 of file gl_draw.c.
155 qglDisable (GL_ALPHA_TEST);
159 qglTexCoord2f (gl->
sl, gl->
tl);
161 qglTexCoord2f (gl->
sh, gl->
tl);
162 qglVertex2f (
x+
w,
y);
163 qglTexCoord2f (gl->
sh, gl->
th);
164 qglVertex2f (
x+
w,
y+h);
165 qglTexCoord2f (gl->
sl, gl->
th);
166 qglVertex2f (
x,
y+h);
170 qglEnable (GL_ALPHA_TEST);
◆ Draw_StretchRaw()
Definition at line 325 of file gl_draw.c.
327 unsigned image32[256*256];
328 unsigned char image8[256*256];
348 t = rows*hscale / 256;
350 if ( !qglColorTableEXT )
354 for (
i=0 ;
i<trows ;
i++)
356 row = (
int)(
i*hscale);
359 source = data + cols*row;
360 dest = &image32[
i*256];
361 fracstep = cols*0x10000/256;
362 frac = fracstep >> 1;
363 for (
j=0 ;
j<256 ;
j++)
370 qglTexImage2D (GL_TEXTURE_2D, 0,
gl_tex_solid_format, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, image32);
376 for (
i=0 ;
i<trows ;
i++)
378 row = (
int)(
i*hscale);
381 source = data + cols*row;
382 dest = &image8[
i*256];
383 fracstep = cols*0x10000/256;
384 frac = fracstep >> 1;
385 for (
j=0 ;
j<256 ;
j++)
387 dest[
j] = source[frac>>16];
392 qglTexImage2D( GL_TEXTURE_2D,
401 qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
402 qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
405 qglDisable (GL_ALPHA_TEST);
408 qglTexCoord2f (0, 0);
410 qglTexCoord2f (1, 0);
411 qglVertex2f (
x+
w,
y);
412 qglTexCoord2f (1,
t);
413 qglVertex2f (
x+
w,
y+h);
414 qglTexCoord2f (0,
t);
415 qglVertex2f (
x,
y+h);
419 qglEnable (GL_ALPHA_TEST);
◆ Draw_TileClear()
Definition at line 220 of file gl_draw.c.
232 qglDisable (GL_ALPHA_TEST);
236 qglTexCoord2f (
x/64.0,
y/64.0);
238 qglTexCoord2f ( (
x+
w)/64.0,
y/64.0);
239 qglVertex2f (
x+
w,
y);
240 qglTexCoord2f ( (
x+
w)/64.0, (
y+h)/64.0);
241 qglVertex2f (
x+
w,
y+h);
242 qglTexCoord2f (
x/64.0, (
y+h)/64.0 );
243 qglVertex2f (
x,
y+h);
247 qglEnable (GL_ALPHA_TEST);
◆ Scrap_Upload()
◆ draw_chars
◆ r_rawpalette
unsigned r_rawpalette[256] |
◆ scrap_dirty