gpu: use SwapChain.configure in example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
258db701a7
commit
0017303cde
1 changed files with 3 additions and 4 deletions
|
|
@ -51,10 +51,9 @@ pub fn main() !void {
|
|||
window_data.swap_chain = setup.device.nativeCreateSwapChain(null, &descriptor);
|
||||
|
||||
window_data.swap_chain_format = @intToEnum(gpu.TextureFormat, @intCast(u32, c.machUtilsBackendBinding_getPreferredSwapChainTextureFormat(binding)));
|
||||
c.wgpuSwapChainConfigure(
|
||||
@ptrCast(c.WGPUSwapChain, window_data.swap_chain.?.ptr),
|
||||
@enumToInt(window_data.swap_chain_format),
|
||||
c.WGPUTextureUsage_RenderAttachment,
|
||||
window_data.swap_chain.?.configure(
|
||||
window_data.swap_chain_format,
|
||||
.RenderAttachment,
|
||||
framebuffer_size.width,
|
||||
framebuffer_size.height,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue