summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/colortab.h
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-09-07 17:17:11 +0800
committerBrian Paul <brianp@vmware.com>2009-09-24 21:48:22 -0600
commitcb4f24e51d0f4f4b867b2c01ed26d2a5ce73aeab (patch)
tree8814ee8b9722cf1e8bdaa28f87ddb99acad1a5d7 /src/mesa/main/colortab.h
parentdbb8fb8de9a9deca0ae22015e4680f4e631d6d32 (diff)
downloadexternal_mesa3d-cb4f24e51d0f4f4b867b2c01ed26d2a5ce73aeab.zip
external_mesa3d-cb4f24e51d0f4f4b867b2c01ed26d2a5ce73aeab.tar.gz
external_mesa3d-cb4f24e51d0f4f4b867b2c01ed26d2a5ce73aeab.tar.bz2
mesa/main: Make FEATURE_colortable follow feature conventions.
As shown in mfeatures.h, this allows users of colortab.h to work without knowing if the feature is available.
Diffstat (limited to 'src/mesa/main/colortab.h')
-rw-r--r--src/mesa/main/colortab.h71
1 files changed, 33 insertions, 38 deletions
diff --git a/src/mesa/main/colortab.h b/src/mesa/main/colortab.h
index b6ff737..652fb58 100644
--- a/src/mesa/main/colortab.h
+++ b/src/mesa/main/colortab.h
@@ -27,9 +27,16 @@
#define COLORTAB_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
+#if FEATURE_colortable
+
+#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->CopyColorTable = impl ## CopyColorTable; \
+ (driver)->CopyColorSubTable = impl ## CopyColorSubTable; \
+ (driver)->UpdateTexturePalette = impl ## UpdateTexturePalette; \
+ } while (0)
extern void GLAPIENTRY
_mesa_ColorTable( GLenum target, GLenum internalformat,
@@ -41,32 +48,35 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
GLsizei count, GLenum format, GLenum type,
const GLvoid *table );
-extern void GLAPIENTRY
-_mesa_CopyColorSubTable(GLenum target, GLsizei start,
- GLint x, GLint y, GLsizei width);
-
-extern void GLAPIENTRY
-_mesa_CopyColorTable(GLenum target, GLenum internalformat,
- GLint x, GLint y, GLsizei width);
+extern void
+_mesa_init_colortable_dispatch(struct _glapi_table *disp);
-extern void GLAPIENTRY
-_mesa_GetColorTable( GLenum target, GLenum format,
- GLenum type, GLvoid *table );
+#else /* FEATURE_colortable */
-extern void GLAPIENTRY
-_mesa_ColorTableParameterfv(GLenum target, GLenum pname,
- const GLfloat *params);
+#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) do { } while (0)
-extern void GLAPIENTRY
-_mesa_ColorTableParameteriv(GLenum target, GLenum pname,
- const GLint *params);
+static INLINE void GLAPIENTRY
+_mesa_ColorTable( GLenum target, GLenum internalformat,
+ GLsizei width, GLenum format, GLenum type,
+ const GLvoid *table )
+{
+ ASSERT_NO_FEATURE();
+}
-extern void GLAPIENTRY
-_mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params );
+static INLINE void GLAPIENTRY
+_mesa_ColorSubTable( GLenum target, GLsizei start,
+ GLsizei count, GLenum format, GLenum type,
+ const GLvoid *table )
+{
+ ASSERT_NO_FEATURE();
+}
-extern void GLAPIENTRY
-_mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params );
+static INLINE void
+_mesa_init_colortable_dispatch(struct _glapi_table *disp)
+{
+}
+#endif /* FEATURE_colortable */
extern void
@@ -81,20 +91,5 @@ _mesa_init_colortables( GLcontext *ctx );
extern void
_mesa_free_colortables_data( GLcontext *ctx );
-#else
-
-/** No-op */
-#define _mesa_init_colortable( p ) ((void) 0)
-
-/** No-op */
-#define _mesa_free_colortable_data( p ) ((void) 0)
-
-/** No-op */
-#define _mesa_init_colortables( p ) ((void)0)
-
-/** No-op */
-#define _mesa_free_colortables_data( p ) ((void)0)
-
-#endif
-#endif
+#endif /* COLORTAB_H */