summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2003-07-17 13:43:59 +0000
committerKeith Whitwell <[email protected]>2003-07-17 13:43:59 +0000
commit6dc85575000127630489b407c50a4b3ea87c9acb (patch)
treec79b24b7059577caf8201eeb7a42a6890721f52b /src/mesa/main/enable.c
parent44c699949ac09459771304a8aec8f2fc622057fb (diff)
Merge Jose's documentation and core Mesa changes from embedded branch
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c71
1 files changed, 67 insertions, 4 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 747c3f63c1b..de08fa35135 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,3 +1,8 @@
+/**
+ * \file enable.c
+ * Enable/disable/query GL capabilities.
+ */
+
/*
* Mesa 3-D graphics library
* Version: 5.1
@@ -135,7 +140,16 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
}
-
+/**
+ * Enable GL capability.
+ *
+ * \param cap capability.
+ *
+ * \sa glEnable().
+ *
+ * Get's the current context, assures that we're outside glBegin()/glEnd() and
+ * calls client_state().
+ */
void
_mesa_EnableClientState( GLenum cap )
{
@@ -145,7 +159,16 @@ _mesa_EnableClientState( GLenum cap )
}
-
+/**
+ * Disable GL capability.
+ *
+ * \param cap capability.
+ *
+ * \sa glDisable().
+ *
+ * Get's the current context, assures that we're outside glBegin()/glEnd() and
+ * calls client_state().
+ */
void
_mesa_DisableClientState( GLenum cap )
{
@@ -164,8 +187,17 @@ _mesa_DisableClientState( GLenum cap )
}
-/*
- * Perform glEnable and glDisable calls.
+/**
+ * Perform glEnable() and glDisable() calls.
+ *
+ * \param ctx GL context.
+ * \param cap capability.
+ * \param state whether to enable or disable the specified capability.
+ *
+ * Updates the current context and flushes the vertices as needed. For
+ * capabilities associated with extensions it verifies that those extensions
+ * are effectivly present before updating. Notifies the driver via
+ * dd_function_table::Enable.
*/
void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
{
@@ -197,6 +229,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Color.ColorLogicOpEnabled =
(ctx->Color.BlendEquation == GL_LOGIC_OP && state);
break;
+#if FEATURE_userclip
case GL_CLIP_PLANE0:
case GL_CLIP_PLANE1:
case GL_CLIP_PLANE2:
@@ -230,6 +263,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
}
}
break;
+#endif
case GL_COLOR_MATERIAL:
if (ctx->Light.ColorMaterialEnabled == state)
return;
@@ -949,6 +983,16 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
}
+/**
+ * Enable GL capability.
+ *
+ * \param cap capability.
+ *
+ * \sa glEnable().
+ *
+ * Get's the current context, assures that we're outside glBegin()/glEnd() and
+ * calls _mesa_set_enable().
+ */
void
_mesa_Enable( GLenum cap )
{
@@ -959,6 +1003,16 @@ _mesa_Enable( GLenum cap )
}
+/**
+ * Disable GL capability.
+ *
+ * \param cap capability.
+ *
+ * \sa glDisable().
+ *
+ * Get's the current context, assures that we're outside glBegin()/glEnd() and
+ * calls _mesa_set_enable().
+ */
void
_mesa_Disable( GLenum cap )
{
@@ -977,6 +1031,15 @@ _mesa_Disable( GLenum cap )
}
+/**
+ * Test whether a capability is enabled.
+ *
+ * \param cap capability.
+ *
+ * Returns the state of the specified capability from the current GL context.
+ * For the capabilities associated with extensions verifies that those
+ * extensions are effectively present before reporting.
+ */
GLboolean
_mesa_IsEnabled( GLenum cap )
{