Struct ocl::builders::ContextBuilder [] [src]

#[must_use = "builders do nothing unless \'::build\' is called"]
pub struct ContextBuilder { /* fields omitted */ }

A builder for Context.

Methods

impl ContextBuilder
[src]

Creates a new ContextBuilder

Use Context::builder().build().unwrap() for defaults.

Defaults

  • The first avaliable platform

  • All devices associated with the first available platform

  • No notify callback function or user data.

  • TODO:

    • That stuff above (find a valid context, devices, etc. first thing).
    • Handle context creation callbacks.

Returns a new Context with the parameters hitherinforthto specified (say what?).

Returns a newly created context with the specified platform and set of device types.

Specify context properties directly.

Overwrites any previously specified properties.

Specify a context property.

Overwrites any property with the same variant (i.e.: if ContextPropertyValue::Platform was already set, it would be overwritten if prop_val is also ContextPropertyValue::Platform).

Specifies a platform.

Overwrites any previously specified platform.

Specifies an OpenGL context to associate with.

Overwrites any previously specified OpenGL context.

Specifies a list of devices with which to associate the context.

Devices may be specified in any number of ways including simply passing a device or slice of devices. See the [impl From] section of DeviceSpecifier for more information.

Panics

Devices must not have already been specified.