pub struct Sampler { /* private fields */ }
Expand description
An OpenCL sampler.
Has methods to return information from calls to clGetSamplerInfo with the
appropriate parameters.
Implements the Drop trait to call release_sampler when the object is dropped.
Implementations§
source§impl Sampler
impl Sampler
pub fn new(sampler: cl_sampler) -> Sampler
pub fn create( context: &Context, normalize_coords: cl_bool, addressing_mode: cl_addressing_mode, filter_mode: cl_filter_mode ) -> Result<Sampler>
👎Deprecated since 0.1.0: From CL_VERSION_2_0 use create_sampler_with_properties
pub fn create_with_properties( context: &Context, properties: *const cl_sampler_properties ) -> Result<Sampler>
pub fn get(&self) -> cl_sampler
pub fn reference_count(&self) -> Result<cl_uint>
pub fn context(&self) -> Result<cl_context>
pub fn normalized_coords(&self) -> Result<bool>
pub fn addressing_mode(&self) -> Result<cl_addressing_mode>
pub fn filter_mode(&self) -> Result<cl_filter_mode>
pub fn sampler_properties(&self) -> Result<Vec<intptr_t>>
Trait Implementations§
source§impl From<Sampler> for cl_sampler
impl From<Sampler> for cl_sampler
impl Send for Sampler
Auto Trait Implementations§
impl Freeze for Sampler
impl RefUnwindSafe for Sampler
impl !Sync for Sampler
impl Unpin for Sampler
impl UnwindSafe for Sampler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more