mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Fence textures: also support on world polys. From Fitzquake Mark V
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@972 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
342c135a12
commit
f292a594b3
1 changed files with 14 additions and 0 deletions
|
@ -368,6 +368,10 @@ void R_DrawTextureChains_Multitexture (void)
|
|||
if (!bound) //only bind once we are sure we need this texture
|
||||
{
|
||||
GL_Bind ((R_TextureAnimation(t,0))->gltexture);
|
||||
|
||||
if (t->texturechain->flags & SURF_DRAWFENCE)
|
||||
glEnable (GL_ALPHA_TEST); // Flip alpha test back on
|
||||
|
||||
GL_EnableMultitexture(); // selects TEXTURE1
|
||||
bound = true;
|
||||
}
|
||||
|
@ -385,6 +389,9 @@ void R_DrawTextureChains_Multitexture (void)
|
|||
rs_brushpasses++;
|
||||
}
|
||||
GL_DisableMultitexture(); // selects TEXTURE0
|
||||
|
||||
if (bound && t->texturechain->flags & SURF_DRAWFENCE)
|
||||
glDisable (GL_ALPHA_TEST); // Flip alpha test back off
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,12 +459,19 @@ void R_DrawTextureChains_TextureOnly (void)
|
|||
if (!bound) //only bind once we are sure we need this texture
|
||||
{
|
||||
GL_Bind ((R_TextureAnimation(t,0))->gltexture);
|
||||
|
||||
if (t->texturechain->flags & SURF_DRAWFENCE)
|
||||
glEnable (GL_ALPHA_TEST); // Flip alpha test back on
|
||||
|
||||
bound = true;
|
||||
}
|
||||
R_RenderDynamicLightmaps (s); //adds to lightmap chain
|
||||
DrawGLPoly (s->polys);
|
||||
rs_brushpasses++;
|
||||
}
|
||||
|
||||
if (bound && t->texturechain->flags & SURF_DRAWFENCE)
|
||||
glDisable (GL_ALPHA_TEST); // Flip alpha test back off
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue