pub struct GpuGeometry { /* private fields */ }
Expand description

A pointer to a [CxGpuGeometry] (indexed in Cx::gpu_geometries using GpuGeometry::gpu_geometry_id),

Cloning a GpuGeometry doesn’t copy the underlying buffer; it just adds a reference count to the existing buffer.

The corresponding GPU buffer ([CxGpuGeometry]) gets marked for reuse when there are no more references to it.

TODO(JP): When creating a big GpuGeometry and then dropping it, we don’t clear out the data until we reuse it (which might be never). We might want to add a cleanup sweep at the end of the draw cycle. Also, in some renderers we might not shrink GPU buffers when we reuse a previous [CxGpuGeometry].

Implementations

Create a GpuGeometry from a Geometry.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.