From bc6d871f37c38fc7645073ba346412b89e1cccf1 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Tue, 23 Aug 2005 23:36:04 +0000 Subject: [PATCH] gl_blendsprites hack added git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1245 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/renderer.c | 2 ++ engine/gl/gl_rmain.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/client/renderer.c b/engine/client/renderer.c index 5aa3c37af..f066c4a13 100644 --- a/engine/client/renderer.c +++ b/engine/client/renderer.c @@ -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_blend2d = {"gl_blend2d", "0"}; +cvar_t gl_blendsprites = {"gl_blendsprites", "0"}; #endif cvar_t r_bloodstains = {"r_bloodstains", "1"}; @@ -335,6 +336,7 @@ void GLRenderer_Init(void) Cvar_Register (&gl_shadeq3, GLRENDEREROPTIONS); Cvar_Register (&gl_blend2d, GLRENDEREROPTIONS); + Cvar_Register (&gl_blendsprites, GLRENDEREROPTIONS); #endif } #endif diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index 5eab890bb..1fc71edd3 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -130,6 +130,7 @@ extern cvar_t gl_ati_truform; extern cvar_t gl_ati_truform_type; extern cvar_t gl_ati_truform_tesselation; +extern cvar_t gl_blendsprites; #ifdef R_XFLIP 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); qglBlendFunc(GL_SRC_ALPHA, GL_ONE); } - else if (e->alpha<1) + else if (e->alpha<1 || gl_blendsprites.value) { qglEnable(GL_BLEND); qglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);