Declare the var in the scopes where it's used.
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
static void
handle_first_current(struct gl_context *ctx)
{
- GLenum buffer;
-
if (ctx->Version == 0) {
/* probably in the process of tearing down the context */
return;
* For GLES it is always GL_BACK which has a magic interpretation */
if (!ctx->HasConfig && _mesa_is_desktop_gl(ctx)) {
if (ctx->DrawBuffer != _mesa_get_incomplete_framebuffer()) {
+ GLenum buffer;
+
if (ctx->DrawBuffer->Visual.doubleBufferMode)
buffer = GL_BACK;
else
if (ctx->ReadBuffer != _mesa_get_incomplete_framebuffer()) {
gl_buffer_index bufferIndex;
+ GLenum buffer;
+
if (ctx->ReadBuffer->Visual.doubleBufferMode) {
buffer = GL_BACK;
bufferIndex = BUFFER_BACK_LEFT;