Struct zaplib::GpuGeometry
source · [−]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
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GpuGeometry
impl !Send for GpuGeometry
impl !Sync for GpuGeometry
impl Unpin for GpuGeometry
impl UnwindSafe for GpuGeometry
Blanket Implementations
Mutably borrows from an owned value. Read more