Struct ocl::Sampler
[−]
[src]
#[repr(C)]pub struct Sampler(_);
An image sampler used to process images.
Methods
impl Sampler
[src]
pub fn new(
context: &Context,
normalize_coords: bool,
addressing_mode: AddressingMode,
filter_mode: FilterMode
) -> OclResult<Sampler>
[src]
context: &Context,
normalize_coords: bool,
addressing_mode: AddressingMode,
filter_mode: FilterMode
) -> OclResult<Sampler>
Creates and returns a new sampler.
Enum Quick Reference
addressing_mode
:
- AddressingMode::None
- AddressingMode::ClampToEdge
- AddressingMode::Clamp
- AddressingMode::Repeat
- AddressingMode::MirroredRepeat
filter_mode
:
- FilterMode::Nearest
- FilterMode::Linear
See SDK Docs for more information.
pub fn with_defaults(context: &Context) -> OclResult<Sampler>
[src]
Creates and returns a new sampler with some default settings.
Defaults
normalize_coords
: falseaddressing_mode
:AddressingMode::None
filter_mode
:FilterMode::Nearest
pub fn info(&self, info_kind: SamplerInfo) -> OclCoreResult<SamplerInfoResult>
[src]
Returns various kinds of information about the sampler.
Methods from Deref<Target = SamplerCore>
Trait Implementations
impl Clone for Sampler
[src]
fn clone(&self) -> Sampler
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Sampler
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Display for Sampler
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Deref for Sampler
[src]
type Target = SamplerCore
The resulting type after dereferencing.
fn deref(&self) -> &SamplerCore
[src]
Dereferences the value.
impl DerefMut for Sampler
[src]
fn deref_mut(&mut self) -> &mut SamplerCore
[src]
Mutably dereferences the value.