GLMemoryPBO.copyIntoTexture

Copies gl_mem into the texture specified by tex_id. The format of tex_id is specified by tex_format, width and height.

If respecify is true, then the copy is performed in terms of the texture data. This is useful for splitting RGBA textures into RG or R textures or vice versa. The requirement for this to succeed is that the backing texture data must be the same size, i.e. say a RGBA8 texture is converted into a RG8 texture, then the RG texture must have twice as many pixels available for output as the RGBA texture.

Otherwise, if respecify is false, then the copy is performed per texel using glCopyTexImage. See the OpenGL specification for details on the mappings between texture formats.

class GLMemoryPBO
bool
copyIntoTexture

Parameters

texId uint

the destination texture id

target gstgl.types.GLTextureTarget

the destination #GstGLTextureTarget

texFormat gstgl.types.GLFormat

the destination #GstGLFormat

width int

width of tex_id

height int

height of tex_id

stride int

stride of the backing texture data

respecify bool

whether to copy the data or copy per texel

Return Value

Type: bool

Whether the copy succeeded