pub struct RenderBindingBuilder { /* private fields */ }Expand description
A builder for the render binding. This is used in the description of the render binding to specify the buffers and textures that should be created on the gpu, and to build the bind group layout and bind group entries.
Implementations§
Source§impl RenderBindingBuilder
impl RenderBindingBuilder
Sourcepub fn add_buffer<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
pub fn add_buffer<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
Adds a buffer to the render binding. The render_data parameter is the RenderData that contains the buffer, and the render_data_idx parameter is the index of the buffer in this render data.
Sourcepub fn add_buffer_from_id(
&mut self,
buffer: Option<AssetId<Buffer>>,
) -> &mut Self
pub fn add_buffer_from_id( &mut self, buffer: Option<AssetId<Buffer>>, ) -> &mut Self
Adds a buffer directly from an asset id.
Sourcepub fn add_texture_view<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
pub fn add_texture_view<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
Adds a texture view to the render binding. The render_data parameter is the RenderData that contains the texture, and the render_data_idx parameter is the index of the texture in this render data.
Sourcepub fn add_texture_view_from_id(
&mut self,
texture: Option<AssetId<Texture>>,
) -> &mut Self
pub fn add_texture_view_from_id( &mut self, texture: Option<AssetId<Texture>>, ) -> &mut Self
Adds a texture view directly from an asset id.
Sourcepub fn add_texture_array_view<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
pub fn add_texture_array_view<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
Adds a texture array view to the render binding. The render_data parameter is the RenderData that contains the texture, and the render_data_idx parameter is the index of the texture in this render data.
Sourcepub fn add_texture_array_view_from_id(
&mut self,
texture: Option<AssetId<Texture>>,
) -> &mut Self
pub fn add_texture_array_view_from_id( &mut self, texture: Option<AssetId<Texture>>, ) -> &mut Self
Adds a texture array view directly from an asset id.
Sourcepub fn add_texture_sampler<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
pub fn add_texture_sampler<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
Adds a texture sampler to the render binding. The render_data parameter is the RenderData that contains the texture, and the render_data_idx parameter is the index of the texture in this render data.
Sourcepub fn add_texture_sampler_from_id(
&mut self,
texture: Option<AssetId<Texture>>,
) -> &mut Self
pub fn add_texture_sampler_from_id( &mut self, texture: Option<AssetId<Texture>>, ) -> &mut Self
Adds a texture sampler directly from an asset id.
Sourcepub fn add_storage_texture<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
pub fn add_storage_texture<R>(
&mut self,
render_data: &RenderAssets<GpuRenderData<R>>,
render_data_idx: u32,
) -> &mut Selfwhere
R: RenderData + Clone + Asset + 'static,
Adds a storage texture view to the render binding. The render_data parameter is the RenderData that contains the texture, and the render_data_idx parameter is the index of the texture in this render data.
Sourcepub fn add_storage_texture_from_id(
&mut self,
texture: Option<AssetId<Texture>>,
) -> &mut Self
pub fn add_storage_texture_from_id( &mut self, texture: Option<AssetId<Texture>>, ) -> &mut Self
Adds a storage texture view directly from an asset id.
Trait Implementations§
Source§impl Default for RenderBindingBuilder
impl Default for RenderBindingBuilder
Source§fn default() -> RenderBindingBuilder
fn default() -> RenderBindingBuilder
Auto Trait Implementations§
impl Freeze for RenderBindingBuilder
impl RefUnwindSafe for RenderBindingBuilder
impl Send for RenderBindingBuilder
impl Sync for RenderBindingBuilder
impl Unpin for RenderBindingBuilder
impl UnwindSafe for RenderBindingBuilder
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more