X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fcontext.c;h=eafe292a1f2d686bd48f8eae6d082f13898d885f;hb=4f1e141c116a1c230db7adfd1b70f09d484aa19b;hp=d9f10468aaef10ce531c4cb099b6c005b0fa3ff9;hpb=89966cdb1b5974059c32308d74b5bb09943a6fa1;p=mesa.git diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index d9f10468aae..eafe292a1f2 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1014,6 +1014,16 @@ _mesa_free_context_data( GLcontext *ctx ) _mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj); +#if FEATURE_ARB_pixel_buffer_object + _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, NULL); + _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, NULL); +#endif + +#if FEATURE_ARB_vertex_buffer_object + _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL); + _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, NULL); +#endif + /* free dispatch tables */ _mesa_free(ctx->Exec); _mesa_free(ctx->Save); @@ -1262,7 +1272,7 @@ initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb) * \param drawBuffer the drawing framebuffer * \param readBuffer the reading framebuffer */ -void +GLboolean _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer, GLframebuffer *readBuffer ) { @@ -1275,14 +1285,14 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer, if (!check_compatible(newCtx, drawBuffer)) { _mesa_warning(newCtx, "MakeCurrent: incompatible visuals for context and drawbuffer"); - return; + return GL_FALSE; } } if (newCtx && readBuffer && newCtx->WinSysReadBuffer != readBuffer) { if (!check_compatible(newCtx, readBuffer)) { _mesa_warning(newCtx, "MakeCurrent: incompatible visuals for context and readbuffer"); - return; + return GL_FALSE; } } @@ -1387,6 +1397,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer, newCtx->FirstTimeCurrent = GL_FALSE; } } + + return GL_TRUE; }