summaryrefslogtreecommitdiff
path: root/src/mesa/main/pixel.c
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-09-07 16:59:27 +0800
committerBrian Paul <brianp@vmware.com>2009-09-24 21:48:05 -0600
commitdbb8fb8de9a9deca0ae22015e4680f4e631d6d32 (patch)
treee89ee4868282337b96a599c5bc8d3a13e04d2e09 /src/mesa/main/pixel.c
parent17099f5e19dc0ce65cb4e4110d9d22de803c4e52 (diff)
mesa/main: Make FEATURE_pixel_transfer follow feature conventions.
As shown in mfeatures.h, this allows users of pixel.h to work without knowing if the feature is available.
Diffstat (limited to 'src/mesa/main/pixel.c')
-rw-r--r--src/mesa/main/pixel.c40
1 files changed, 31 insertions, 9 deletions
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index fcef6dfd42..3820ebd889 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -36,13 +36,17 @@
#include "macros.h"
#include "pixel.h"
#include "mtypes.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_pixel_transfer
/**********************************************************************/
/***** glPixelZoom *****/
/**********************************************************************/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor )
{
GET_CURRENT_CONTEXT(ctx);
@@ -163,7 +167,7 @@ validate_pbo_access(GLcontext *ctx, struct gl_pixelstore_attrib *pack,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values )
{
GET_CURRENT_CONTEXT(ctx);
@@ -205,7 +209,7 @@ _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values )
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
@@ -261,7 +265,7 @@ _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values )
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
@@ -317,7 +321,7 @@ _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetPixelMapfv( GLenum map, GLfloat *values )
{
GET_CURRENT_CONTEXT(ctx);
@@ -362,7 +366,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetPixelMapuiv( GLenum map, GLuint *values )
{
GET_CURRENT_CONTEXT(ctx);
@@ -406,7 +410,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetPixelMapusv( GLenum map, GLushort *values )
{
GET_CURRENT_CONTEXT(ctx);
@@ -468,7 +472,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values )
* Implements glPixelTransfer[fi] whether called immediately or from a
* display list.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelTransferf( GLenum pname, GLfloat param )
{
GET_CURRENT_CONTEXT(ctx);
@@ -662,7 +666,7 @@ _mesa_PixelTransferf( GLenum pname, GLfloat param )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelTransferi( GLenum pname, GLint param )
{
_mesa_PixelTransferf( pname, (GLfloat) param );
@@ -756,6 +760,24 @@ void _mesa_update_pixel( GLcontext *ctx, GLuint new_state )
}
+void
+_mesa_init_pixel_dispatch(struct _glapi_table *disp)
+{
+ SET_GetPixelMapfv(disp, _mesa_GetPixelMapfv);
+ SET_GetPixelMapuiv(disp, _mesa_GetPixelMapuiv);
+ SET_GetPixelMapusv(disp, _mesa_GetPixelMapusv);
+ SET_PixelMapfv(disp, _mesa_PixelMapfv);
+ SET_PixelMapuiv(disp, _mesa_PixelMapuiv);
+ SET_PixelMapusv(disp, _mesa_PixelMapusv);
+ SET_PixelTransferf(disp, _mesa_PixelTransferf);
+ SET_PixelTransferi(disp, _mesa_PixelTransferi);
+ SET_PixelZoom(disp, _mesa_PixelZoom);
+}
+
+
+#endif /* FEATURE_pixel_transfer */
+
+
/**********************************************************************/
/***** Initialization *****/
/**********************************************************************/