summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_stencil.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-01-23 12:50:08 -0700
committerBrian <[email protected]>2007-01-23 12:50:08 -0700
commit7e85b0a025a82c3ffed060a757a3b4adae03d269 (patch)
tree967a7b54d805e68497bb5582feb0da9604355de1 /src/mesa/swrast/s_stencil.c
parent18d1fdebebcb52e7fcf50e62c4c02862d173af51 (diff)
silence C++ warnings
Diffstat (limited to 'src/mesa/swrast/s_stencil.c')
-rw-r--r--src/mesa/swrast/s_stencil.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index dbab6b3c20b..a8aa1d4b6dc 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -1062,7 +1062,8 @@ void
_swrast_read_stencil_span(GLcontext *ctx, struct gl_renderbuffer *rb,
GLint n, GLint x, GLint y, GLstencil stencil[])
{
- if (y < 0 || y >= rb->Height || x + n <= 0 || x >= rb->Width) {
+ if (y < 0 || y >= (GLint) rb->Height ||
+ x + n <= 0 || x >= (GLint) rb->Width) {
/* span is completely outside framebuffer */
return; /* undefined values OK */
}
@@ -1073,7 +1074,7 @@ _swrast_read_stencil_span(GLcontext *ctx, struct gl_renderbuffer *rb,
n -= dx;
stencil += dx;
}
- if (x + n > rb->Width) {
+ if (x + n > (GLint) rb->Width) {
GLint dx = x + n - rb->Width;
n -= dx;
}
@@ -1103,7 +1104,8 @@ _swrast_write_stencil_span(GLcontext *ctx, GLint n, GLint x, GLint y,
const GLuint stencilMax = (1 << fb->Visual.stencilBits) - 1;
const GLuint stencilMask = ctx->Stencil.WriteMask[0];
- if (y < 0 || y >= rb->Height || x + n <= 0 || x >= rb->Width) {
+ if (y < 0 || y >= (GLint) rb->Height ||
+ x + n <= 0 || x >= (GLint) rb->Width) {
/* span is completely outside framebuffer */
return; /* undefined values OK */
}
@@ -1113,7 +1115,7 @@ _swrast_write_stencil_span(GLcontext *ctx, GLint n, GLint x, GLint y,
n -= dx;
stencil += dx;
}
- if (x + n > rb->Width) {
+ if (x + n > (GLint) rb->Width) {
GLint dx = x + n - rb->Width;
n -= dx;
}
@@ -1191,7 +1193,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
}
else {
/* no bit masking */
- if (width == rb->Width && rb->DataType == GL_UNSIGNED_BYTE) {
+ if (width == (GLint) rb->Width && rb->DataType == GL_UNSIGNED_BYTE) {
/* optimized case */
/* Note: bottom-to-top raster assumed! */
GLubyte *stencil = (GLubyte *) rb->GetPointer(ctx, rb, x, y);