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

Formats the value using the given formatter. Read more

Returns the render id. Read more

Creates the pair (vertex buffer, index buffer).

Creates the bind group layout.

Creates the bind group in set = 1.

Creates the render pipeline.

Configuation deacriptor for instance.

Creates Instance from self.

Configuation deacriptor for instance.

Creates Instance from self.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.