# WebGLRenderer

Inheritance WebGLRenderer Renderer Module hilo/renderer/WebGLRenderer Requires hilo/core/Class, hilo/core/Hilo, hilo/renderer/Renderer, hilo/geom/Matrix Source WebGLRenderer.js
WebGLRenderer The WebGLRenderer, all the visual object is drawing on the canvas using WebGL.The stage will create different renderer depend on the canvas and renderType properties, developer need not use this class directly.

### Properties

Show Inherited Properties

| Property | Defined
--- | --- | ---
| gl:WebGLRenderingContext The WebGL context of the renderer, readonly. | WebGLRenderer
| contextOptions static WebGL context Options | WebGLRenderer
| MAX_BATCH_NUM static The max num of batch draw, default is 2000. | WebGLRenderer
| ATTRIBUTE_NUM static The num of vertex attributes, readonly. | WebGLRenderer
| canvas:Object The canvas of renderer. | Renderer
| renderType:String The render type of renderer, readonly. | Renderer
| stage:Object The stage of renderer, readonly. | Renderer

### Methods

Show Inherited Methods

| Method | Defined
--- | --- | ---
| WebGLRenderer(properties:Object) Constructor | WebGLRenderer
| isSupport() static is WebGL supported, readonly. | WebGLRenderer
| clear(x:Number, y:Number, width:Number, height:Number) Clear the given region of canvas. | Renderer
| draw(target:View) Draw the visual object. | Renderer
| endDraw(target:View) The handling method after draw the visual object. | Renderer
| hide() Hide the visual object. | Renderer
| remove(target:View) Remove the visual object from canvas. | Renderer
| resize(width:Number, height:Number) Resize the renderer's canvas. | Renderer
| startDraw(target:View) Prepare for draw visual object. | Renderer
| transform() Transfrom the visual object. | Renderer

### Property Detail

[Static] ATTRIBUTE_NUM
The num of vertex attributes, readonly.
[Static] contextOptions
WebGL context Options

see:
  https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getContextAttributes

gl:WebGLRenderingContext
The WebGL context of the renderer, readonly.
[Static] MAX_BATCH_NUM
The max num of batch draw, default is 2000.

### Constructor

WebGLRenderer(properties:Object)

parameters
properties:Object — The properties to create a renderer, contains all writeable props of this class.

### Method Detail

[Static] isSupport()
is WebGL supported, readonly.