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 (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 #[cfg(feature = "GpuTexture")]
171 #[doc = "Get the `view` field of this object."]
172 #[doc = ""]
173 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTexture`*"]
174 #[doc = ""]
175 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
176 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
177 #[wasm_bindgen(method, getter = "view")]
178 pub fn get_view(this: &GpuRenderPassDepthStencilAttachment) -> ::js_sys::Object;
179 #[cfg(web_sys_unstable_apis)]
180 #[cfg(feature = "GpuTexture")]
181 #[doc = "Change the `view` field of this object."]
182 #[doc = ""]
183 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTexture`*"]
184 #[doc = ""]
185 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
186 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
187 #[wasm_bindgen(method, setter = "view")]
188 pub fn set_view(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTexture);
189 #[cfg(web_sys_unstable_apis)]
190 #[cfg(feature = "GpuTextureView")]
191 #[doc = "Change the `view` field of this object."]
192 #[doc = ""]
193 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"]
194 #[doc = ""]
195 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
196 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
197 #[wasm_bindgen(method, setter = "view")]
198 pub fn set_view_gpu_texture_view(
199 this: &GpuRenderPassDepthStencilAttachment,
200 val: &GpuTextureView,
201 );
202}
203#[cfg(web_sys_unstable_apis)]
204impl GpuRenderPassDepthStencilAttachment {
205 #[cfg(feature = "GpuTexture")]
206 #[doc = "Construct a new `GpuRenderPassDepthStencilAttachment`."]
207 #[doc = ""]
208 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTexture`*"]
209 #[doc = ""]
210 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
211 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
212 pub fn new(view: &GpuTexture) -> Self {
213 #[allow(unused_mut)]
214 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
215 ret.set_view(view);
216 ret
217 }
218 #[cfg(feature = "GpuTextureView")]
219 #[doc = "Construct a new `GpuRenderPassDepthStencilAttachment`."]
220 #[doc = ""]
221 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"]
222 #[doc = ""]
223 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
224 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
225 pub fn new_with_gpu_texture_view(view: &GpuTextureView) -> Self {
226 #[allow(unused_mut)]
227 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
228 ret.set_view_gpu_texture_view(view);
229 ret
230 }
231 #[cfg(web_sys_unstable_apis)]
232 #[deprecated = "Use `set_depth_clear_value()` instead."]
233 pub fn depth_clear_value(&mut self, val: f32) -> &mut Self {
234 self.set_depth_clear_value(val);
235 self
236 }
237 #[cfg(web_sys_unstable_apis)]
238 #[cfg(feature = "GpuLoadOp")]
239 #[deprecated = "Use `set_depth_load_op()` instead."]
240 pub fn depth_load_op(&mut self, val: GpuLoadOp) -> &mut Self {
241 self.set_depth_load_op(val);
242 self
243 }
244 #[cfg(web_sys_unstable_apis)]
245 #[deprecated = "Use `set_depth_read_only()` instead."]
246 pub fn depth_read_only(&mut self, val: bool) -> &mut Self {
247 self.set_depth_read_only(val);
248 self
249 }
250 #[cfg(web_sys_unstable_apis)]
251 #[cfg(feature = "GpuStoreOp")]
252 #[deprecated = "Use `set_depth_store_op()` instead."]
253 pub fn depth_store_op(&mut self, val: GpuStoreOp) -> &mut Self {
254 self.set_depth_store_op(val);
255 self
256 }
257 #[cfg(web_sys_unstable_apis)]
258 #[deprecated = "Use `set_stencil_clear_value()` instead."]
259 pub fn stencil_clear_value(&mut self, val: u32) -> &mut Self {
260 self.set_stencil_clear_value(val);
261 self
262 }
263 #[cfg(web_sys_unstable_apis)]
264 #[cfg(feature = "GpuLoadOp")]
265 #[deprecated = "Use `set_stencil_load_op()` instead."]
266 pub fn stencil_load_op(&mut self, val: GpuLoadOp) -> &mut Self {
267 self.set_stencil_load_op(val);
268 self
269 }
270 #[cfg(web_sys_unstable_apis)]
271 #[deprecated = "Use `set_stencil_read_only()` instead."]
272 pub fn stencil_read_only(&mut self, val: bool) -> &mut Self {
273 self.set_stencil_read_only(val);
274 self
275 }
276 #[cfg(web_sys_unstable_apis)]
277 #[cfg(feature = "GpuStoreOp")]
278 #[deprecated = "Use `set_stencil_store_op()` instead."]
279 pub fn stencil_store_op(&mut self, val: GpuStoreOp) -> &mut Self {
280 self.set_stencil_store_op(val);
281 self
282 }
283 #[cfg(web_sys_unstable_apis)]
284 #[cfg(feature = "GpuTexture")]
285 #[deprecated = "Use `set_view()` instead."]
286 pub fn view(&mut self, val: &GpuTexture) -> &mut Self {
287 self.set_view(val);
288 self
289 }
290}