gpu: convert *opaque -> opaque for SwapChain

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-29 23:00:48 -07:00 committed by Stephen Gutekanst
parent 2c1a8240c5
commit f59435f0b0
4 changed files with 11 additions and 11 deletions

View file

@ -6,24 +6,24 @@ const TextureFormat = @import("texture.zig").TextureFormat;
const TextureView = @import("texture_view.zig").TextureView;
const Impl = @import("interface.zig").Impl;
pub const SwapChain = *opaque {
pub inline fn configure(swap_chain: SwapChain, format: TextureFormat, allowed_usage: TextureUsageFlags, width: u32, height: u32) void {
pub const SwapChain = opaque {
pub inline fn configure(swap_chain: *SwapChain, format: TextureFormat, allowed_usage: TextureUsageFlags, width: u32, height: u32) void {
Impl.swapChainConfigure(swap_chain, format, allowed_usage, width, height);
}
pub inline fn getCurrentTextureView(swap_chain: SwapChain) TextureView {
pub inline fn getCurrentTextureView(swap_chain: *SwapChain) TextureView {
return Impl.swapChainGetCurrentTextureView(swap_chain);
}
pub inline fn present(swap_chain: SwapChain) void {
pub inline fn present(swap_chain: *SwapChain) void {
Impl.swapChainPresent(swap_chain);
}
pub inline fn reference(swap_chain: SwapChain) void {
pub inline fn reference(swap_chain: *SwapChain) void {
Impl.swapChainReference(swap_chain);
}
pub inline fn release(swap_chain: SwapChain) void {
pub inline fn release(swap_chain: *SwapChain) void {
Impl.swapChainRelease(swap_chain);
}
};