gpu: implement SwapChain methods
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
2f33a84347
commit
5e613fd464
1 changed files with 17 additions and 10 deletions
|
|
@ -3,22 +3,29 @@ const PresentMode = @import("types.zig").PresentMode;
|
|||
const Texture = @import("texture.zig").Texture;
|
||||
const TextureUsageFlags = @import("texture.zig").TextureUsageFlags;
|
||||
const TextureFormat = @import("texture.zig").TextureFormat;
|
||||
const TextureView = @import("texture_view.zig").TextureView;
|
||||
const impl = @import("interface.zig").impl;
|
||||
|
||||
pub const SwapChain = *opaque {
|
||||
// TODO
|
||||
// pub inline fn swapChainConfigure(swap_chain: gpu.SwapChain, format: gpu.TextureFormat, allowed_usage: gpu.TextureUsageFlags, width: u32, height: u32) void {
|
||||
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);
|
||||
}
|
||||
|
||||
// TODO
|
||||
// pub inline fn swapChainGetCurrentTextureView(swap_chain: gpu.SwapChain) gpu.TextureView {
|
||||
pub inline fn getCurrentTextureView(swap_chain: SwapChain) TextureView {
|
||||
return impl.swapChainGetCurrentTextureView(swap_chain);
|
||||
}
|
||||
|
||||
// TODO
|
||||
// pub inline fn swapChainPresent(swap_chain: gpu.SwapChain) void {
|
||||
pub inline fn present(swap_chain: SwapChain) void {
|
||||
impl.swapChainPresent(swap_chain);
|
||||
}
|
||||
|
||||
// TODO
|
||||
// pub inline fn swapChainReference(swap_chain: gpu.SwapChain) void {
|
||||
pub inline fn reference(swap_chain: SwapChain) void {
|
||||
impl.swapChainReference(swap_chain);
|
||||
}
|
||||
|
||||
// TODO
|
||||
// pub inline fn swapChainRelease(swap_chain: gpu.SwapChain) void {
|
||||
pub inline fn release(swap_chain: SwapChain) void {
|
||||
impl.swapChainRelease(swap_chain);
|
||||
}
|
||||
};
|
||||
|
||||
pub const SwapChainDescriptor = extern struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue