by revelator » Sun Oct 03, 2010 7:44 pm
found it.
/*=============
Draw_Pic
=============*/
void Draw_Pic (int x, int y, qpic_t *pic, float alpha)
{
byte *dest, *source;
unsigned short *pusdest;
int v, u;
glpic_t *gl;
if (scrap_dirty)
Scrap_Upload ();
gl = (glpic_t *)pic->data;
glEnable (GL_BLEND);
glColor4f (1,1,1,alpha);
GL_Bind (gl->texnum);
glBegin (GL_QUADS);
glTexCoord2f (gl->sl, gl->tl);
glVertex2f (x, y);
glTexCoord2f (gl->sh, gl->tl);
glVertex2f (x+pic->width, y);
glTexCoord2f (gl->sh, gl->th);
glVertex2f (x+pic->width, y+pic->height);
glTexCoord2f (gl->sl, gl->th);
glVertex2f (x, y+pic->height);
glEnd ();
glColor4f (1,1,1,1);
glDisable (GL_BLEND);
}[/code]
Last edited by
revelator on Sun Oct 03, 2010 7:51 pm, edited 1 time in total.