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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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 #[doc = "Get the `colorAttachments` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
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 = "colorAttachments")]
43 pub fn get_color_attachments(this: &GpuRenderPassDescriptor) -> ::js_sys::Array;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `colorAttachments` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
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 = "colorAttachments")]
52 pub fn set_color_attachments(this: &GpuRenderPassDescriptor, val: &::wasm_bindgen::JsValue);
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "GpuRenderPassDepthStencilAttachment")]
55 #[doc = "Get the `depthStencilAttachment` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"]
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 = "depthStencilAttachment")]
62 pub fn get_depth_stencil_attachment(
63 this: &GpuRenderPassDescriptor,
64 ) -> Option<GpuRenderPassDepthStencilAttachment>;
65 #[cfg(web_sys_unstable_apis)]
66 #[cfg(feature = "GpuRenderPassDepthStencilAttachment")]
67 #[doc = "Change the `depthStencilAttachment` field of this object."]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"]
70 #[doc = ""]
71 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
72 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
73 #[wasm_bindgen(method, setter = "depthStencilAttachment")]
74 pub fn set_depth_stencil_attachment(
75 this: &GpuRenderPassDescriptor,
76 val: &GpuRenderPassDepthStencilAttachment,
77 );
78 #[cfg(web_sys_unstable_apis)]
79 #[doc = "Get the `maxDrawCount` field of this object."]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
82 #[doc = ""]
83 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
85 #[wasm_bindgen(method, getter = "maxDrawCount")]
86 pub fn get_max_draw_count(this: &GpuRenderPassDescriptor) -> Option<f64>;
87 #[cfg(web_sys_unstable_apis)]
88 #[doc = "Change the `maxDrawCount` field of this object."]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
94 #[wasm_bindgen(method, setter = "maxDrawCount")]
95 pub fn set_max_draw_count(this: &GpuRenderPassDescriptor, val: f64);
96 #[cfg(web_sys_unstable_apis)]
97 #[cfg(feature = "GpuQuerySet")]
98 #[doc = "Get the `occlusionQuerySet` field of this object."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"]
101 #[doc = ""]
102 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
103 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
104 #[wasm_bindgen(method, getter = "occlusionQuerySet")]
105 pub fn get_occlusion_query_set(this: &GpuRenderPassDescriptor) -> Option<GpuQuerySet>;
106 #[cfg(web_sys_unstable_apis)]
107 #[cfg(feature = "GpuQuerySet")]
108 #[doc = "Change the `occlusionQuerySet` field of this object."]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"]
111 #[doc = ""]
112 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
113 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
114 #[wasm_bindgen(method, setter = "occlusionQuerySet")]
115 pub fn set_occlusion_query_set(this: &GpuRenderPassDescriptor, val: &GpuQuerySet);
116 #[cfg(web_sys_unstable_apis)]
117 #[cfg(feature = "GpuRenderPassTimestampWrites")]
118 #[doc = "Get the `timestampWrites` field of this object."]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"]
121 #[doc = ""]
122 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
123 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
124 #[wasm_bindgen(method, getter = "timestampWrites")]
125 pub fn get_timestamp_writes(
126 this: &GpuRenderPassDescriptor,
127 ) -> Option<GpuRenderPassTimestampWrites>;
128 #[cfg(web_sys_unstable_apis)]
129 #[cfg(feature = "GpuRenderPassTimestampWrites")]
130 #[doc = "Change the `timestampWrites` field of this object."]
131 #[doc = ""]
132 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"]
133 #[doc = ""]
134 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
135 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
136 #[wasm_bindgen(method, setter = "timestampWrites")]
137 pub fn set_timestamp_writes(this: &GpuRenderPassDescriptor, val: &GpuRenderPassTimestampWrites);
138}
139#[cfg(web_sys_unstable_apis)]
140impl GpuRenderPassDescriptor {
141 #[doc = "Construct a new `GpuRenderPassDescriptor`."]
142 #[doc = ""]
143 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"]
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(color_attachments: &::wasm_bindgen::JsValue) -> Self {
148 #[allow(unused_mut)]
149 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
150 ret.set_color_attachments(color_attachments);
151 ret
152 }
153 #[cfg(web_sys_unstable_apis)]
154 #[deprecated = "Use `set_label()` instead."]
155 pub fn label(&mut self, val: &str) -> &mut Self {
156 self.set_label(val);
157 self
158 }
159 #[cfg(web_sys_unstable_apis)]
160 #[deprecated = "Use `set_color_attachments()` instead."]
161 pub fn color_attachments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
162 self.set_color_attachments(val);
163 self
164 }
165 #[cfg(web_sys_unstable_apis)]
166 #[cfg(feature = "GpuRenderPassDepthStencilAttachment")]
167 #[deprecated = "Use `set_depth_stencil_attachment()` instead."]
168 pub fn depth_stencil_attachment(
169 &mut self,
170 val: &GpuRenderPassDepthStencilAttachment,
171 ) -> &mut Self {
172 self.set_depth_stencil_attachment(val);
173 self
174 }
175 #[cfg(web_sys_unstable_apis)]
176 #[deprecated = "Use `set_max_draw_count()` instead."]
177 pub fn max_draw_count(&mut self, val: f64) -> &mut Self {
178 self.set_max_draw_count(val);
179 self
180 }
181 #[cfg(web_sys_unstable_apis)]
182 #[cfg(feature = "GpuQuerySet")]
183 #[deprecated = "Use `set_occlusion_query_set()` instead."]
184 pub fn occlusion_query_set(&mut self, val: &GpuQuerySet) -> &mut Self {
185 self.set_occlusion_query_set(val);
186 self
187 }
188 #[cfg(web_sys_unstable_apis)]
189 #[cfg(feature = "GpuRenderPassTimestampWrites")]
190 #[deprecated = "Use `set_timestamp_writes()` instead."]
191 pub fn timestamp_writes(&mut self, val: &GpuRenderPassTimestampWrites) -> &mut Self {
192 self.set_timestamp_writes(val);
193 self
194 }
195}