1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[cfg(web_sys_unstable_apis)] 5 #[wasm_bindgen] 6 extern "C" { 7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPURenderPassDescriptor)] 8 #[derive(Debug, Clone, PartialEq, Eq)] 9 #[doc = "The `GpuRenderPassDescriptor` dictionary."] 10 #[doc = ""] 11 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] 12 #[doc = ""] 13 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] 14 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] 15 pub type GpuRenderPassDescriptor; 16 } 17 #[cfg(web_sys_unstable_apis)] 18 impl GpuRenderPassDescriptor { 19 #[doc = "Construct a new `GpuRenderPassDescriptor`."] 20 #[doc = ""] 21 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] 22 #[doc = ""] 23 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] 24 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] new(color_attachments: &::wasm_bindgen::JsValue) -> Self25 pub fn new(color_attachments: &::wasm_bindgen::JsValue) -> Self { 26 #[allow(unused_mut)] 27 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); 28 ret.color_attachments(color_attachments); 29 ret 30 } 31 #[cfg(web_sys_unstable_apis)] 32 #[doc = "Change the `label` field of this object."] 33 #[doc = ""] 34 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] 35 #[doc = ""] 36 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] 37 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] label(&mut self, val: &str) -> &mut Self38 pub fn label(&mut self, val: &str) -> &mut Self { 39 use wasm_bindgen::JsValue; 40 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("label"), &JsValue::from(val)); 41 debug_assert!( 42 r.is_ok(), 43 "setting properties should never fail on our dictionary objects" 44 ); 45 let _ = r; 46 self 47 } 48 #[cfg(web_sys_unstable_apis)] 49 #[doc = "Change the `colorAttachments` field of this object."] 50 #[doc = ""] 51 #[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] color_attachments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self55 pub fn color_attachments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 56 use wasm_bindgen::JsValue; 57 let r = ::js_sys::Reflect::set( 58 self.as_ref(), 59 &JsValue::from("colorAttachments"), 60 &JsValue::from(val), 61 ); 62 debug_assert!( 63 r.is_ok(), 64 "setting properties should never fail on our dictionary objects" 65 ); 66 let _ = r; 67 self 68 } 69 #[cfg(web_sys_unstable_apis)] 70 #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] 71 #[doc = "Change the `depthStencilAttachment` field of this object."] 72 #[doc = ""] 73 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"] 74 #[doc = ""] 75 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] 76 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] depth_stencil_attachment( &mut self, val: &GpuRenderPassDepthStencilAttachment, ) -> &mut Self77 pub fn depth_stencil_attachment( 78 &mut self, 79 val: &GpuRenderPassDepthStencilAttachment, 80 ) -> &mut Self { 81 use wasm_bindgen::JsValue; 82 let r = ::js_sys::Reflect::set( 83 self.as_ref(), 84 &JsValue::from("depthStencilAttachment"), 85 &JsValue::from(val), 86 ); 87 debug_assert!( 88 r.is_ok(), 89 "setting properties should never fail on our dictionary objects" 90 ); 91 let _ = r; 92 self 93 } 94 #[cfg(web_sys_unstable_apis)] 95 #[cfg(feature = "GpuQuerySet")] 96 #[doc = "Change the `occlusionQuerySet` field of this object."] 97 #[doc = ""] 98 #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"] 99 #[doc = ""] 100 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] 101 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] occlusion_query_set(&mut self, val: &GpuQuerySet) -> &mut Self102 pub fn occlusion_query_set(&mut self, val: &GpuQuerySet) -> &mut Self { 103 use wasm_bindgen::JsValue; 104 let r = ::js_sys::Reflect::set( 105 self.as_ref(), 106 &JsValue::from("occlusionQuerySet"), 107 &JsValue::from(val), 108 ); 109 debug_assert!( 110 r.is_ok(), 111 "setting properties should never fail on our dictionary objects" 112 ); 113 let _ = r; 114 self 115 } 116 } 117