supported_buffer_bitmask(const GLcontext *ctx, GLuint framebufferID)
{
GLbitfield mask = 0x0;
- GLint i;
if (framebufferID > 0) {
/* A user-created renderbuffer */
+ GLuint i;
ASSERT(ctx->Extensions.EXT_framebuffer_object);
for (i = 0; i < ctx->Const.MaxColorAttachments; i++) {
mask |= (BUFFER_BIT_COLOR0 << i);
}
else {
/* A window system renderbuffer */
+ GLint i;
mask = BUFFER_BIT_FRONT_LEFT; /* always have this */
if (ctx->Visual.stereoMode) {
mask |= BUFFER_BIT_FRONT_RIGHT;
* BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT).
*/
void
-_mesa_drawbuffers(GLcontext *ctx, GLsizei n, const GLenum *buffers,
+_mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
const GLbitfield *destMask)
{
GLbitfield mask[MAX_DRAW_BUFFERS];
- GLint output;
+ GLuint output;
if (!destMask) {
/* compute destMask values now */
_mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers);
extern void
-_mesa_drawbuffers(GLcontext *ctx, GLsizei n, const GLenum *buffers,
+_mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
const GLbitfield *destMask);
extern void GLAPIENTRY
static void *
nop_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y)
{
+ (void) ctx;
+ (void) rb;
+ (void) x;
+ (void) y;
return NULL;
}
struct gl_renderbuffer *dsrb = rb->Wrapped;
GLboolean retVal;
+ (void) internalFormat;
+
ASSERT(dsrb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT);
retVal = dsrb->AllocStorage(ctx, dsrb, dsrb->InternalFormat, width, height);
GLenum intFormat = GL_NONE;
GLuint w = 0, h = 0;
GLint i;
+ GLuint j;
assert(fb->Name != 0);
}
/* Check that all DrawBuffers are present */
- for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
- if (fb->ColorDrawBuffer[i] != GL_NONE) {
+ for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
+ if (fb->ColorDrawBuffer[j] != GL_NONE) {
const struct gl_renderbuffer_attachment *att
- = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[i]);
+ = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]);
assert(att);
if (att->Type == GL_NONE) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT;
- fbo_incomplete("missing drawbuffer", i);
+ fbo_incomplete("missing drawbuffer", j);
return;
}
}
_mesa_new_framebuffer(GLcontext *ctx, GLuint name)
{
struct gl_framebuffer *fb;
+ (void) ctx;
assert(name != 0);
fb = CALLOC_STRUCT(gl_framebuffer);
if (fb) {
static void
update_color_read_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
{
+ (void) ctx;
if (fb->_ColorReadBufferIndex == -1) {
fb->_ColorReadBuffer = NULL; /* legal! */
}
}
/* clamp width and height to the implementation dependent range */
- width = CLAMP(width, 1, ctx->Const.MaxViewportWidth);
- height = CLAMP(height, 1, ctx->Const.MaxViewportHeight);
+ width = CLAMP(width, 1, (GLsizei) ctx->Const.MaxViewportWidth);
+ height = CLAMP(height, 1, (GLsizei) ctx->Const.MaxViewportHeight);
ctx->Viewport.X = x;
ctx->Viewport.Width = width;
return result;
}
}
- result.opcode = (enum prog_opcode) -1;
+ result.opcode = MAX_OPCODE; /* i.e. invalid instruction */
return result;
}
/* try to find matching instuction */
instMatch = MatchInstruction(token);
- if (instMatch.opcode < 0) {
+ if (instMatch.opcode >= MAX_OPCODE) {
/* bad instruction name */
RETURN_ERROR2("Unexpected token: ", token);
}