typedef struct gltextureunit_s
{
- unsigned int t1d, t2d, t3d, tcubemap;
- unsigned int arrayenabled;
+ int t1d, t2d, t3d, tcubemap;
+ int arrayenabled;
float rgbscale, alphascale;
int combinergb, combinealpha;
// FIXME: add more combine stuff
qglClearDepth(1);CHECKGLERROR
if (gl_stencil)
{
- qglClearStencil(0);CHECKGLERROR
+ // LordHavoc: we use a stencil centered around 128 instead of 0,
+ // to avoid clamping interfering with strange shadow volume
+ // drawing orders
+ qglClearStencil(128);CHECKGLERROR
}
// clear the screen
qglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | (gl_stencil ? GL_STENCIL_BUFFER_BIT : 0));CHECKGLERROR