renderToBitmap

inline fun renderToBitmap(    width: Int,     height: Int,     hasDepth: Boolean = false,     hasStencil: Boolean = false,     msamples: Int = 1,     callback: () -> Unit): Bitmap32


inline fun renderToBitmap(    bmp: Bitmap32,     hasDepth: Boolean = false,     hasStencil: Boolean = false,     msamples: Int = 1,     useTexture: Boolean = true,     callback: () -> Unit): Bitmap32

Sets the render buffer temporarily to bmp and calls the callback render method that should perform all the renderings inside.