diff options
author | Brian Paul <[email protected]> | 2005-12-06 15:41:43 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-12-06 15:41:43 +0000 |
commit | 9580179dfb42d5b81ff6ec9704b82a556c7f1229 (patch) | |
tree | ae2a55aa82c4efc43ae832abcf316e1773c228bb /src/mesa/swrast | |
parent | d5179613d5302173471a6a910fa9ec235c9ff046 (diff) |
C++ fixes, mostly casts (Stephane Conversy)
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_depth.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_stencil.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index 27a77b14af7..8a2d08b58ea 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -1136,7 +1136,7 @@ _swrast_depth_bounds_test( GLcontext *ctx, struct sw_span *span ) zbuffer = zbuffer16; } else { - zbuffer = rb->GetPointer(ctx, rb, span->x, span->y); + zbuffer = (GLushort*) rb->GetPointer(ctx, rb, span->x, span->y); if (!zbuffer) { rb->GetRow(ctx, rb, count, span->x, span->y, zbuffer16); zbuffer = zbuffer16; @@ -1163,7 +1163,7 @@ _swrast_depth_bounds_test( GLcontext *ctx, struct sw_span *span ) zbuffer = zbuffer32; } else { - zbuffer = rb->GetPointer(ctx, rb, span->x, span->y); + zbuffer = (GLuint*) rb->GetPointer(ctx, rb, span->x, span->y); if (!zbuffer) { rb->GetRow(ctx, rb, count, span->x, span->y, zbuffer32); zbuffer = zbuffer32; diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index effe4a6a52f..1c78f848e13 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -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; @@ -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); } } } |