[−][src]Struct truck_rendimpl::InstanceDescriptor
Configures of instances.
Fields
matrix: Matrix4instance matrix
material: Materialmaterial of instance
texture: Option<Arc<DynamicImage>>texture of instance
backface_culling: boolIf this parameter is true, the backface culling will be activated.
Implementations
impl InstanceDescriptor[src]
pub fn matrix_buffer(&self, device: &Device) -> BufferHandler[src]
Creates a UNIFORM buffer of instance matrix.
The bind group provided by the instances holds this uniform buffer.
Shader Examples
layout(set = 1, binding = 0) uniform ModelMatrix {
mat4 uniform_matrix;
};
pub fn material_buffer(&self, device: &Device) -> BufferHandler[src]
Creates a UNIFORM buffer of material.
The bind group provided by the instances holds this uniform buffer.
Shader Examples
layout(set = 1, binding = 1) uniform Material {
vec4 albedo;
float roughness;
float reflectance;
float ambient_ratio;
};
pub fn textureview_and_sampler(
&self,
device: &Device,
queue: &Queue
) -> (TextureView, Sampler)[src]
&self,
device: &Device,
queue: &Queue
) -> (TextureView, Sampler)
Creates texture view and sampler of the instance's texture image.
The bind group provided by the instances holds this uniform buffer.
Shader Examples
layout(set = 1, binding = 2) uniform texture2D texture_view;
layout(set = 1, binding = 3) uniform sampler texture_sampler;
Trait Implementations
impl Clone for InstanceDescriptor[src]
fn clone(&self) -> InstanceDescriptor[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for InstanceDescriptor[src]
impl Default for InstanceDescriptor[src]
fn default() -> InstanceDescriptor[src]
Auto Trait Implementations
impl RefUnwindSafe for InstanceDescriptor[src]
impl Send for InstanceDescriptor[src]
impl Sync for InstanceDescriptor[src]
impl Unpin for InstanceDescriptor[src]
impl UnwindSafe for InstanceDescriptor[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,