1
0
Fork 0
forked from fte/fteqw

gl_blendsprites hack added

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1245 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-08-23 23:36:04 +00:00
parent ba4e46bf9f
commit bc6d871f37
2 changed files with 4 additions and 1 deletions

View file

@ -164,6 +164,7 @@ cvar_t gl_shadeq1 = {"gl_shadeq1", "0", NULL, CVAR_CHEAT}; //FIXME: :(
cvar_t gl_shadeq1_name = {"gl_shadeq1_name", "*"}; cvar_t gl_shadeq1_name = {"gl_shadeq1_name", "*"};
cvar_t gl_blend2d = {"gl_blend2d", "0"}; cvar_t gl_blend2d = {"gl_blend2d", "0"};
cvar_t gl_blendsprites = {"gl_blendsprites", "0"};
#endif #endif
cvar_t r_bloodstains = {"r_bloodstains", "1"}; cvar_t r_bloodstains = {"r_bloodstains", "1"};
@ -335,6 +336,7 @@ void GLRenderer_Init(void)
Cvar_Register (&gl_shadeq3, GLRENDEREROPTIONS); Cvar_Register (&gl_shadeq3, GLRENDEREROPTIONS);
Cvar_Register (&gl_blend2d, GLRENDEREROPTIONS); Cvar_Register (&gl_blend2d, GLRENDEREROPTIONS);
Cvar_Register (&gl_blendsprites, GLRENDEREROPTIONS);
#endif #endif
} }
#endif #endif

View file

@ -130,6 +130,7 @@ extern cvar_t gl_ati_truform;
extern cvar_t gl_ati_truform_type; extern cvar_t gl_ati_truform_type;
extern cvar_t gl_ati_truform_tesselation; extern cvar_t gl_ati_truform_tesselation;
extern cvar_t gl_blendsprites;
#ifdef R_XFLIP #ifdef R_XFLIP
cvar_t r_xflip = {"leftisright", "0"}; cvar_t r_xflip = {"leftisright", "0"};
@ -530,7 +531,7 @@ void R_DrawSpriteModel (entity_t *e)
qglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); qglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
qglBlendFunc(GL_SRC_ALPHA, GL_ONE); qglBlendFunc(GL_SRC_ALPHA, GL_ONE);
} }
else if (e->alpha<1) else if (e->alpha<1 || gl_blendsprites.value)
{ {
qglEnable(GL_BLEND); qglEnable(GL_BLEND);
qglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); qglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);