mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
Add QSG2 colormod, alpha, and scale for sprites. Probably not used by anything, but there you go.
This commit is contained in:
parent
32215b1296
commit
0bce2d0f2e
1 changed files with 7 additions and 1 deletions
|
@ -83,10 +83,10 @@ R_GetSpriteFrame (entity_t *currententity)
|
|||
return pspriteframe;
|
||||
}
|
||||
|
||||
// FIXME: add modelalpha support?
|
||||
void
|
||||
R_DrawSpriteModel (entity_t *e)
|
||||
{
|
||||
float color[4];
|
||||
float *up, *right;
|
||||
msprite_t *psprite;
|
||||
mspriteframe_t *frame;
|
||||
|
@ -110,11 +110,17 @@ R_DrawSpriteModel (entity_t *e)
|
|||
up = vup;
|
||||
right = vright;
|
||||
}
|
||||
VectorScale (up, e->scale, up);
|
||||
VectorScale (right, e->scale, right);
|
||||
|
||||
qfglBindTexture (GL_TEXTURE_2D, frame->gl_texturenum);
|
||||
|
||||
qfglBegin (GL_QUADS);
|
||||
|
||||
VectorCopy (e->colormod, color);
|
||||
color[3] = e->alpha;
|
||||
qfglColor4fv (color);
|
||||
|
||||
qfglTexCoord2f (0, 1);
|
||||
VectorMA (e->origin, frame->down, up, point);
|
||||
VectorMA (point, frame->left, right, point);
|
||||
|
|
Loading…
Reference in a new issue