renderToTexture
inline fun renderToTexture(width: Int, height: Int, render: (AGFrameBuffer) -> Unit = {}, hasDepth: Boolean = false, hasStencil: Boolean = true, msamples: Int = 1, use: (Texture) -> Unit)
Temporarily sets the render buffer to a temporal texture of the size width and height that can be used later in the use method. First the texture is created, then render method is called once the render buffer is set to the texture, and later the context is restored and the use method is called providing as first argument the rendered Texture. This method is useful for per-frame filters. If you plan to keep the texture data, consider using the renderToBitmap method.