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;

Static methods

staticbufferData(this:WebGL2RenderContext, target:Int, srcData:ArrayBufferView, usage:Int):Void

staticinlinebufferSubData(this:WebGL2RenderContext, target:Int, offset:Int, srcData:ArrayBufferView):Void

staticcompressedTexImage2D(this:WebGL2RenderContext, target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, srcData:ArrayBufferView):Void

staticinlinecompressedTexSubImage2D(this:WebGL2RenderContext, target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, srcData:ArrayBufferView):Void

staticinlinereadPixels(this:WebGL2RenderContext, x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView):Void

staticinlinetexImage2D(this:WebGL2RenderContext, target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, srcData:ArrayBufferView):Void

@:value({ srcOffset : 0 })staticinlinetexSubImage2D(this:WebGL2RenderContext, target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, srcData:ArrayBufferView, srcOffset:Int = 0):Void