web_sys/features/
gen_GpuRenderPassDescriptor.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 = GPURenderPassDescriptor)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuRenderPassDescriptor` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
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 GpuRenderPassDescriptor;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `label` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
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 = "label")]
25 pub fn get_label(this: &GpuRenderPassDescriptor) -> Option<::alloc::string::String>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `label` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
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 = "label")]
34 pub fn set_label(this: &GpuRenderPassDescriptor, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[cfg(feature = "GpuRenderPassColorAttachment")]
37 #[doc = "Get the `colorAttachments` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuRenderPassDescriptor`*"]
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 = "colorAttachments")]
44 pub fn get_color_attachments(
45 this: &GpuRenderPassDescriptor,
46 ) -> ::js_sys::Array<::js_sys::JsOption<GpuRenderPassColorAttachment>>;
47 #[cfg(web_sys_unstable_apis)]
48 #[cfg(feature = "GpuRenderPassColorAttachment")]
49 #[doc = "Change the `colorAttachments` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuRenderPassDescriptor`*"]
52 #[doc = ""]
53 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55 #[wasm_bindgen(method, setter = "colorAttachments")]
56 pub fn set_color_attachments(
57 this: &GpuRenderPassDescriptor,
58 val: &[::js_sys::JsOption<GpuRenderPassColorAttachment>],
59 );
60 #[cfg(web_sys_unstable_apis)]
61 #[cfg(feature = "GpuRenderPassDepthStencilAttachment")]
62 #[doc = "Get the `depthStencilAttachment` field of this object."]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"]
65 #[doc = ""]
66 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
67 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
68 #[wasm_bindgen(method, getter = "depthStencilAttachment")]
69 pub fn get_depth_stencil_attachment(
70 this: &GpuRenderPassDescriptor,
71 ) -> Option<GpuRenderPassDepthStencilAttachment>;
72 #[cfg(web_sys_unstable_apis)]
73 #[cfg(feature = "GpuRenderPassDepthStencilAttachment")]
74 #[doc = "Change the `depthStencilAttachment` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, setter = "depthStencilAttachment")]
81 pub fn set_depth_stencil_attachment(
82 this: &GpuRenderPassDescriptor,
83 val: &GpuRenderPassDepthStencilAttachment,
84 );
85 #[cfg(web_sys_unstable_apis)]
86 #[doc = "Get the `maxDrawCount` field of this object."]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
89 #[doc = ""]
90 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
91 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
92 #[wasm_bindgen(method, getter = "maxDrawCount")]
93 pub fn get_max_draw_count(this: &GpuRenderPassDescriptor) -> Option<f64>;
94 #[cfg(web_sys_unstable_apis)]
95 #[doc = "Change the `maxDrawCount` field of this object."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
101 #[wasm_bindgen(method, setter = "maxDrawCount")]
102 pub fn set_max_draw_count(this: &GpuRenderPassDescriptor, val: u32);
103 #[cfg(web_sys_unstable_apis)]
104 #[doc = "Change the `maxDrawCount` field of this object."]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
107 #[doc = ""]
108 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
109 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
110 #[wasm_bindgen(method, setter = "maxDrawCount")]
111 pub fn set_max_draw_count_f64(this: &GpuRenderPassDescriptor, val: f64);
112 #[cfg(web_sys_unstable_apis)]
113 #[cfg(feature = "GpuQuerySet")]
114 #[doc = "Get the `occlusionQuerySet` field of this object."]
115 #[doc = ""]
116 #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"]
117 #[doc = ""]
118 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
119 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
120 #[wasm_bindgen(method, getter = "occlusionQuerySet")]
121 pub fn get_occlusion_query_set(this: &GpuRenderPassDescriptor) -> Option<GpuQuerySet>;
122 #[cfg(web_sys_unstable_apis)]
123 #[cfg(feature = "GpuQuerySet")]
124 #[doc = "Change the `occlusionQuerySet` field of this object."]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"]
127 #[doc = ""]
128 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
129 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
130 #[wasm_bindgen(method, setter = "occlusionQuerySet")]
131 pub fn set_occlusion_query_set(this: &GpuRenderPassDescriptor, val: &GpuQuerySet);
132 #[cfg(web_sys_unstable_apis)]
133 #[cfg(feature = "GpuRenderPassTimestampWrites")]
134 #[doc = "Get the `timestampWrites` field of this object."]
135 #[doc = ""]
136 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"]
137 #[doc = ""]
138 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
139 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
140 #[wasm_bindgen(method, getter = "timestampWrites")]
141 pub fn get_timestamp_writes(
142 this: &GpuRenderPassDescriptor,
143 ) -> Option<GpuRenderPassTimestampWrites>;
144 #[cfg(web_sys_unstable_apis)]
145 #[cfg(feature = "GpuRenderPassTimestampWrites")]
146 #[doc = "Change the `timestampWrites` field of this object."]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"]
149 #[doc = ""]
150 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
151 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
152 #[wasm_bindgen(method, setter = "timestampWrites")]
153 pub fn set_timestamp_writes(this: &GpuRenderPassDescriptor, val: &GpuRenderPassTimestampWrites);
154}
155#[cfg(web_sys_unstable_apis)]
156impl GpuRenderPassDescriptor {
157 #[cfg(feature = "GpuRenderPassColorAttachment")]
158 #[doc = "Construct a new `GpuRenderPassDescriptor`."]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuRenderPassDescriptor`*"]
161 #[doc = ""]
162 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
163 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
164 pub fn new(color_attachments: &[::js_sys::JsOption<GpuRenderPassColorAttachment>]) -> Self {
165 #[allow(unused_mut)]
166 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
167 ret.set_color_attachments(color_attachments);
168 ret
169 }
170 #[cfg(web_sys_unstable_apis)]
171 #[deprecated = "Use `set_label()` instead."]
172 pub fn label(&mut self, val: &str) -> &mut Self {
173 self.set_label(val);
174 self
175 }
176 #[cfg(web_sys_unstable_apis)]
177 #[cfg(feature = "GpuRenderPassColorAttachment")]
178 #[deprecated = "Use `set_color_attachments()` instead."]
179 pub fn color_attachments(
180 &mut self,
181 val: &[::js_sys::JsOption<GpuRenderPassColorAttachment>],
182 ) -> &mut Self {
183 self.set_color_attachments(val);
184 self
185 }
186 #[cfg(web_sys_unstable_apis)]
187 #[cfg(feature = "GpuRenderPassDepthStencilAttachment")]
188 #[deprecated = "Use `set_depth_stencil_attachment()` instead."]
189 pub fn depth_stencil_attachment(
190 &mut self,
191 val: &GpuRenderPassDepthStencilAttachment,
192 ) -> &mut Self {
193 self.set_depth_stencil_attachment(val);
194 self
195 }
196 #[cfg(web_sys_unstable_apis)]
197 #[deprecated = "Use `set_max_draw_count()` instead."]
198 pub fn max_draw_count(&mut self, val: u32) -> &mut Self {
199 self.set_max_draw_count(val);
200 self
201 }
202 #[cfg(web_sys_unstable_apis)]
203 #[cfg(feature = "GpuQuerySet")]
204 #[deprecated = "Use `set_occlusion_query_set()` instead."]
205 pub fn occlusion_query_set(&mut self, val: &GpuQuerySet) -> &mut Self {
206 self.set_occlusion_query_set(val);
207 self
208 }
209 #[cfg(web_sys_unstable_apis)]
210 #[cfg(feature = "GpuRenderPassTimestampWrites")]
211 #[deprecated = "Use `set_timestamp_writes()` instead."]
212 pub fn timestamp_writes(&mut self, val: &GpuRenderPassTimestampWrites) -> &mut Self {
213 self.set_timestamp_writes(val);
214 self
215 }
216}