gpu-dawn: update to latest glfw get/setUserPointer API (#154)
Updates gpu-dawn to use the latest glfw get/setUserPointer API introduced in hexops/mach#152 Helps hexops/mach#153
This commit is contained in:
parent
786da94468
commit
abe9475d6e
1 changed files with 2 additions and 2 deletions
|
|
@ -114,10 +114,10 @@ pub fn main() !void {
|
|||
swap_chain: c.WGPUSwapChain,
|
||||
swap_chain_format: c.WGPUTextureFormat,
|
||||
};
|
||||
setup.window.setUserPointer(CallbackPayload, &.{ .swap_chain = swap_chain, .swap_chain_format = swap_chain_format });
|
||||
setup.window.setUserPointer(&.{ .swap_chain = swap_chain, .swap_chain_format = swap_chain_format });
|
||||
setup.window.setFramebufferSizeCallback((struct {
|
||||
fn callback(window: glfw.Window, width: u32, height: u32) void {
|
||||
const pl = window.getUserPointer(*CallbackPayload);
|
||||
const pl = window.getUserPointer(CallbackPayload);
|
||||
c.wgpuSwapChainConfigure(pl.?.swap_chain, pl.?.swap_chain_format, c.WGPUTextureUsage_RenderAttachment, @intCast(u32, width), @intCast(u32, height));
|
||||
}
|
||||
}).callback);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue