diff options
author | Brian Paul <brianp@vmware.com> | 2010-07-02 18:18:15 -0600 |
---|---|---|
committer | Tom Fogal <tfogal@alumni.unh.edu> | 2010-08-03 12:03:53 -0600 |
commit | ac82d1602131623aa44d12ce1e2e0689672d4c63 (patch) | |
tree | 24d863881a2d792dd26d31f63d3ff18af22e4015 | |
parent | f02cd9030cdbf6cea480a15152483c1f23be9b84 (diff) |
osmesa: remove old renderbuffer before adding new
Fixes fd.o bug 10966 when OSMesaMakeCurrent() was called twice.
NOTE: This is a candidate for the 7.8 branch.
(cherry picked from commit 91c37599f621a0ec498c0f0add14f16470ca852b)
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index e376f12bc3..bba68eb745 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1329,6 +1329,7 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type, * size. */ osmesa->rb = new_osmesa_renderbuffer(&osmesa->mesa, osmesa->format, type); + _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT); _mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb); assert(osmesa->rb->RefCount == 2); |