Type Alias maplibre::vector::VectorBufferPool
source · pub type VectorBufferPool = BufferPool<Queue, Buffer, ShaderVertex, IndexDataType, ShaderLayerMetadata, ShaderFeatureStyle>;
Aliased Type§
struct VectorBufferPool {
vertices: BackingBuffer<Buffer>,
indices: BackingBuffer<Buffer>,
layer_metadata: BackingBuffer<Buffer>,
feature_metadata: BackingBuffer<Buffer>,
index: RingIndex,
phantom_v: PhantomData<ShaderVertex>,
phantom_i: PhantomData<u32>,
phantom_q: PhantomData<Queue>,
phantom_m: PhantomData<ShaderLayerMetadata>,
phantom_fm: PhantomData<ShaderFeatureStyle>,
}
Fields§
§vertices: BackingBuffer<Buffer>
§indices: BackingBuffer<Buffer>
§layer_metadata: BackingBuffer<Buffer>
§feature_metadata: BackingBuffer<Buffer>
§index: RingIndex
§phantom_v: PhantomData<ShaderVertex>
§phantom_i: PhantomData<u32>
§phantom_q: PhantomData<Queue>
§phantom_m: PhantomData<ShaderLayerMetadata>
§phantom_fm: PhantomData<ShaderFeatureStyle>
Implementations
source§impl<Q: Queue<B>, B, V: Pod, I: Pod, TM: Pod, FM: Pod> BufferPool<Q, B, V, I, TM, FM>
impl<Q: Queue<B>, B, V: Pod, I: Pod, TM: Pod, FM: Pod> BufferPool<Q, B, V, I, TM, FM>
pub fn new( vertices: BackingBufferDescriptor<B>, indices: BackingBufferDescriptor<B>, layer_metadata: BackingBufferDescriptor<B>, feature_metadata: BackingBufferDescriptor<B> ) -> Self
pub fn clear(&mut self)
pub fn vertices(&self) -> &B
pub fn indices(&self) -> &B
pub fn metadata(&self) -> &B
pub fn feature_metadata(&self) -> &B
sourcefn align(
stride: BufferAddress,
elements: BufferAddress,
usable_elements: BufferAddress
) -> (BufferAddress, BufferAddress)
fn align( stride: BufferAddress, elements: BufferAddress, usable_elements: BufferAddress ) -> (BufferAddress, BufferAddress)
The VertexBuffers can contain padding elements. Not everything from a VertexBuffers is useable.
The function returns the bytes
and aligned_bytes
. See OverAlignedVertexBuffer
.
pub fn get_loaded_source_layers_at( &self, coords: WorldTileCoords ) -> Option<HashSet<&str>>
sourcepub fn allocate_layer_geometry(
&mut self,
queue: &Q,
coords: WorldTileCoords,
style_layer: StyleLayer,
geometry: &OverAlignedVertexBuffer<V, I>,
layer_metadata: TM,
feature_metadata: &[FM]
)
pub fn allocate_layer_geometry( &mut self, queue: &Q, coords: WorldTileCoords, style_layer: StyleLayer, geometry: &OverAlignedVertexBuffer<V, I>, layer_metadata: TM, feature_metadata: &[FM] )
Allocates
geometry
layer_metadata
andfeature_metadata
for a layer. This function is able to dynamically evict layers if there is not enough space available.