# WebGLRenderer - Pixi.JS

#

API Docs for: 1.0.0
Show: Inherited Protected Private Deprecated

# WebGLRenderer Class

Defined in: `src/pixi/renderers/WebGLRenderer.js:11`
Module: PIXI

the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. So no need for Sprite Batch's or Sprite Cloud's Dont forget to add the view to your DOM or you will not see anything :)

## Constructor

### `WebGLRenderer`

(

- `width`
- `height`
- `view`
- `transparent`

)

Defined in `src/pixi/renderers/WebGLRenderer.js:11`

#### Parameters:

- `width` Number

  the width of the canvas view

- `height` Number

  the height of the canvas view

- `view` Canvas

  the canvas to use as a view, optional

- `transparent` Boolean

  the transparency of the render view, default false

- Index
- Methods

## Item Index

### Methods

- render
- resize

## Methods

### `render`

(

- `stage`

)

Defined in `src/pixi/renderers/WebGLRenderer.js:144`

Renders the stage to its webGL view

#### Parameters:

- `stage` Stage

  the PIXI.Stage element to be rendered

### `resize`

(

- `width`
- `height`

)

Defined in `src/pixi/renderers/WebGLRenderer.js:284`

resizes the webGL view to the specified width and height

#### Parameters:

- `width` Number

  the new width of the webGL view

- `height` Number

  the new height of the webGL view