Class: RenderTarget

PIXI. RenderTarget

new PIXI.RenderTarget(gl, width, height, scaleMode, resolution, root)

Name Type Description
gl WebGLRenderingContext

the current WebGL drawing context

width number

the horizontal range of the filter

height number

the vertical range of the filter

scaleMode number

See PIXI.SCALE_MODES for possible values

resolution number

the current resolution

root boolean

Whether this object is the root element or not

Members

filterStackArray.<object>

Stores filter data for the render target

The frame.

frameBufferWebGLFrameBuffer

A frame buffer

glWebGLRenderingContext

The current WebGL drawing context.

projectionMatrixPIXI.Matrix

The projection matrix

resolutionnumber

The current resolution

rootboolean

Whether this object is the root element or not

scaleModenumber

The scale mode.

Default Value:
  • PIXI.SCALE_MODES.DEFAULT
See:

The size of the object as a rectangle

stencilBufferWebGLRenderBuffer

The stencil buffer stores masking data for the render target

stencilMaskStackPIXI.StencilMaskStack

The data structure for the stencil masks

texturePIXI.Texture

The texture

transformPIXI.Matrix

The object's transform

Methods

Binds the buffers and initialises the viewport.

Binds the stencil buffer.

Updates the projection matrix based on a projection frame (which is a rectangle)

Clears the filter texture.

Name Type Default Description
bind boolean false optional

Should we bind our framebuffer before clearing?

Destroys the render target.

Resizes the texture to the specified width and height

Name Type Description
width Number

the new width of the texture

height Number

the new height of the texture