Struct truck_rendimpl::PolygonInstance [−][src]
pub struct PolygonInstance { /* fields omitted */ }Expand description
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
Clone the instance as another drawn element.
Returns a reference to the instance descriptor.
Returns the mutable reference to instance descriptor.
swap vertex buffers
Trait Implementations
fn vertex_buffer(
&self,
_: &DeviceHandler
) -> (Arc<BufferHandler>, Option<Arc<BufferHandler>>)
fn vertex_buffer(
&self,
_: &DeviceHandler
) -> (Arc<BufferHandler>, Option<Arc<BufferHandler>>)
Creates the pair (vertex buffer, index buffer).
Creates the bind group layout.
fn bind_group(
&self,
device_handler: &DeviceHandler,
layout: &BindGroupLayout
) -> Arc<BindGroup>
fn bind_group(
&self,
device_handler: &DeviceHandler,
layout: &BindGroupLayout
) -> Arc<BindGroup>
Creates the bind group in set = 1.
fn pipeline(
&self,
device_handler: &DeviceHandler,
layout: &PipelineLayout,
scene_desc: &SceneDescriptor
) -> Arc<RenderPipeline>
fn pipeline(
&self,
device_handler: &DeviceHandler,
layout: &PipelineLayout,
scene_desc: &SceneDescriptor
) -> Arc<RenderPipeline>
Creates the render pipeline.
type State = PolygonState
type State = PolygonState
Configuation deacriptor for instance.
fn to_instance(
&self,
handler: &DeviceHandler,
shaders: &PolygonShaders,
state: &PolygonState
) -> PolygonInstance
fn to_instance(
&self,
handler: &DeviceHandler,
shaders: &PolygonShaders,
state: &PolygonState
) -> PolygonInstance
Creates Instance from self.
type State = PolygonState
type State = PolygonState
Configuation deacriptor for instance.
fn to_instance(
&self,
handler: &DeviceHandler,
shaders: &PolygonShaders,
state: &PolygonState
) -> PolygonInstance
fn to_instance(
&self,
handler: &DeviceHandler,
shaders: &PolygonShaders,
state: &PolygonState
) -> PolygonInstance
Creates Instance from self.