mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 09:34:09 +01:00
wgpu: Add get_configuration to Surface (#8664)
This commit is contained in:
2 files changed
+8
No files matched your search
@@ -163,6 +163,7 @@ By @cwfitzgerald in [#8609](https://github.com/gfx-rs/wgpu/pull/8609).
|
||||
- Implement shader triangle barycentric coordinate builtins. By @atlv24 in [#8320](https://github.com/gfx-rs/wgpu/pull/8320).
|
||||
- Added support for binding arrays of storage textures on Metal. By @msvbg in [#8464](https://github.com/gfx-rs/wgpu/pull/8464)
|
||||
- Added support for multisampled texture arrays on Vulkan through adapter feature `MULTISAMPLE_ARRAY`. By @LaylBongers in [#8571](https://github.com/gfx-rs/wgpu/pull/8571).
|
||||
- Added `get_configuration` to `wgpu::Surface`, that returns the current configuration of `wgpu::Surface`. By @sagudev in [#8664](https://github.com/gfx-rs/wgpu/pull/8664).
|
||||
|
||||
### Changes
|
||||
|
||||
|
||||
@@ -99,6 +99,13 @@ impl Surface<'_> {
|
||||
*conf = Some(config.clone());
|
||||
}
|
||||
|
||||
/// Returns the current configuration of [`Surface`], if configured.
|
||||
///
|
||||
/// This is similar to [WebGPU `GPUcCanvasContext::getConfiguration`](https://gpuweb.github.io/gpuweb/#dom-gpucanvascontext-getconfiguration).
|
||||
pub fn get_configuration(&self) -> Option<SurfaceConfiguration> {
|
||||
self.config.lock().clone()
|
||||
}
|
||||
|
||||
/// Returns the next texture to be presented by the swapchain for drawing.
|
||||
///
|
||||
/// In order to present the [`SurfaceTexture`] returned by this method,
|
||||
|
||||
Reference in new issue
Block a user