Struct truck_rendimpl::PolygonInstance [−][src]
Instance of polygon
One can duplicate polygons with different postures and materials that have the same mesh data. To save memory, mesh data on the GPU can be used again.
The duplicated polygon by Clone::clone
has the same mesh data and descriptor
with original, however, its render id is different from the one of original.
Implementations
impl PolygonInstance
[src]
pub fn clone_instance(&self) -> PolygonInstance
[src]
Clone the instance as another drawn element.
pub fn descriptor(&self) -> &InstanceDescriptor
[src]
Returns a reference to the instance descriptor.
pub fn descriptor_mut(&mut self) -> &mut InstanceDescriptor
[src]
Returns the mutable reference to instance descriptor.
pub fn default_vertex_shader() -> ShaderModuleSource<'static>
[src]
Returns the default vertex shader module source.
The GLSL original code is src/shaders/polygon.vert
.
pub fn default_fragment_shader() -> ShaderModuleSource<'static>
[src]
Returns the default fragment shader module source for non-textured polygons.
The GLSL original code is src/shaders/polygon.frag
.
pub fn default_textured_fragment_shader() -> ShaderModuleSource<'static>
[src]
Returns the default fragment shader module source for textured polygons.
The GLSL original code is src/shaders/textured-polygon.frag
.
pub fn pipeline_with_shader(
&self,
vertex_shader: ShaderModuleSource<'_>,
fragment_shader: ShaderModuleSource<'_>,
device_handler: &DeviceHandler,
layout: &PipelineLayout,
sample_count: u32
) -> Arc<RenderPipeline>
[src]
&self,
vertex_shader: ShaderModuleSource<'_>,
fragment_shader: ShaderModuleSource<'_>,
device_handler: &DeviceHandler,
layout: &PipelineLayout,
sample_count: u32
) -> Arc<RenderPipeline>
Returns the pipeline with developer's custom shader.
Trait Implementations
impl Clone for PolygonInstance
[src]
fn clone(&self) -> PolygonInstance
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PolygonInstance
[src]
impl Rendered for PolygonInstance
[src]
fn render_id(&self) -> RenderID
[src]
fn vertex_buffer(
&self,
_: &DeviceHandler
) -> (Arc<BufferHandler>, Option<Arc<BufferHandler>>)
[src]
&self,
_: &DeviceHandler
) -> (Arc<BufferHandler>, Option<Arc<BufferHandler>>)
fn bind_group_layout(
&self,
device_handler: &DeviceHandler
) -> Arc<BindGroupLayout>
[src]
&self,
device_handler: &DeviceHandler
) -> Arc<BindGroupLayout>
fn bind_group(
&self,
device_handler: &DeviceHandler,
layout: &BindGroupLayout
) -> Arc<BindGroup>
[src]
&self,
device_handler: &DeviceHandler,
layout: &BindGroupLayout
) -> Arc<BindGroup>
fn pipeline(
&self,
device_handler: &DeviceHandler,
layout: &PipelineLayout,
sample_count: u32
) -> Arc<RenderPipeline>
[src]
&self,
device_handler: &DeviceHandler,
layout: &PipelineLayout,
sample_count: u32
) -> Arc<RenderPipeline>
Auto Trait Implementations
impl RefUnwindSafe for PolygonInstance
[src]
impl Send for PolygonInstance
[src]
impl Sync for PolygonInstance
[src]
impl Unpin for PolygonInstance
[src]
impl UnwindSafe for PolygonInstance
[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>,