{gfx,examples}: use core.state().device
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
bffc668005
commit
79dccb4d73
6 changed files with 16 additions and 22 deletions
|
|
@ -184,7 +184,7 @@ fn tick(
|
|||
|
||||
// Create a command encoder for this frame
|
||||
const label = @tagName(name) ++ ".tick";
|
||||
game.state().frame_encoder = mach.core.device.createCommandEncoder(&.{ .label = label });
|
||||
game.state().frame_encoder = core.state().device.createCommandEncoder(&.{ .label = label });
|
||||
|
||||
// Grab the back buffer of the swapchain
|
||||
const back_buffer_view = mach.core.swap_chain.getCurrentTextureView().?;
|
||||
|
|
@ -199,7 +199,7 @@ fn tick(
|
|||
.store_op = .store,
|
||||
}};
|
||||
// TODO: can we eliminate this assignment
|
||||
game.state().frame_encoder = mach.core.device.createCommandEncoder(&.{ .label = label });
|
||||
game.state().frame_encoder = core.state().device.createCommandEncoder(&.{ .label = label });
|
||||
game.state().frame_render_pass = game.state().frame_encoder.beginRenderPass(&gpu.RenderPassDescriptor.init(.{
|
||||
.label = label,
|
||||
.color_attachments = &color_attachments,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue