web_sys/features/
gen_GpuRenderPassColorAttachment.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 = GPURenderPassColorAttachment)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuRenderPassColorAttachment` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type GpuRenderPassColorAttachment;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `clearValue` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "clearValue")]
25 pub fn get_clear_value(this: &GpuRenderPassColorAttachment) -> ::wasm_bindgen::JsValue;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `clearValue` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "clearValue")]
34 pub fn set_clear_value(this: &GpuRenderPassColorAttachment, val: &::wasm_bindgen::JsValue);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `depthSlice` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "depthSlice")]
43 pub fn get_depth_slice(this: &GpuRenderPassColorAttachment) -> Option<u32>;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `depthSlice` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "depthSlice")]
52 pub fn set_depth_slice(this: &GpuRenderPassColorAttachment, val: u32);
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "GpuLoadOp")]
55 #[doc = "Get the `loadOp` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`*"]
58 #[doc = ""]
59 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
60 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
61 #[wasm_bindgen(method, getter = "loadOp")]
62 pub fn get_load_op(this: &GpuRenderPassColorAttachment) -> GpuLoadOp;
63 #[cfg(web_sys_unstable_apis)]
64 #[cfg(feature = "GpuLoadOp")]
65 #[doc = "Change the `loadOp` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "loadOp")]
72 pub fn set_load_op(this: &GpuRenderPassColorAttachment, val: GpuLoadOp);
73 #[cfg(web_sys_unstable_apis)]
74 #[cfg(feature = "GpuTextureView")]
75 #[doc = "Get the `resolveTarget` field of this object."]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
81 #[wasm_bindgen(method, getter = "resolveTarget")]
82 pub fn get_resolve_target(this: &GpuRenderPassColorAttachment) -> Option<GpuTextureView>;
83 #[cfg(web_sys_unstable_apis)]
84 #[cfg(feature = "GpuTextureView")]
85 #[doc = "Change the `resolveTarget` field of this object."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
91 #[wasm_bindgen(method, setter = "resolveTarget")]
92 pub fn set_resolve_target(this: &GpuRenderPassColorAttachment, val: &GpuTextureView);
93 #[cfg(web_sys_unstable_apis)]
94 #[cfg(feature = "GpuStoreOp")]
95 #[doc = "Get the `storeOp` field of this object."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuStoreOp`*"]
98 #[doc = ""]
99 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
101 #[wasm_bindgen(method, getter = "storeOp")]
102 pub fn get_store_op(this: &GpuRenderPassColorAttachment) -> GpuStoreOp;
103 #[cfg(web_sys_unstable_apis)]
104 #[cfg(feature = "GpuStoreOp")]
105 #[doc = "Change the `storeOp` field of this object."]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuStoreOp`*"]
108 #[doc = ""]
109 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
110 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
111 #[wasm_bindgen(method, setter = "storeOp")]
112 pub fn set_store_op(this: &GpuRenderPassColorAttachment, val: GpuStoreOp);
113 #[cfg(web_sys_unstable_apis)]
114 #[cfg(feature = "GpuTextureView")]
115 #[doc = "Get the `view` field of this object."]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"]
118 #[doc = ""]
119 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
121 #[wasm_bindgen(method, getter = "view")]
122 pub fn get_view(this: &GpuRenderPassColorAttachment) -> GpuTextureView;
123 #[cfg(web_sys_unstable_apis)]
124 #[cfg(feature = "GpuTextureView")]
125 #[doc = "Change the `view` field of this object."]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"]
128 #[doc = ""]
129 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
130 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
131 #[wasm_bindgen(method, setter = "view")]
132 pub fn set_view(this: &GpuRenderPassColorAttachment, val: &GpuTextureView);
133}
134#[cfg(web_sys_unstable_apis)]
135impl GpuRenderPassColorAttachment {
136 #[cfg(all(
137 feature = "GpuLoadOp",
138 feature = "GpuStoreOp",
139 feature = "GpuTextureView",
140 ))]
141 #[doc = "Construct a new `GpuRenderPassColorAttachment`."]
142 #[doc = ""]
143 #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`, `GpuStoreOp`, `GpuTextureView`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
147 pub fn new(load_op: GpuLoadOp, store_op: GpuStoreOp, view: &GpuTextureView) -> Self {
148 #[allow(unused_mut)]
149 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
150 ret.set_load_op(load_op);
151 ret.set_store_op(store_op);
152 ret.set_view(view);
153 ret
154 }
155 #[cfg(web_sys_unstable_apis)]
156 #[deprecated = "Use `set_clear_value()` instead."]
157 pub fn clear_value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
158 self.set_clear_value(val);
159 self
160 }
161 #[cfg(web_sys_unstable_apis)]
162 #[deprecated = "Use `set_depth_slice()` instead."]
163 pub fn depth_slice(&mut self, val: u32) -> &mut Self {
164 self.set_depth_slice(val);
165 self
166 }
167 #[cfg(web_sys_unstable_apis)]
168 #[cfg(feature = "GpuLoadOp")]
169 #[deprecated = "Use `set_load_op()` instead."]
170 pub fn load_op(&mut self, val: GpuLoadOp) -> &mut Self {
171 self.set_load_op(val);
172 self
173 }
174 #[cfg(web_sys_unstable_apis)]
175 #[cfg(feature = "GpuTextureView")]
176 #[deprecated = "Use `set_resolve_target()` instead."]
177 pub fn resolve_target(&mut self, val: &GpuTextureView) -> &mut Self {
178 self.set_resolve_target(val);
179 self
180 }
181 #[cfg(web_sys_unstable_apis)]
182 #[cfg(feature = "GpuStoreOp")]
183 #[deprecated = "Use `set_store_op()` instead."]
184 pub fn store_op(&mut self, val: GpuStoreOp) -> &mut Self {
185 self.set_store_op(val);
186 self
187 }
188 #[cfg(web_sys_unstable_apis)]
189 #[cfg(feature = "GpuTextureView")]
190 #[deprecated = "Use `set_view()` instead."]
191 pub fn view(&mut self, val: &GpuTextureView) -> &mut Self {
192 self.set_view(val);
193 self
194 }
195}