mesa: Add the basics for the NV_fog_distance extension
[mesa.git] / src / mesa / main / matrix.c
index 56973661cea8f0d37ba4ef28f853e3270258c319..f479a22b07395363a1c3987d8cf8e4d6b5d974e5 100644 (file)
@@ -776,7 +776,7 @@ void _mesa_init_transform( struct gl_context *ctx )
    ctx->Transform.Normalize = GL_FALSE;
    ctx->Transform.RescaleNormals = GL_FALSE;
    ctx->Transform.RasterPositionUnclipped = GL_FALSE;
-   for (i=0;i<MAX_CLIP_PLANES;i++) {
+   for (i=0;i<ctx->Const.MaxClipPlanes;i++) {
       ASSIGN_4V( ctx->Transform.EyeUserPlane[i], 0.0, 0.0, 0.0, 0.0 );
    }
    ctx->Transform.ClipPlanesEnabled = 0;