struct drawpix_state *drawpix);
static void meta_drawtex_cleanup(struct gl_context *ctx,
struct drawtex_state *drawtex);
+static void meta_bitmap_cleanup(struct gl_context *ctx,
+ struct bitmap_state *bitmap);
void
_mesa_meta_framebuffer_texture_image(struct gl_context *ctx,
meta_decompress_cleanup(ctx, &ctx->Meta->Decompress);
meta_drawpix_cleanup(ctx, &ctx->Meta->DrawPix);
meta_drawtex_cleanup(ctx, &ctx->Meta->DrawTex);
+ meta_bitmap_cleanup(ctx, &ctx->Meta->Bitmap);
+
if (old_context)
_mesa_make_current(old_context, old_context->WinSysDrawBuffer, old_context->WinSysReadBuffer);
else
}
}
+static void
+meta_bitmap_cleanup(struct gl_context *ctx, struct bitmap_state *bitmap)
+{
+ if (bitmap->VAO != 0) {
+ _mesa_DeleteVertexArrays(1, &bitmap->VAO);
+ bitmap->VAO = 0;
+
+ _mesa_reference_buffer_object(ctx, &bitmap->buf_obj, NULL);
+
+ cleanup_temp_texture(ctx, &bitmap->Tex);
+ }
+}
+
/**
* When the glDrawPixels() image size is greater than the max rectangle
* texture size we use this function to break the glDrawPixels() image