mach: update gfx2d-Sprite2D with optional texture view

This commit is contained in:
Răzvan C. Rădulescu 2023-06-09 09:18:05 +03:00 committed by Stephen Gutekanst
parent b45ad53a11
commit 7866d3fd10

View file

@ -180,7 +180,7 @@ pub fn tick(adapter: anytype) !void {
const device = mach.state().device; const device = mach.state().device;
// Begin our render pass // Begin our render pass
const back_buffer_view = core.swapChain().getCurrentTextureView(); const back_buffer_view = core.swapChain().getCurrentTextureView().?;
const color_attachment = gpu.RenderPassColorAttachment{ const color_attachment = gpu.RenderPassColorAttachment{
.view = back_buffer_view, .view = back_buffer_view,
.clear_value = gpu.Color{ .r = 1.0, .g = 1.0, .b = 1.0, .a = 1.0 }, .clear_value = gpu.Color{ .r = 1.0, .g = 1.0, .b = 1.0, .a = 1.0 },