init(glTexture:target:width:height:)
Creates a render destination based on an OpenGL texture.
Declaration
init(glTexture texture: UInt32, target: UInt32, width: Int, height: Int)Parameters
- texture:
GLTexture-backed texture data. - target:
A value denoting the type of destination. Use
GL_TEXTURE_2Dif your texture dimensions are a power of two, orGL_TEXTURE_RECTANGLE_EXTotherwise. - width:
Width of the texture in texels.
- height:
Height of the texture in texels.
Return Value
A CIRenderDestination object for rendering to a GLTexture supported by GLContext-backed CIContext.
Discussion
Rendering to a GLTexture-backed CIRenderDestination is supported by only GLContext-backed CIContext.
The destination’s colorSpace property will default to a CGColorSpace created with sRGB, extendedSRGB, or genericGrayGamma2_2.