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