aboutsummaryrefslogtreecommitdiffstats
path: root/code/renderer/tr_shadows.c
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-27 17:32:14 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-04-27 17:32:14 +0000
commita1757f0abe8b9780d4c85415bc0fc9af1af31ff2 (patch)
treea84aba4e58244abb55e324cda0fdd04774ce1cca /code/renderer/tr_shadows.c
parent7eec87380d6b4bbf0ffa4f8ea258b8853c0428bc (diff)
downloadioquake3-aero-a1757f0abe8b9780d4c85415bc0fc9af1af31ff2.tar.gz
ioquake3-aero-a1757f0abe8b9780d4c85415bc0fc9af1af31ff2.zip
- Implement stereo rendering with anaglyph images.
- Add r_greyscale for black&white rendering git-svn-id: svn://svn.icculus.org/quake3/trunk@1328 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/renderer/tr_shadows.c')
-rw-r--r--code/renderer/tr_shadows.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/code/renderer/tr_shadows.c b/code/renderer/tr_shadows.c
index 1162c8f..f412b00 100644
--- a/code/renderer/tr_shadows.c
+++ b/code/renderer/tr_shadows.c
@@ -155,6 +155,7 @@ void RB_ShadowTessEnd( void ) {
int i;
int numTris;
vec3_t lightDir;
+ GLboolean rgba[4];
// we can only do this if we have enough space in the vertex buffers
if ( tess.numVertexes >= SHADER_MAX_VERTEXES / 2 ) {
@@ -215,6 +216,7 @@ void RB_ShadowTessEnd( void ) {
qglColor3f( 0.2f, 0.2f, 0.2f );
// don't write to the color buffer
+ qglGetBooleanv(GL_COLOR_WRITEMASK, rgba);
qglColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE );
qglEnable( GL_STENCIL_TEST );
@@ -245,7 +247,7 @@ void RB_ShadowTessEnd( void ) {
// reenable writing to the color buffer
- qglColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
+ qglColorMask(rgba[0], rgba[1], rgba[2], rgba[3]);
}