summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-05-20 15:12:42 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-05-20 15:12:42 +0000
commit89ffca52ac18103ebaa754241a882ea8438ff9c4 (patch)
tree1dc38aca6ac24d64d8fabe44e243de06acd8f7d5
parent7ac5b7b934544c27d87b4852c95efb379889f1dc (diff)
downloadexternal_mesa3d-89ffca52ac18103ebaa754241a882ea8438ff9c4.zip
external_mesa3d-89ffca52ac18103ebaa754241a882ea8438ff9c4.tar.gz
external_mesa3d-89ffca52ac18103ebaa754241a882ea8438ff9c4.tar.bz2
use new _mesa_remove_renderbuffer()
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 9dccea9..942692c 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1391,18 +1391,13 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type,
osmesa_renderbuffer_storage(&osmesa->mesa, osmesa->rb,
osmesa->rb->InternalFormat, width, height);
- /* Clear renderbuffer attachment, then re-add. This installs the
+ /* Remove renderbuffer attachment, then re-add. This installs the
* renderbuffer adaptor/wrapper if needed.
*/
- {
- struct gl_renderbuffer *rb
- = osmesa->gl_buffer->Attachment[BUFFER_FRONT_LEFT].Renderbuffer;
- if (rb && rb->Wrapped != rb)
- _mesa_free(rb);
- osmesa->gl_buffer->Attachment[BUFFER_FRONT_LEFT].Renderbuffer = NULL;
- }
+ _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT);
_mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb);
+
/* this updates the visual's red/green/blue/alphaBits fields */
_mesa_update_framebuffer_visual(osmesa->gl_buffer);