Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chances committed Feb 23, 2024
1 parent 2c4631a commit 5f83299
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/wgpu/api.d
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ alias StorageTextureBindingLayout = WGPUStorageTextureBindingLayout;
alias SurfaceDescriptor = WGPUSurfaceDescriptor;
///
struct SurfaceCapabilities {
WGPUSurfaceCapabilities state;
package WGPUSurfaceCapabilities state;
alias state this;

~this() {
Expand Down Expand Up @@ -1073,7 +1073,9 @@ struct Surface {
TextureFormat preferredFormat(const Adapter adapter) @trusted const {
assert(id !is null);
assert(adapter.ready);
return wgpuSurfaceGetPreferredFormat(cast(WGPUSurface) id, cast(WGPUAdapter) adapter.id).asOriginalType.to!TextureFormat;
return wgpuSurfaceGetPreferredFormat(
cast(WGPUSurface) id, cast(WGPUAdapter) adapter.id
).asOriginalType.to!TextureFormat;
}

///
Expand All @@ -1084,9 +1086,11 @@ struct Surface {
return capabilities;
}

/// The current configuration state of this surface.
WGPUSurfaceConfiguration* config;

/// Create a new `SwapChain` which targets `surface`.
/// Configure this surface.
/// See_Also: `Surface.config`
WGPUSurfaceConfiguration* configure(
const Device device,
uint width, uint height, const TextureFormat format, const TextureUsage usage,
Expand All @@ -1107,6 +1111,7 @@ struct Surface {
return config;
}

///
void resize(uint width, uint height) {
config.width = width;
config.height = height;
Expand Down Expand Up @@ -2132,6 +2137,7 @@ class ComputePipeline : Pipeline {

/// Get the bind group layout at the given `index`.
BindGroupLayout bindGroupLayout(uint index) {
assert(index >= 0);
// TODO: Compute the layout given the descriptor.
return BindGroupLayout.init;
}
Expand Down

0 comments on commit 5f83299

Please sign in to comment.