Offscreen.to_texture


Description:

[ CCode ( cname = "cogl_offscreen_new_to_texture" , has_construct_function = false , type = "CoglHandle*" ) ]
public Offscreen.to_texture (Texture handle)

This creates an offscreen buffer object using the given texture as the primary color buffer.

Note:

Use cogl_offscreen_new_with_texture instead.

It doesn't just initialize the contents of the offscreen buffer with the texture; they are tightly bound so that drawing to the offscreen buffer effectivly updates the contents of the given texture. You don't need to destroy the offscreen buffer before you can use the texture again.

Note:

This only works with low-level CoglTexture types such as CoglTexture2D, CoglTexture3D and CoglTextureRectangle, and not with meta-texture types such as CoglTexture2DSliced.

Parameters:

texture

A CoglTexture pointer

Returns:

a newly instantiated CoglOffscreen framebuffer or null if it wasn't possible to create the buffer.




2022 vala-language.org