Merge branch 'mesa_7_5_branch'
[mesa.git] / src / gallium / auxiliary / draw / draw_pt_elts.c
index 02fb6d9f41db8c4191fdf3730f3d0c33c80b8961..b7780fb5073c5bb68cf5600ae1130bb8dfd89787 100644 (file)
@@ -30,8 +30,8 @@
   *   Keith Whitwell <keith@tungstengraphics.com>
   */
 
-#include "draw/draw_private.h"
 #include "draw/draw_pt.h"
+#include "draw/draw_private.h"
 
 /* Neat get_elt func that also works for varrays drawing by encoding
  * the start value into a pointer.  
@@ -59,11 +59,11 @@ static unsigned elt_vert( const void *elts, unsigned idx )
 
 pt_elt_func draw_pt_elt_func( struct draw_context *draw )
 {
-   switch (draw->user.eltSize) {
-   case 0: return elt_vert;
-   case 1: return elt_ubyte;
-   case 2: return elt_ushort; 
-   case 4: return elt_uint;
+   switch (draw->pt.user.eltSize) {
+   case 0: return &elt_vert;
+   case 1: return &elt_ubyte;
+   case 2: return &elt_ushort; 
+   case 4: return &elt_uint;
    default: return NULL;
    }
 }     
@@ -71,9 +71,9 @@ pt_elt_func draw_pt_elt_func( struct draw_context *draw )
 const void *draw_pt_elt_ptr( struct draw_context *draw,
                              unsigned start )
 {
-   const char *elts = draw->user.elts;
+   const char *elts = draw->pt.user.elts;
 
-   switch (draw->user.eltSize) {
+   switch (draw->pt.user.eltSize) {
    case 0: 
       return (const void *)(((const ubyte *)NULL) + start);
    case 1: