Skip to content

createRenderTarget() ​

ts
function createRenderTarget(
  gl: WebGL2RenderingContext,
  params?: RenderTargetParams,
): RenderTarget;

Creates a RenderTarget (FrameBuffer Object) for offscreen rendering.

Parameters ​

gl ​

WebGL2RenderingContext

The WebGL2 context.

params? ​

RenderTargetParams

Configuration parameters for the render target and its color texture.

Returns ​

RenderTarget

Released under the MIT License.