summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/enable.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index e1293f9bf1e..18a288d35c2 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -361,8 +361,13 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
if (state) {
ctx->Transform.ClipPlanesEnabled |= (1 << p);
- if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES)
+
+ /* The projection matrix transforms the clip plane. */
+ /* TODO: glEnable might not be the best place to do it. */
+ if (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) {
_mesa_update_clip_plane(ctx, p);
+ ctx->NewDriverState |= ctx->DriverFlags.NewClipPlane;
+ }
}
else {
ctx->Transform.ClipPlanesEnabled &= ~(1 << p);