summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-09-09 15:10:36 -0700
committerEric Anholt <eric@anholt.net>2009-09-09 15:10:36 -0700
commitf1c2b054c29bebed6adc4518d201e12c0ba75e02 (patch)
tree8ff8123dad4b2623494c3b3d63817d296dace68f
parentbe79a9396d65cb5cfbba969301b241a3b8fa7e73 (diff)
draw/readbuffer state is part of the fbo, so no need to reset it per frame.
-rw-r--r--shadow_map.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/shadow_map.c b/shadow_map.c
index c02d71e..647b9a4 100644
--- a/shadow_map.c
+++ b/shadow_map.c
@@ -157,6 +157,8 @@ generate_rings_shadowmap(void)
GL_TEXTURE_2D,
shadow_tex,
0);
+ glDrawBuffer(GL_NONE);
+ glReadBuffer(GL_NONE);
first_time = GL_TRUE;
}
@@ -164,8 +166,6 @@ generate_rings_shadowmap(void)
glBindFramebuffer(GL_FRAMEBUFFER_EXT, shadow_fbo);
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
- glDrawBuffer(GL_NONE);
- glReadBuffer(GL_NONE);
/* Move the faces away from the light, so that if they're compared
* for being lit, they'll tend to pass.
*/
@@ -195,8 +195,6 @@ generate_rings_shadowmap(void)
}
glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);
- glDrawBuffer(GL_BACK);
- glReadBuffer(GL_BACK);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDisable(GL_POLYGON_OFFSET_FILL);