* renderbuffer (a BUFFER_* value).
* return -1 for an invalid buffer.
*/
-static GLint
+static gl_buffer_index
read_buffer_enum_to_index(GLenum buffer)
{
switch (buffer) {
*/
void
_mesa_readbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
- GLenum buffer, GLint bufferIndex)
+ GLenum buffer, gl_buffer_index bufferIndex)
{
if ((fb == ctx->ReadBuffer) && _mesa_is_winsys_fbo(fb)) {
/* Only update the per-context READ_BUFFER state if we're bound to
GLenum buffer, const char *caller)
{
GLbitfield supportedMask;
- GLint srcBuffer;
+ gl_buffer_index srcBuffer;
FLUSH_VERTICES(ctx, 0);
#include "glheader.h"
+#include "mtypes.h"
struct gl_context;
struct gl_framebuffer;
extern void
_mesa_readbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
- GLenum buffer, GLint bufferIndex);
+ GLenum buffer, gl_buffer_index bufferIndex);
extern void
_mesa_update_draw_buffers(struct gl_context *ctx);
handle_first_current(struct gl_context *ctx)
{
GLenum buffer;
- GLint bufferIndex;
if (ctx->Version == 0) {
/* probably in the process of tearing down the context */
}
if (ctx->ReadBuffer != _mesa_get_incomplete_framebuffer()) {
+ gl_buffer_index bufferIndex;
if (ctx->ReadBuffer->Visual.doubleBufferMode) {
buffer = GL_BACK;
bufferIndex = BUFFER_BACK_LEFT;