Renderer.renderTexture

Renders the scene graph, described by a tree of gsk.render_node.RenderNode instances, to a gdk.texture.Texture.

The renderer will acquire a reference on the gsk.render_node.RenderNode tree while the rendering is in progress.

If you want to apply any transformations to root, you should put it into a transform node and pass that node instead.

Parameters

roota gsk.render_node.RenderNode
viewportthe section to draw or null to use root's bounds

Returns

a gdk.texture.Texture with the rendered contents of root.