DVUI

deinit

Draw recorded texture and destroy it.

Parameters

#
self:*Picture
*Picture

Source

Implementation

#
pub fn deinit(self: *Picture) void {
        defer self.* = undefined;
        // Ignore errors as drawing is not critical to Pictures function
        const texture = dvui.textureFromTarget(self.texture) catch return; // destroys self.texture
        dvui.textureDestroyLater(texture);
        dvui.renderTexture(texture, .{ .r = self.r }, .{}) catch {};
    }