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>

source

pub fn new( vertices: BackingBufferDescriptor<B>, indices: BackingBufferDescriptor<B>, layer_metadata: BackingBufferDescriptor<B>, feature_metadata: BackingBufferDescriptor<B> ) -> Self

source

pub fn clear(&mut self)

source

pub fn vertices(&self) -> &B

source

pub fn indices(&self) -> &B

source

pub fn metadata(&self) -> &B

source

pub fn feature_metadata(&self) -> &B

source

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.

source

pub fn get_loaded_source_layers_at( &self, coords: WorldTileCoords ) -> Option<HashSet<&str>>

source

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 and
  • feature_metadata for a layer. This function is able to dynamically evict layers if there is not enough space available.
source

pub fn update_layer_metadata( &self, queue: &Q, entry: &IndexEntry, layer_metadata: TM )

source

pub fn update_feature_metadata( &self, queue: &Q, entry: &IndexEntry, feature_metadata: &[FM] )

source

pub fn index(&self) -> &RingIndex

source§

impl<V: Pod, I: Pod, TM: Pod, FM: Pod> BufferPool<Queue, Buffer, V, I, TM, FM>

source

pub fn from_device(device: &Device) -> Self

Trait Implementations

source§

impl<Q: Debug, B: Debug, V: Debug, I: Debug, TM: Debug, FM: Debug> Debug for BufferPool<Q, B, V, I, TM, FM>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Q: Queue<B>, B, V: Pod, I: Pod, TM: Pod, FM: Pod> HasTile for BufferPool<Q, B, V, I, TM, FM>

source§

fn has_tile(&self, coords: WorldTileCoords, _world: &World) -> bool

source§

fn get_available_parent( &self, coords: WorldTileCoords, world: &World ) -> Option<WorldTileCoords>

source§

fn get_available_children( &self, coords: WorldTileCoords, world: &World, search_depth: usize ) -> Option<Vec<WorldTileCoords>>