Struct opencl3::memory::Image[][src]

pub struct Image { /* fields omitted */ }
Expand description

An OpenCL image.
Has methods to return information from calls to clGetImageInfo with the appropriate parameters.
Implements the Drop trait to call release_mem_object when the object is dropped.

Implementations

Create an OpenCL image object for a context.

  • context - a valid OpenCL context.
  • flags - a bit-field used to specify allocation and usage information about the image memory object being created, see: Memory Flags.
  • image_format - a pointer to a structure that describes format properties of the image to be allocated.
  • image_desc - a pointer to a structure that describes type and dimensions of the image to be allocated.
  • host_ptr - a pointer to the image data that may already be allocated by the application.

returns a Result containing the new OpenCL image object or the error code from the OpenCL C API function.

Create an OpenCL image object, image array object, or image buffer object for a context from an OpenGL texture object, texture array object, texture buffer object, or a single face of an OpenGL cubemap texture object.

  • context - a valid OpenCL context created from an OpenGL context.
  • flags - a bit-field used to specify allocation and usage information about the image memory object being created, see: Memory Flags.
  • texture_target - used to define the image type of texture.
  • miplevel - used to define the mipmap level.
  • texture - the name of a GL buffer texture object.

returns a Result containing the new OpenCL image object or the error code from the OpenCL C API function.

Create an OpenCL 2D image object from an OpenGL renderbuffer object.

  • context - a valid OpenCL context created from an OpenGL context.
  • flags - a bit-field used to specify allocation and usage information about the image memory object being created, see: Memory Flags.
  • renderbuffer - a GL renderbuffer object.

returns a Result containing the new OpenCL image object or the error code from the OpenCL C API function.

Create an OpenCL 2D image object from an OpenGL 2D texture object, or a single face of an OpenGL cubemap texture object.
Deprecated in CL_VERSION_1_2, use create_from_gl_texture.

  • context - a valid OpenCL context created from an OpenGL context.
  • flags - a bit-field used to specify allocation and usage information about the image memory object being created, see: Memory Flags.
  • texture_target - used to define the image type of texture.
  • miplevel - used to define the mipmap level.
  • texture - the name of a GL 2D, cubemap or rectangle texture object.

returns a Result containing the new OpenCL image object or the error code from the OpenCL C API function.

Create an OpenCL 3D image object from an OpenGL 3D texture object.
Deprecated in CL_VERSION_1_2, use create_from_gl_texture.

  • context - a valid OpenCL context created from an OpenGL context.
  • flags - a bit-field used to specify allocation and usage information about the image memory object being created, see: Memory Flags.
  • texture_target - used to define the image type of texture.
  • miplevel - used to define the mipmap level.
  • texture - the name of a GL buffer texture object.

returns a Result containing the new OpenCL image object or the error code from the OpenCL C API function.

Get data about an OpenCL image object. Calls clGetImageInfo to get the desired data about the image object.

Get information about the GL texture target associated with a memory object.

Get information about the GL mipmap level associated with a memory object.

Get information about the GL number of samples associated with a memory object.

Get GL texture information associated with a memory object.

Trait Implementations

CL_VERSION_3_0

Get memory data about an OpenCL memory object. Calls clGetMemObjectInfo to get the desired data about the memory object. Read more

Query an OpenGL object used to create an OpenCL memory object. Read more

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.