summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2009-09-07 18:20:10 +0800
committerBrian Paul <[email protected]>2009-09-30 08:31:55 -0600
commit2b36db496d34c60a3f987fa88d52bf5684713240 (patch)
tree81ff6b06ceda9744b7959a907be75bac616067a0 /src/mesa/main/attrib.h
parenta833ff0f53da6e365d917bb0081d909a809b6ec1 (diff)
mesa/main: Make FEATURE_attrib_stack follow feature conventions.
As shown in mfeatures.h, this allows users of attrib.h to work without knowing if the feature is available.
Diffstat (limited to 'src/mesa/main/attrib.h')
-rw-r--r--src/mesa/main/attrib.h38
1 files changed, 27 insertions, 11 deletions
diff --git a/src/mesa/main/attrib.h b/src/mesa/main/attrib.h
index 2cf8fe69345..6b48a176630 100644
--- a/src/mesa/main/attrib.h
+++ b/src/mesa/main/attrib.h
@@ -26,10 +26,10 @@
#define ATTRIB_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
+#if FEATURE_attrib_stack
extern void GLAPIENTRY
_mesa_PushAttrib( GLbitfield mask );
@@ -43,18 +43,34 @@ _mesa_PushClientAttrib( GLbitfield mask );
extern void GLAPIENTRY
_mesa_PopClientAttrib( void );
+extern void
+_mesa_init_attrib_dispatch(struct _glapi_table *disp);
+
+#else /* FEATURE_attrib_stack */
+
+static INLINE void
+_mesa_PushClientAttrib( GLbitfield mask )
+{
+ ASSERT_NO_FEATURE();
+}
+
+static INLINE void
+_mesa_PopClientAttrib( void )
+{
+ ASSERT_NO_FEATURE();
+}
+
+static INLINE void
+_mesa_init_attrib_dispatch(struct _glapi_table *disp)
+{
+}
+
+#endif /* FEATURE_attrib_stack */
+
extern void
_mesa_init_attrib( GLcontext *ctx );
extern void
_mesa_free_attrib_data( GLcontext *ctx );
-#else
-
-/** No-op */
-#define _mesa_init_attrib( c ) ((void)0)
-#define _mesa_free_attrib_data( c ) ((void)0)
-
-#endif
-
-#endif
+#endif /* ATTRIB_H */