summaryrefslogtreecommitdiff
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-09-08 10:15:06 +0800
committerChia-I Wu <olvaffe@gmail.com>2009-09-12 20:55:56 +0800
commit8df670164f9bd735a6212741c0178899d3462e0c (patch)
treebf5f5eeb65a9b8b6cd16b8ad562863b62f7b356e /src/mesa/main/drawpix.c
parent940b525a5acb1926cbd8b39594ecda3e614a3c2f (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.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index aef6585641..f7ce64fd7c 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,8 +50,6 @@ valid_fragment_program(GLcontext *ctx)
}
-#if _HAVE_FULL_GL
-
/*
* Execute glDrawPixels
*/
@@ -225,9 +226,6 @@ end:
_mesa_set_vp_override(ctx, GL_FALSE);
}
-#endif /* _HAVE_FULL_GL */
-
-
void GLAPIENTRY
_mesa_Bitmap( GLsizei width, GLsizei height,
@@ -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 */