Struct ocl::builders::ContextProperties
[−]
[src]
pub struct ContextProperties { /* fields omitted */ }
Context properties list.
[MINIMALLY TESTED]
TODO: Check for duplicate property assignments.
Methods
impl ContextProperties
[src]
pub fn new() -> ContextProperties
[src]
Returns an empty new list of context properties
pub fn platform<P>(self, platform: P) -> ContextProperties where
P: Into<PlatformId>,
[src]
P: Into<PlatformId>,
Specifies a platform (builder-style).
pub fn interop_user_sync(self, sync: bool) -> ContextProperties
[src]
Specifies whether the user is responsible for synchronization between OpenCL and other APIs (builder-style).
pub fn gl_context(self, gl_ctx: *mut c_void) -> ContextProperties
[src]
Specifies an OpenGL context handle (builder-style).
pub fn glx_display(self, glx_disp: *mut c_void) -> ContextProperties
[src]
Specifies a Display pointer for the GLX context (builder-style).
pub fn wgl_hdc(self, wgl_hdc: *mut c_void) -> ContextProperties
[src]
Specifies a Display pointer for the WGL HDC (builder-style).
[src]
Specifies an OpenGL context CGL share group to associate the OpenCL context with (builder-style).
pub fn egl_display(self, egl_disp: *mut c_void) -> ContextProperties
[src]
Specifies a pointer for the EGL display (builder-style).
pub fn property_value(self, prop: ContextPropertyValue) -> ContextProperties
[src]
Pushes a ContextPropertyValue
onto this list of properties
(builder-style).
pub fn set_platform<P>(&mut self, platform: P) where
P: Into<PlatformId>,
[src]
P: Into<PlatformId>,
Specifies a platform.
pub fn set_interop_user_sync(&mut self, sync: bool)
[src]
Specifies whether the user is responsible for synchronization between OpenCL and other APIs.
pub fn set_gl_context(&mut self, gl_ctx: *mut c_void)
[src]
Specifies an OpenGL context handle.
pub fn set_glx_display(&mut self, glx_disp: *mut c_void)
[src]
Specifies a Display pointer for the GLX context.
pub fn set_wgl_hdc(&mut self, wgl_hdc: *mut c_void)
[src]
Specifies a Display pointer for the WGL HDC.
[src]
Specifies an OpenGL context CGL share group to associate the OpenCL context with.
pub fn set_egl_display(&mut self, egl_disp: *mut c_void)
[src]
Specifies a pointer for the EGL display.
pub fn set_property_value(&mut self, prop: ContextPropertyValue)
[src]
Pushes a ContextPropertyValue
onto this list of properties.
pub fn get_platform(&self) -> Option<PlatformId>
[src]
Returns a platform id or none.
[src]
Returns true if this set of context properties specifies any OpenGL context or sharegroup to associate with.
pub fn to_raw(&self) -> Vec<isize>
[src]
Converts this list into a packed-word representation as specified here.
pub unsafe fn extract_property_from_raw(
property: ContextProperty,
raw_context_properties: &[isize]
) -> Option<ContextPropertyValue>
[src]
property: ContextProperty,
raw_context_properties: &[isize]
) -> Option<ContextPropertyValue>
Returns a single context property value.
pub unsafe fn from_raw(
raw_context_properties: &[isize]
) -> Result<ContextProperties, Error>
[src]
raw_context_properties: &[isize]
) -> Result<ContextProperties, Error>
Converts raw stuff into other stuff.
Trait Implementations
impl Clone for ContextProperties
[src]
fn clone(&self) -> ContextProperties
[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 From<ContextProperties> for Vec<isize>
[src]
fn from(cp: ContextProperties) -> Vec<isize>
[src]
Performs the conversion.