The WebGLRenderContext allows access to WebGL features when OpenGL, OpenGL ES or WebGL is the render context type of the Window.

Using a WebGL context on a desktop or mobile platform enables support for cross-platform code that should run all platforms (when hardware acceleration is supported).

You can convert from lime.graphics.RenderContext, lime.graphics.OpenGLRenderContext, lime.graphics.OpenGLES3RenderContext, lime.graphics.OpenGLES2RenderContext, lime.graphics.WebGL2RenderContext or lime.graphics.opengl.GL directly if desired:

var webgl:WebGLRenderContext = window.context;
var webgl:WebGLRenderContext = gl;
var webgl:WebGLRenderContext = gles3;
var webgl:WebGLRenderContext = gles2;
var webgl:WebGLRenderContext = webgl2;
var webgl:WebGLRenderContext = GL;

Methods

bufferData (target:Int, srcData:ArrayBufferView, usage:Int):Void

inline bufferSubData (target:Int, offset:Int, srcData:ArrayBufferView):Void

compressedTexImage2D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, srcData:ArrayBufferView):Void

inline compressedTexSubImage2D (target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, srcData:ArrayBufferView):Void

inline readPixels (x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView):Void

inline texImage2D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, srcData:ArrayBufferView):Void

inline texSubImage2D (target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, srcData:ArrayBufferView, srcOffset:Int = 0):Void

uniformMatrix2fv (location:GLUniformLocation, transpose:Bool, v:Float32Array):Void

uniformMatrix3fv (location:GLUniformLocation, transpose:Bool, v:Float32Array):Void

uniformMatrix4fv (location:GLUniformLocation, transpose:Bool, v:Float32Array):Void