setRenderTarget()
ts
function setRenderTarget(
gl: WebGL2RenderingContext,
target: RenderTarget | null,
clear?: boolean,
): void;Sets the current render target for the WebGL context.
Parameters
gl
WebGL2RenderingContext
The WebGL2 context.
target
The render target to bind. If null, binds the canvas (default framebuffer).
RenderTarget | null
clear?
boolean = true
Whether to clear the color and depth buffers after binding.
Returns
void