pub struct RenderPassColorAttachment {
pub view: Option<JsValue>,
pub resolve_target: Option<JsValue>,
pub clear_value: Option<(f64, f64, f64, f64)>,
pub load_op: Option<&'static str>,
pub store_op: Option<&'static str>,
}Expand description
The descriptor for a single (color or depth-stencil) render pass
attachment, used as input to begin_render_pass / begin_render_pass_to_texture.
Fields§
§view: Option<JsValue>The texture view to draw into.
When None, the renderer uses the swap-chain view (or the MSAA
intermediate view if antialias == true).
resolve_target: Option<JsValue>An optional resolve target for MSAA.
None when MSAA is disabled. The renderer fills in the default
resolve target (the swap-chain view) when MSAA is enabled and the
caller leaves this as None.
clear_value: Option<(f64, f64, f64, f64)>The clear color as (r, g, b, a) in 0.0..=1.0. None means
"load" (keep the previous contents).
load_op: Option<&'static str>The load operation. None → "clear" when clear_value is
Some, otherwise "load".
store_op: Option<&'static str>The store operation. None → "store".
Implementations§
Source§impl RenderPassColorAttachment
impl RenderPassColorAttachment
pub fn get_view(&self) -> JsValue
pub fn try_get_view(&self) -> &Option<JsValue>
pub fn get_resolve_target(&self) -> JsValue
pub fn try_get_resolve_target(&self) -> &Option<JsValue>
pub fn get_clear_value(&self) -> (f64, f64, f64, f64)
pub fn try_get_clear_value(&self) -> &Option<(f64, f64, f64, f64)>
pub fn get_load_op(&self) -> &'static str
pub fn try_get_load_op(&self) -> &Option<&'static str>
pub fn get_store_op(&self) -> &'static str
pub fn try_get_store_op(&self) -> &Option<&'static str>
Trait Implementations§
Source§impl Clone for RenderPassColorAttachment
impl Clone for RenderPassColorAttachment
Auto Trait Implementations§
impl Freeze for RenderPassColorAttachment
impl RefUnwindSafe for RenderPassColorAttachment
impl Send for RenderPassColorAttachment
impl Sync for RenderPassColorAttachment
impl Unpin for RenderPassColorAttachment
impl UnsafeUnpin for RenderPassColorAttachment
impl UnwindSafe for RenderPassColorAttachment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more