if (buffer == curDraw || buffer == curRead) {
glFBDevMakeCurrent( NULL, NULL, NULL);
}
+#if 0
/* free the software depth, stencil, accum buffers */
_mesa_free_framebuffer_data(&buffer->glframebuffer);
_mesa_free(buffer);
+#else
+ {
+ struct gl_framebuffer *fb = &buffer->glframebuffer;
+ _mesa_unreference_framebuffer(&fb);
+ }
+#endif
}
}
GLFBDevContextPtr fbdevctx = glFBDevGetCurrentContext();
if (context) {
+ GLcontext *mesaCtx = &context->glcontext;
+
+ _swsetup_DestroyContext( mesaCtx );
+ _swrast_DestroyContext( mesaCtx );
+ _tnl_DestroyContext( mesaCtx );
+ _vbo_DestroyContext( mesaCtx );
+
if (fbdevctx == context) {
/* destroying current context */
_mesa_make_current(NULL, NULL, NULL);