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,
);
}