Phaser API Documentation

  Version: 
createFramebuffer(width, height, renderTexture, [addDepthStencilBuffer])

Description:

Creates a WebGL Framebuffer object and optionally binds a depth stencil render buffer.

Parameters:

name type arguments Default description
width number

If addDepthStencilBuffer is true, this controls the width of the depth stencil.

height number

If addDepthStencilBuffer is true, this controls the height of the depth stencil.

renderTexture WebGLTexture

The color texture where the color pixels are written.

addDepthStencilBuffer boolean <optional> false

Create a Renderbuffer for the depth stencil?

Returns:
Description:

Raw WebGLFramebuffer

Type:
  • WebGLFramebuffer
Since: 3.0.0