gpu-dawn: example: reuse framebuffer size
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
8ce8429cb3
commit
daadef1e7d
1 changed files with 7 additions and 2 deletions
|
|
@ -52,12 +52,17 @@ pub fn main() !void {
|
|||
window_data.swap_chain = c.wgpuDeviceCreateSwapChain(setup.device, null, &descriptor);
|
||||
|
||||
window_data.swap_chain_format = c.machUtilsBackendBinding_getPreferredSwapChainTextureFormat(binding);
|
||||
c.wgpuSwapChainConfigure(window_data.swap_chain.?, window_data.swap_chain_format, c.WGPUTextureUsage_RenderAttachment, 640, 480);
|
||||
c.wgpuSwapChainConfigure(
|
||||
window_data.swap_chain.?,
|
||||
window_data.swap_chain_format,
|
||||
c.WGPUTextureUsage_RenderAttachment,
|
||||
framebuffer_size.width,
|
||||
framebuffer_size.height,
|
||||
);
|
||||
}
|
||||
window_data.current_desc = descriptor;
|
||||
window_data.target_desc = descriptor;
|
||||
|
||||
|
||||
const vs =
|
||||
\\ @stage(vertex) fn main(
|
||||
\\ @builtin(vertex_index) VertexIndex : u32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue