summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/glitz_context.c17
-rw-r--r--src/glitz_drawable.c3
-rw-r--r--src/glx/glitz_glx_drawable.c2
3 files changed, 11 insertions, 11 deletions
diff --git a/src/glitz_context.c b/src/glitz_context.c
index fe0e637..377dd59 100644
--- a/src/glitz_context.c
+++ b/src/glitz_context.c
@@ -212,15 +212,14 @@ glitz_context_draw_buffers (glitz_context_t *context,
if (mask)
{
- if (mask == (FRONT_BIT | BACK_BIT))
- context->drawable->backend->draw_buffer (context->drawable,
- GLITZ_GL_FRONT_AND_BACK);
- else if (mask == FRONT_BIT)
- context->drawable->backend->draw_buffer (context->drawable,
- GLITZ_GL_FRONT);
- else
- context->drawable->backend->draw_buffer (context->drawable,
- GLITZ_GL_BACK);
+ static const glitz_gl_enum_t mode[] = {
+ GLITZ_GL_FRONT,
+ GLITZ_GL_BACK,
+ GLITZ_GL_FRONT_AND_BACK
+ };
+
+ context->drawable->backend->draw_buffer (context->drawable,
+ mode[mask - 1]);
}
#undef FRONT_BIT
diff --git a/src/glitz_drawable.c b/src/glitz_drawable.c
index 77fd833..cef6787 100644
--- a/src/glitz_drawable.c
+++ b/src/glitz_drawable.c
@@ -306,7 +306,8 @@ glitz_drawable_swap_buffer_region (glitz_drawable_t *drawable,
box++;
}
}
- drawable->backend->gl->finish ();
+
+ drawable->backend->gl->flush ();
if (surface)
glitz_surface_pop_current (surface);
diff --git a/src/glx/glitz_glx_drawable.c b/src/glx/glitz_glx_drawable.c
index ab94294..d92ad14 100644
--- a/src/glx/glitz_glx_drawable.c
+++ b/src/glx/glitz_glx_drawable.c
@@ -216,7 +216,7 @@ glitz_glx_destroy (void *abstract_drawable)
GLITZ_CONTEXT_CURRENT);
glitz_program_map_fini (drawable->base.backend->gl,
&drawable->screen_info->program_map);
- glitz_program_map_init (&drawable->screen_info->program_map);
+ glitz_program_map_init (&drawable->screen_info->program_map);
glitz_glx_pop_current (abstract_drawable);
}