draw: corrections to allow for different cliptest cases
[mesa.git] / src / mesa / main / drawpix.c
index aef6585641ed73478484ec60049c0fec89b3ce47..bf36a7e7a49823349c529729ddf5e7fe4b4d5761 100644 (file)
 #include "enums.h"
 #include "feedback.h"
 #include "framebuffer.h"
-#include "image.h"
 #include "readpix.h"
 #include "state.h"
+#include "main/dispatch.h"
 
 
+#if FEATURE_drawpix
+
 
 /**
  * If a fragment program is enabled, check that it's valid.
@@ -47,12 +49,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 )
 {
@@ -127,7 +127,6 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
       _mesa_feedback_vertex( ctx,
                              ctx->Current.RasterPos,
                              ctx->Current.RasterColor,
-                             ctx->Current.RasterIndex,
                              ctx->Current.RasterTexCoords[0] );
    }
    else {
@@ -140,7 +139,7 @@ end:
 }
 
 
-void GLAPIENTRY
+static void GLAPIENTRY
 _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
                   GLenum type )
 {
@@ -213,7 +212,6 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
       _mesa_feedback_vertex( ctx, 
                              ctx->Current.RasterPos,
                              ctx->Current.RasterColor,
-                             ctx->Current.RasterIndex,
                              ctx->Current.RasterTexCoords[0] );
    }
    else {
@@ -225,11 +223,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 )
@@ -296,7 +291,6 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
       _mesa_feedback_vertex( ctx,
                              ctx->Current.RasterPos,
                              ctx->Current.RasterColor,
-                             ctx->Current.RasterIndex, 
                              ctx->Current.RasterTexCoords[0] );
    }
    else {
@@ -309,3 +303,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 */