Skip to main content

web_sys/features/
gen_GpuRenderPassDepthStencilAttachment.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPURenderPassDepthStencilAttachment)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `GpuRenderPassDepthStencilAttachment` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
13    #[doc = ""]
14    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type GpuRenderPassDepthStencilAttachment;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `depthClearValue` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
21    #[doc = ""]
22    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24    #[wasm_bindgen(method, getter = "depthClearValue")]
25    pub fn get_depth_clear_value(this: &GpuRenderPassDepthStencilAttachment) -> Option<f32>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `depthClearValue` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    #[wasm_bindgen(method, setter = "depthClearValue")]
34    pub fn set_depth_clear_value(this: &GpuRenderPassDepthStencilAttachment, val: f32);
35    #[cfg(web_sys_unstable_apis)]
36    #[cfg(feature = "GpuLoadOp")]
37    #[doc = "Get the `depthLoadOp` field of this object."]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"]
40    #[doc = ""]
41    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
43    #[wasm_bindgen(method, getter = "depthLoadOp")]
44    pub fn get_depth_load_op(this: &GpuRenderPassDepthStencilAttachment) -> Option<GpuLoadOp>;
45    #[cfg(web_sys_unstable_apis)]
46    #[cfg(feature = "GpuLoadOp")]
47    #[doc = "Change the `depthLoadOp` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"]
50    #[doc = ""]
51    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    #[wasm_bindgen(method, setter = "depthLoadOp")]
54    pub fn set_depth_load_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp);
55    #[cfg(web_sys_unstable_apis)]
56    #[doc = "Get the `depthReadOnly` field of this object."]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
59    #[doc = ""]
60    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
62    #[wasm_bindgen(method, getter = "depthReadOnly")]
63    pub fn get_depth_read_only(this: &GpuRenderPassDepthStencilAttachment) -> Option<bool>;
64    #[cfg(web_sys_unstable_apis)]
65    #[doc = "Change the `depthReadOnly` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
68    #[doc = ""]
69    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
71    #[wasm_bindgen(method, setter = "depthReadOnly")]
72    pub fn set_depth_read_only(this: &GpuRenderPassDepthStencilAttachment, val: bool);
73    #[cfg(web_sys_unstable_apis)]
74    #[cfg(feature = "GpuStoreOp")]
75    #[doc = "Get the `depthStoreOp` field of this object."]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"]
78    #[doc = ""]
79    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
80    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
81    #[wasm_bindgen(method, getter = "depthStoreOp")]
82    pub fn get_depth_store_op(this: &GpuRenderPassDepthStencilAttachment) -> Option<GpuStoreOp>;
83    #[cfg(web_sys_unstable_apis)]
84    #[cfg(feature = "GpuStoreOp")]
85    #[doc = "Change the `depthStoreOp` field of this object."]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"]
88    #[doc = ""]
89    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
90    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
91    #[wasm_bindgen(method, setter = "depthStoreOp")]
92    pub fn set_depth_store_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp);
93    #[cfg(web_sys_unstable_apis)]
94    #[doc = "Get the `stencilClearValue` field of this object."]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
97    #[doc = ""]
98    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
99    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
100    #[wasm_bindgen(method, getter = "stencilClearValue")]
101    pub fn get_stencil_clear_value(this: &GpuRenderPassDepthStencilAttachment) -> Option<u32>;
102    #[cfg(web_sys_unstable_apis)]
103    #[doc = "Change the `stencilClearValue` field of this object."]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
106    #[doc = ""]
107    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
108    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
109    #[wasm_bindgen(method, setter = "stencilClearValue")]
110    pub fn set_stencil_clear_value(this: &GpuRenderPassDepthStencilAttachment, val: u32);
111    #[cfg(web_sys_unstable_apis)]
112    #[cfg(feature = "GpuLoadOp")]
113    #[doc = "Get the `stencilLoadOp` field of this object."]
114    #[doc = ""]
115    #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"]
116    #[doc = ""]
117    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
118    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
119    #[wasm_bindgen(method, getter = "stencilLoadOp")]
120    pub fn get_stencil_load_op(this: &GpuRenderPassDepthStencilAttachment) -> Option<GpuLoadOp>;
121    #[cfg(web_sys_unstable_apis)]
122    #[cfg(feature = "GpuLoadOp")]
123    #[doc = "Change the `stencilLoadOp` field of this object."]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"]
126    #[doc = ""]
127    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
128    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
129    #[wasm_bindgen(method, setter = "stencilLoadOp")]
130    pub fn set_stencil_load_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp);
131    #[cfg(web_sys_unstable_apis)]
132    #[doc = "Get the `stencilReadOnly` field of this object."]
133    #[doc = ""]
134    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
135    #[doc = ""]
136    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
137    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
138    #[wasm_bindgen(method, getter = "stencilReadOnly")]
139    pub fn get_stencil_read_only(this: &GpuRenderPassDepthStencilAttachment) -> Option<bool>;
140    #[cfg(web_sys_unstable_apis)]
141    #[doc = "Change the `stencilReadOnly` field of this object."]
142    #[doc = ""]
143    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
144    #[doc = ""]
145    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
146    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
147    #[wasm_bindgen(method, setter = "stencilReadOnly")]
148    pub fn set_stencil_read_only(this: &GpuRenderPassDepthStencilAttachment, val: bool);
149    #[cfg(web_sys_unstable_apis)]
150    #[cfg(feature = "GpuStoreOp")]
151    #[doc = "Get the `stencilStoreOp` field of this object."]
152    #[doc = ""]
153    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"]
154    #[doc = ""]
155    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
156    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
157    #[wasm_bindgen(method, getter = "stencilStoreOp")]
158    pub fn get_stencil_store_op(this: &GpuRenderPassDepthStencilAttachment) -> Option<GpuStoreOp>;
159    #[cfg(web_sys_unstable_apis)]
160    #[cfg(feature = "GpuStoreOp")]
161    #[doc = "Change the `stencilStoreOp` field of this object."]
162    #[doc = ""]
163    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"]
164    #[doc = ""]
165    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
166    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
167    #[wasm_bindgen(method, setter = "stencilStoreOp")]
168    pub fn set_stencil_store_op(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp);
169    #[cfg(web_sys_unstable_apis)]
170    #[doc = "Get the `view` field of this object."]
171    #[doc = ""]
172    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
173    #[doc = ""]
174    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
175    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
176    #[wasm_bindgen(method, getter = "view")]
177    pub fn get_view(this: &GpuRenderPassDepthStencilAttachment) -> ::js_sys::Object;
178    #[cfg(web_sys_unstable_apis)]
179    #[cfg(feature = "GpuTexture")]
180    #[doc = "Change the `view` field of this object."]
181    #[doc = ""]
182    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
183    #[doc = ""]
184    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
185    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
186    #[wasm_bindgen(method, setter = "view")]
187    pub fn set_view(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTexture);
188    #[cfg(web_sys_unstable_apis)]
189    #[cfg(feature = "GpuTextureView")]
190    #[doc = "Change the `view` field of this object."]
191    #[doc = ""]
192    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"]
193    #[doc = ""]
194    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
195    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
196    #[wasm_bindgen(method, setter = "view")]
197    pub fn set_view_gpu_texture_view(
198        this: &GpuRenderPassDepthStencilAttachment,
199        val: &GpuTextureView,
200    );
201}
202#[cfg(web_sys_unstable_apis)]
203impl GpuRenderPassDepthStencilAttachment {
204    #[cfg(feature = "GpuTexture")]
205    #[doc = "Construct a new `GpuRenderPassDepthStencilAttachment`."]
206    #[doc = ""]
207    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTexture`*"]
208    #[doc = ""]
209    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
210    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
211    pub fn new(view: &GpuTexture) -> Self {
212        #[allow(unused_mut)]
213        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
214        ret.set_view(view);
215        ret
216    }
217    #[cfg(feature = "GpuTextureView")]
218    #[doc = "Construct a new `GpuRenderPassDepthStencilAttachment`."]
219    #[doc = ""]
220    #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"]
221    #[doc = ""]
222    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
223    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
224    pub fn new_with_gpu_texture_view(view: &GpuTextureView) -> Self {
225        #[allow(unused_mut)]
226        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
227        ret.set_view_gpu_texture_view(view);
228        ret
229    }
230    #[cfg(web_sys_unstable_apis)]
231    #[deprecated = "Use `set_depth_clear_value()` instead."]
232    pub fn depth_clear_value(&mut self, val: f32) -> &mut Self {
233        self.set_depth_clear_value(val);
234        self
235    }
236    #[cfg(web_sys_unstable_apis)]
237    #[cfg(feature = "GpuLoadOp")]
238    #[deprecated = "Use `set_depth_load_op()` instead."]
239    pub fn depth_load_op(&mut self, val: GpuLoadOp) -> &mut Self {
240        self.set_depth_load_op(val);
241        self
242    }
243    #[cfg(web_sys_unstable_apis)]
244    #[deprecated = "Use `set_depth_read_only()` instead."]
245    pub fn depth_read_only(&mut self, val: bool) -> &mut Self {
246        self.set_depth_read_only(val);
247        self
248    }
249    #[cfg(web_sys_unstable_apis)]
250    #[cfg(feature = "GpuStoreOp")]
251    #[deprecated = "Use `set_depth_store_op()` instead."]
252    pub fn depth_store_op(&mut self, val: GpuStoreOp) -> &mut Self {
253        self.set_depth_store_op(val);
254        self
255    }
256    #[cfg(web_sys_unstable_apis)]
257    #[deprecated = "Use `set_stencil_clear_value()` instead."]
258    pub fn stencil_clear_value(&mut self, val: u32) -> &mut Self {
259        self.set_stencil_clear_value(val);
260        self
261    }
262    #[cfg(web_sys_unstable_apis)]
263    #[cfg(feature = "GpuLoadOp")]
264    #[deprecated = "Use `set_stencil_load_op()` instead."]
265    pub fn stencil_load_op(&mut self, val: GpuLoadOp) -> &mut Self {
266        self.set_stencil_load_op(val);
267        self
268    }
269    #[cfg(web_sys_unstable_apis)]
270    #[deprecated = "Use `set_stencil_read_only()` instead."]
271    pub fn stencil_read_only(&mut self, val: bool) -> &mut Self {
272        self.set_stencil_read_only(val);
273        self
274    }
275    #[cfg(web_sys_unstable_apis)]
276    #[cfg(feature = "GpuStoreOp")]
277    #[deprecated = "Use `set_stencil_store_op()` instead."]
278    pub fn stencil_store_op(&mut self, val: GpuStoreOp) -> &mut Self {
279        self.set_stencil_store_op(val);
280        self
281    }
282    #[cfg(web_sys_unstable_apis)]
283    #[deprecated = "Use `set_view()` instead."]
284    pub fn view(&mut self, val: &GpuTexture) -> &mut Self {
285        self.set_view(val);
286        self
287    }
288}