pub struct TextureViewPool(/* private fields */);Expand description
A pool for managing texture views.
C++ equivalent: MTL::TextureViewPool
Texture view pools allow efficient creation and management of texture views for bindless rendering. They inherit from ResourceViewPool.
Implementations§
Source§impl TextureViewPool
impl TextureViewPool
Sourcepub fn device(&self) -> Device
pub fn device(&self) -> Device
Get the device that created this pool.
C++ equivalent: Device* device() const
Sourcepub fn resource_view_count(&self) -> UInteger
pub fn resource_view_count(&self) -> UInteger
Get the resource view count.
C++ equivalent: NS::UInteger resourceViewCount() const
Sourcepub fn base_resource_id(&self) -> ResourceID
pub fn base_resource_id(&self) -> ResourceID
Get the base resource ID for bindless access.
C++ equivalent: ResourceID baseResourceID() const
Sourcepub fn copy_resource_views_from_pool(
&self,
source: &TextureViewPool,
source_location: UInteger,
source_length: UInteger,
destination_index: UInteger,
)
pub fn copy_resource_views_from_pool( &self, source: &TextureViewPool, source_location: UInteger, source_length: UInteger, destination_index: UInteger, )
Copy resource views from another pool.
C++ equivalent: void copyResourceViewsFromPool(const ResourceViewPool*, NS::Range, NS::UInteger)
Sourcepub fn set_texture_view(&self, texture: &Texture, index: UInteger)
pub fn set_texture_view(&self, texture: &Texture, index: UInteger)
Set a texture view at the specified index.
C++ equivalent: void setTextureView(const Texture*, NS::UInteger)
Sourcepub fn set_texture_view_with_descriptor(
&self,
texture: &Texture,
descriptor: &TextureViewDescriptor,
index: UInteger,
)
pub fn set_texture_view_with_descriptor( &self, texture: &Texture, descriptor: &TextureViewDescriptor, index: UInteger, )
Set a texture view with a descriptor at the specified index.
C++ equivalent: void setTextureView(const Texture*, const TextureViewDescriptor*, NS::UInteger)
Sourcepub fn set_texture_view_from_buffer(
&self,
buffer: &Buffer,
descriptor: &TextureDescriptor,
offset: UInteger,
bytes_per_row: UInteger,
index: UInteger,
)
pub fn set_texture_view_from_buffer( &self, buffer: &Buffer, descriptor: &TextureDescriptor, offset: UInteger, bytes_per_row: UInteger, index: UInteger, )
Set a texture view from a buffer.
C++ equivalent: void setTextureViewFromBuffer(const Buffer*, const TextureDescriptor*, NS::UInteger, NS::UInteger, NS::UInteger)
Sourcepub unsafe fn set_texture_view_from_buffer_raw(
&self,
buffer: *const c_void,
descriptor: *const c_void,
offset: UInteger,
bytes_per_row: UInteger,
index: UInteger,
)
pub unsafe fn set_texture_view_from_buffer_raw( &self, buffer: *const c_void, descriptor: *const c_void, offset: UInteger, bytes_per_row: UInteger, index: UInteger, )
Set a texture view from a buffer (raw pointer version).
C++ equivalent: void setTextureViewFromBuffer(const Buffer*, const TextureDescriptor*, NS::UInteger, NS::UInteger, NS::UInteger)
§Safety
All pointers must be valid Metal objects.