diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-09-07 17:17:11 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2009-09-12 20:55:55 +0800 |
commit | 5bcfe4b5c81f850d68d3100b8bcd2f2b74a258a6 (patch) | |
tree | d1c1ece6503be0d2e23d5e20d1c554964997855d /src/mesa/main/colortab.h | |
parent | 57377d5d69ecdf03e4fa2ef44dfbb7fb37f3f799 (diff) |
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.h | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/mesa/main/colortab.h b/src/mesa/main/colortab.h index b6ff737a65..ec28ceca9d 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, @@ -67,6 +74,19 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ); extern void GLAPIENTRY _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ); +extern void +_mesa_init_colortable_dispatch(struct _glapi_table *disp); + +#else /* FEATURE_colortable */ + +#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) do { } while (0) + +static INLINE void +_mesa_init_colortable_dispatch(struct _glapi_table *disp) +{ +} + +#endif /* FEATURE_colortable */ extern void @@ -81,20 +101,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 */ |