#

API Docs for: 2.0.0
Show: Inherited Protected Private Deprecated

# PrimitiveShader Class

Defined in: `src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5`
Module: PIXI

## Constructor

### `PrimitiveShader`

(

- `gl`

)

Defined in `src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5`

#### Parameters:

- `gl` WebGLContext

  the current WebGL drawing context

- Index
- Methods
- Properties

## Item Index

### Methods

- destroy
- init

### Properties

- _UID
- fragmentSrc
- gl
- program
- vertexSrc

## Methods

### `destroy`

()

Defined in `src/pixi/renderers/webgl/shaders/PrimitiveShader.js:103`

Destroys the shader.

### `init`

()

Defined in `src/pixi/renderers/webgl/shaders/PrimitiveShader.js:74`

Initialises the shader.

## Properties

### `_UID`

Number private

Defined in `src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12`

### `fragmentSrc`

Array

Defined in `src/pixi/renderers/webgl/shaders/PrimitiveShader.js:32`

The fragment shader.

### `gl`

WebGLContext

Defined in `src/pixi/renderers/webgl/shaders/PrimitiveShader.js:19`

### `program`

Any

Defined in `src/pixi/renderers/webgl/shaders/PrimitiveShader.js:25`

The WebGL program.

### `vertexSrc`

Array

Defined in `src/pixi/renderers/webgl/shaders/PrimitiveShader.js:46`

The vertex shader.