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