if (buffer >= GL_COLOR_ATTACHMENT8 && buffer <= GL_COLOR_ATTACHMENT31)
return BUFFER_COUNT;
/* error */
- return -1;
+ return BUFFER_NONE;
}
}
if (buffer == GL_NONE) {
/* This is legal--it means that no buffer should be bound for reading. */
- srcBuffer = -1;
+ srcBuffer = BUFFER_NONE;
}
else {
/* general case / window-system framebuffer */
if (_mesa_is_gles3(ctx) && !is_legal_es3_readbuffer_enum(buffer))
- srcBuffer = -1;
+ srcBuffer = BUFFER_NONE;
else
srcBuffer = read_buffer_enum_to_index(ctx, buffer);
- if (srcBuffer == -1) {
+ if (srcBuffer == BUFFER_NONE) {
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(invalid buffer %s)", caller,
_mesa_enum_to_string(buffer));
oldFb->RefCount--;
deleteFlag = (oldFb->RefCount == 0);
mtx_unlock(&oldFb->Mutex);
-
+
if (deleteFlag)
oldFb->Delete(oldFb);
update_color_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
(void) ctx;
- if (fb->_ColorReadBufferIndex == -1 ||
+ if (fb->_ColorReadBufferIndex == BUFFER_NONE ||
fb->DeletePending ||
fb->Width == 0 ||
fb->Height == 0) {