Trait draw2d::graphics::ext::SamplerFactory [−][src]
pub trait SamplerFactory { unsafe fn create_sampler(
&self,
debug_name: impl Into<String>,
sampler_create_info: SamplerCreateInfo
) -> Result<Sampler>; unsafe fn destroy_sampler(&self, sampler: Sampler); }
Expand description
Types which implement this trait can create and destroy raw vulkan samplers.
Required methods
unsafe fn create_sampler(
&self,
debug_name: impl Into<String>,
sampler_create_info: SamplerCreateInfo
) -> Result<Sampler>
unsafe fn create_sampler(
&self,
debug_name: impl Into<String>,
sampler_create_info: SamplerCreateInfo
) -> Result<Sampler>
Create a new sampler.
Unsafe Because
- the caller must remember to destroy the sampler when they’re done with it.
unsafe fn destroy_sampler(&self, sampler: Sampler)
unsafe fn destroy_sampler(&self, sampler: Sampler)
Destroy a sampler.
Unsafe Because
- the caller must ensure that the sampler is not in use by the GPU when it is destroyed.