Skip to main content

ResourceDevice

Trait ResourceDevice 

Source
pub trait ResourceDevice {
    type Buffer: Send + Sync + Clone + Copy + Debug + Hash + PartialEq;
    type Texture: Send + Sync + Clone + Copy + Debug + Hash + PartialEq;
    type TextureView: Send + Sync + Clone + Copy + Debug + Hash + PartialEq;
    type Sampler: Send + Sync + Clone + Copy + Debug + Hash + PartialEq;
    type AccelerationStructure: Send + Sync + Clone + Copy + Debug + Hash + PartialEq;

    // Required methods
    fn create_buffer(&self, desc: BufferDesc<'_>) -> Self::Buffer;
    fn sync_buffer(&self, buffer: Self::Buffer);
    fn destroy_buffer(&self, buffer: Self::Buffer);
    fn create_texture(&self, desc: TextureDesc<'_>) -> Self::Texture;
    fn destroy_texture(&self, texture: Self::Texture);
    fn create_texture_view(
        &self,
        texture: Self::Texture,
        desc: TextureViewDesc<'_>,
    ) -> Self::TextureView;
    fn destroy_texture_view(&self, view: Self::TextureView);
    fn create_sampler(&self, desc: SamplerDesc<'_>) -> Self::Sampler;
    fn destroy_sampler(&self, sampler: Self::Sampler);
    fn create_acceleration_structure(
        &self,
        desc: AccelerationStructureDesc<'_>,
    ) -> Self::AccelerationStructure;
    fn destroy_acceleration_structure(
        &self,
        acceleration_structure: Self::AccelerationStructure,
    );
}

Required Associated Types§

Required Methods§

Source

fn create_buffer(&self, desc: BufferDesc<'_>) -> Self::Buffer

Source

fn sync_buffer(&self, buffer: Self::Buffer)

Source

fn destroy_buffer(&self, buffer: Self::Buffer)

Source

fn create_texture(&self, desc: TextureDesc<'_>) -> Self::Texture

Source

fn destroy_texture(&self, texture: Self::Texture)

Source

fn create_texture_view( &self, texture: Self::Texture, desc: TextureViewDesc<'_>, ) -> Self::TextureView

Source

fn destroy_texture_view(&self, view: Self::TextureView)

Source

fn create_sampler(&self, desc: SamplerDesc<'_>) -> Self::Sampler

Source

fn destroy_sampler(&self, sampler: Self::Sampler)

Source

fn create_acceleration_structure( &self, desc: AccelerationStructureDesc<'_>, ) -> Self::AccelerationStructure

Source

fn destroy_acceleration_structure( &self, acceleration_structure: Self::AccelerationStructure, )

Implementors§