diff options
| author | Chia-I Wu <olvaffe@gmail.com> | 2009-09-08 10:15:06 +0800 |
|---|---|---|
| committer | Chia-I Wu <olvaffe@gmail.com> | 2009-09-12 20:55:56 +0800 |
| commit | 8df670164f9bd735a6212741c0178899d3462e0c (patch) | |
| tree | bf5f5eeb65a9b8b6cd16b8ad562863b62f7b356e /src/mesa/main/drawpix.h | |
| parent | 940b525a5acb1926cbd8b39594ecda3e614a3c2f (diff) | |
mesa/main: Make FEATURE_drawpix follow feature conventions.
As shown in mfeatures.h, this allows users of drawpix.h to work
without knowing if the feature is available.
Diffstat (limited to 'src/mesa/main/drawpix.h')
| -rw-r--r-- | src/mesa/main/drawpix.h | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/mesa/main/drawpix.h b/src/mesa/main/drawpix.h index 6177adad6d..01564b3ed7 100644 --- a/src/mesa/main/drawpix.h +++ b/src/mesa/main/drawpix.h @@ -22,13 +22,21 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifndef DRAWPIX_H +#define DRAWPIX_H -#ifndef DRAWPIXELS_H -#define DRAWPIXELS_H +#include "main/mtypes.h" -#include "main/glheader.h" +#if FEATURE_drawpix + +#define _MESA_INIT_DRAWPIX_FUNCTIONS(driver, impl) \ + do { \ + (driver)->DrawPixels = impl ## DrawPixels; \ + (driver)->CopyPixels = impl ## CopyPixels; \ + (driver)->Bitmap = impl ## Bitmap; \ + } while (0) extern void GLAPIENTRY _mesa_DrawPixels( GLsizei width, GLsizei height, @@ -45,5 +53,19 @@ _mesa_Bitmap( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap ); +extern void +_mesa_init_drawpix_dispatch(struct _glapi_table *disp); + +#else /* FEATURE_drawpix */ + +#define _MESA_INIT_DRAWPIX_FUNCTIONS(driver, impl) do { } while (0) + +static INLINE void +_mesa_init_drawpix_dispatch(struct _glapi_table *disp) +{ +} + +#endif /* FEATURE_drawpix */ + -#endif +#endif /* DRAWPIX_H */ |
