Cloo 0.9.1
Public Member Functions | Static Public Member Functions
Cloo.ComputeImage2D Class Reference

Represents an OpenCL 2D image. More...

Inheritance diagram for Cloo.ComputeImage2D:
Cloo.ComputeImage Cloo.ComputeMemory Cloo.ComputeResource Cloo.ComputeObject

List of all members.

Public Member Functions

 ComputeImage2D (ComputeContext context, ComputeMemoryFlags flags, ComputeImageFormat format, int width, int height, long rowPitch, IntPtr data)
 Creates a new ComputeImage2D.

Static Public Member Functions

static ComputeImage2D CreateFromGLRenderbuffer (ComputeContext context, ComputeMemoryFlags flags, int renderbufferId)
 Creates a new ComputeImage2D from an OpenGL renderbuffer object.
static ComputeImage2D CreateFromGLTexture2D (ComputeContext context, ComputeMemoryFlags flags, int textureTarget, int mipLevel, int textureId)
 Creates a new ComputeImage2D from an OpenGL 2D texture object.
static ICollection
< ComputeImageFormat
GetSupportedFormats (ComputeContext context, ComputeMemoryFlags flags)
 Gets a collection of supported ComputeImage2D ComputeImageFormats in a ComputeContext.

Detailed Description

Represents an OpenCL 2D image.

See also:
ComputeImage

Constructor & Destructor Documentation

Cloo.ComputeImage2D.ComputeImage2D ( ComputeContext  context,
ComputeMemoryFlags  flags,
ComputeImageFormat  format,
int  width,
int  height,
long  rowPitch,
IntPtr  data 
)

Creates a new ComputeImage2D.

Parameters:
contextA valid ComputeContext in which the ComputeImage2D is created.
flagsA bit-field that is used to specify allocation and usage information about the ComputeImage2D.
formatA structure that describes the format properties of the ComputeImage2D.
widthThe width of the ComputeImage2D in pixels.
heightThe height of the ComputeImage2D in pixels.
rowPitchThe size in bytes of each row of elements of the ComputeImage2D. If rowPitch is zero, OpenCL will compute the proper value based on ComputeImage.Width and ComputeImage.ElementSize.
dataThe data to initialize the ComputeImage2D. Can be IntPtr.Zero.

Member Function Documentation

static ComputeImage2D Cloo.ComputeImage2D.CreateFromGLRenderbuffer ( ComputeContext  context,
ComputeMemoryFlags  flags,
int  renderbufferId 
) [static]

Creates a new ComputeImage2D from an OpenGL renderbuffer object.

Parameters:
contextA ComputeContext with enabled CL/GL sharing.
flagsA bit-field that is used to specify usage information about the ComputeImage2D. Only ComputeMemoryFlags.ReadOnly, ComputeMemoryFlags.WriteOnly and ComputeMemoryFlags.ReadWrite are allowed.
renderbufferIdThe OpenGL renderbuffer object id to use.
Returns:
The created ComputeImage2D.
static ComputeImage2D Cloo.ComputeImage2D.CreateFromGLTexture2D ( ComputeContext  context,
ComputeMemoryFlags  flags,
int  textureTarget,
int  mipLevel,
int  textureId 
) [static]

Creates a new ComputeImage2D from an OpenGL 2D texture object.

Parameters:
contextA ComputeContext with enabled CL/GL sharing.
flagsA bit-field that is used to specify usage information about the ComputeImage2D. Only ComputeMemoryFlags.ReadOnly, ComputeMemoryFlags.WriteOnly and ComputeMemoryFlags.ReadWrite are allowed.
textureTargetOne of the following values: GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or GL_TEXTURE_RECTANGLE. Using GL_TEXTURE_RECTANGLE for texture_target requires OpenGL 3.1. Alternatively, GL_TEXTURE_RECTANGLE_ARB may be specified if the OpenGL extension GL_ARB_texture_rectangle is supported.
mipLevelThe mipmap level of the OpenGL 2D texture object to be used.
textureIdThe OpenGL 2D texture object id to use.
Returns:
The created ComputeImage2D.
static ICollection<ComputeImageFormat> Cloo.ComputeImage2D.GetSupportedFormats ( ComputeContext  context,
ComputeMemoryFlags  flags 
) [static]

Gets a collection of supported ComputeImage2D ComputeImageFormats in a ComputeContext.

Parameters:
contextThe ComputeContext for which the collection of ComputeImageFormats is queried.
flagsThe ComputeMemoryFlags for which the collection of ComputeImageFormats is queried.
Returns:
The collection of the required ComputeImageFormats.

The documentation for this class was generated from the following file: