Struct ocl::builders::ContextProperties
[−]
[src]
pub struct ContextProperties(_);
Context properties list.
[MINIMALLY TESTED]
TODO: Check for duplicate property assignments.
Methods
impl ContextProperties
[src]
fn new() -> ContextProperties
Returns an empty new list of context properties
fn platform<P>(self, platform: P) -> ContextProperties where
P: Into<PlatformId>,
P: Into<PlatformId>,
Specifies a platform (builder-style).
fn interop_user_sync(self, sync: bool) -> ContextProperties
Specifies whether the user is responsible for synchronization between OpenCL and other APIs (builder-style).
fn gl_context(self, gl_ctx: u32) -> ContextProperties
Specifies an OpenGL context handle (builder-style).
fn glx_display(self, glx_disp: *mut c_void) -> ContextProperties
Specifies a Display pointer for the GLX context (builder-style).
Specifies an OpenGL context CGL share group to associate the OpenCL context with (builder-style).
fn property_value(self, prop: ContextPropertyValue) -> ContextProperties
Pushes a ContextPropertyValue
onto this list of properties
(builder-style).
fn set_platform<P>(&mut self, platform: P) where
P: Into<PlatformId>,
P: Into<PlatformId>,
Specifies a platform.
fn set_interop_user_sync(&mut self, sync: bool)
Specifies whether the user is responsible for synchronization between OpenCL and other APIs.
fn set_gl_context(&mut self, gl_ctx: u32)
Specifies an OpenGL context handle.
fn set_glx_display(&mut self, glx_disp: *mut c_void)
Specifies a Display pointer for the GLX context.
Specifies an OpenGL context CGL share group to associate the OpenCL context with.
fn set_property_value(&mut self, prop: ContextPropertyValue)
Pushes a ContextPropertyValue
onto this list of properties.
fn get_platform(&self) -> Option<PlatformId>
Returns a platform id or none.
Returns a cgl_sharegroup id or none.
fn to_raw(&self) -> Vec<isize>
Converts this list into a packed-word representation as specified here.
unsafe fn extract_property_from_raw(
property: ContextProperty,
raw_context_properties: &[isize]
) -> Option<ContextPropertyValue>
property: ContextProperty,
raw_context_properties: &[isize]
) -> Option<ContextPropertyValue>
Returns a single context property value.
unsafe fn from_raw(
raw_context_properties: &[isize]
) -> Result<ContextProperties, Error>
raw_context_properties: &[isize]
) -> Result<ContextProperties, Error>
Converts raw stuff into other stuff.
Trait Implementations
impl Debug for ContextProperties
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for ContextProperties
[src]
fn clone(&self) -> ContextProperties
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more