Drop old (pre-AIGLX) GLcore interface.
[mesa.git] / src / mesa / swrast / s_stencil.c
index effe4a6a52fc1201fee1988e28b7434f1c043bbc..dbab6b3c20bc7c5857a92744e3f846077c1e3762 100644 (file)
@@ -406,7 +406,7 @@ do_stencil_test( GLcontext *ctx, GLuint face, GLuint n, GLstencil stencil[],
  *
  */
 static GLboolean
-stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span, GLuint face)
+stencil_and_ztest_span(GLcontext *ctx, SWspan *span, GLuint face)
 {
    struct gl_framebuffer *fb = ctx->DrawBuffer;
    struct gl_renderbuffer *rb = fb->_StencilBuffer;
@@ -426,7 +426,7 @@ stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span, GLuint face)
    }
 #endif
 
-   stencil = rb->GetPointer(ctx, rb, x, y);
+   stencil = (GLstencil *) rb->GetPointer(ctx, rb, x, y);
    if (!stencil) {
       rb->GetRow(ctx, rb, n, x, y, stencilRow);
       stencil = stencilRow;
@@ -900,7 +900,7 @@ stencil_test_pixels( GLcontext *ctx, GLuint face, GLuint n,
  *         GL_TRUE - one or more fragments passed the testing
  */
 static GLboolean
-stencil_and_ztest_pixels( GLcontext *ctx, struct sw_span *span, GLuint face )
+stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face )
 {
    struct gl_framebuffer *fb = ctx->DrawBuffer;
    struct gl_renderbuffer *rb = fb->_StencilBuffer;
@@ -1007,7 +1007,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, struct sw_span *span, GLuint face )
  * GL_FALSE = all fragments failed.
  */
 GLboolean
-_swrast_stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span)
+_swrast_stencil_and_ztest_span(GLcontext *ctx, SWspan *span)
 {
    /* span->facing can only be non-zero if using two-sided stencil */
    ASSERT(ctx->Stencil._TestTwoSide || span->facing == 0);
@@ -1173,7 +1173,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
          if (rb->DataType == GL_UNSIGNED_BYTE) {
             GLint i, j;
             for (i = 0; i < height; i++) {
-               GLubyte *stencil = rb->GetPointer(ctx, rb, x, y + i);
+               GLubyte *stencil = (GLubyte*) rb->GetPointer(ctx, rb, x, y + i);
                for (j = 0; j < width; j++) {
                   stencil[j] = (stencil[j] & invMask) | clearVal;
                }
@@ -1182,7 +1182,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
          else {
             GLint i, j;
             for (i = 0; i < height; i++) {
-               GLushort *stencil = rb->GetPointer(ctx, rb, x, y + i);
+               GLushort *stencil = (GLushort*) rb->GetPointer(ctx, rb, x, y + i);
                for (j = 0; j < width; j++) {
                   stencil[j] = (stencil[j] & invMask) | clearVal;
                }
@@ -1194,7 +1194,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
          if (width == rb->Width && rb->DataType == GL_UNSIGNED_BYTE) {
             /* optimized case */
             /* Note: bottom-to-top raster assumed! */
-            GLubyte *stencil = rb->GetPointer(ctx, rb, x, y);
+            GLubyte *stencil = (GLubyte *) rb->GetPointer(ctx, rb, x, y);
             GLuint len = width * height * sizeof(GLubyte);
             _mesa_memset(stencil, clearVal, len);
          }
@@ -1207,7 +1207,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
                   _mesa_memset(stencil, clearVal, width);
                }
                else {
-                  _mesa_memset16(stencil, clearVal, width);
+                  _mesa_memset16((short unsigned int*) stencil, clearVal, width);
                }
             }
          }