aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2009-09-08 10:15:06 +0800
committerBrian Paul <[email protected]>2009-09-30 08:31:55 -0600
commit67a2a4e901367418a5c28e7b0963bf9c0c4762ba (patch)
tree0a0093e0a73644c7f2f2b4fb38eb69dd3b9edc9a /src/mesa/main/drawpix.c
parentd25080074f2da1ebc47cdfb5c3491740a57ec03f (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.c')
-rw-r--r--src/mesa/main/drawpix.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index aef6585641e..5d4b53af4cb 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -33,8 +33,11 @@
#include "image.h"
#include "readpix.h"
#include "state.h"
+#include "glapi/dispatch.h"
+#if FEATURE_drawpix
+
/**
* If a fragment program is enabled, check that it's valid.
@@ -47,12 +50,10 @@ valid_fragment_program(GLcontext *ctx)
}
-#if _HAVE_FULL_GL
-
/*
* Execute glDrawPixels
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_DrawPixels( GLsizei width, GLsizei height,
GLenum format, GLenum type, const GLvoid *pixels )
{
@@ -140,7 +141,7 @@ end:
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
GLenum type )
{
@@ -225,11 +226,8 @@ end:
_mesa_set_vp_override(ctx, GL_FALSE);
}
-#endif /* _HAVE_FULL_GL */
-
-
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Bitmap( GLsizei width, GLsizei height,
GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove,
const GLubyte *bitmap )
@@ -309,3 +307,15 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
ctx->Current.RasterPos[0] += xmove;
ctx->Current.RasterPos[1] += ymove;
}
+
+
+void
+_mesa_init_drawpix_dispatch(struct _glapi_table *disp)
+{
+ SET_Bitmap(disp, _mesa_Bitmap);
+ SET_CopyPixels(disp, _mesa_CopyPixels);
+ SET_DrawPixels(disp, _mesa_DrawPixels);
+}
+
+
+#endif /* FEATURE_drawpix */