abstract WebGL2RenderContext(Dynamic)
package lime.graphics
from Dynamic, to Dynamic
Available on Android, HTML5, Linux, Mac, Windows, iOS
The WebGL2RenderContext
allows access to WebGL 2 features when OpenGL, OpenGL ES
or WebGL is the render context type of the Window
, and the current context supports
WebGL 2 features.
Using a WebGL context on a desktop platform enables support for cross-platform code that should run on all platforms (when using hardware acceleration), though support for WebGL 2 features are more limited than WebGL, and require an OpenGL ES 3.0 compatible desktop or mobile context.
You can convert from lime.graphics.RenderContext
, lime.graphics.OpenGLRenderContext
,
lime.graphics.OpenGLES3RenderContext
or lime.graphics.opengl.GL
, and can convert to
lime.graphics.WebGLRenderContext
directly if desired:
var webgl2:WebGL2RenderContext = window.context;
var webgl2:WebGL2RenderContext = gl;
var webgl2:WebGL2RenderContext = gles3;
var webgl2:WebGL2RenderContext = GL;
var webgl:WebGLRenderContext = webgl2;
Static variables
Static methods
staticinlinebindBufferRange(this:Dynamic, target:Int, index:Int, buffer:GLBuffer, offset:DataPointer, size:Int):Void
staticinlinebindTransformFeedback(this:Dynamic, target:Int, transformFeedback:GLTransformFeedback):Void
staticinlineblendFuncSeparate(this:Dynamic, srcRGB:Int, dstRGB:Int, srcAlpha:Int, dstAlpha:Int):Void
staticinlineblitFramebuffer(this:Dynamic, srcX0:Int, srcY0:Int, srcX1:Int, srcY1:Int, dstX0:Int, dstY0:Int, dstX1:Int, dstY1:Int, mask:Int, filter:Int):Void
staticbufferData(this:Dynamic, target:Int, srcData:ArrayBufferView, usage:Int, srcOffset:Int = 0, length:Int = 0):Void
Available on Android, Linux, Mac, Windows, iOS
staticbufferData(this:Dynamic, target:Int, srcData:Dynamic, usage:Int, ?srcOffset:Int, ?length:Int):Void
Available on HTML5
staticinlinebufferSubData(this:Dynamic, target:Int, offset:Int, srcData:ArrayBufferView, srcOffset:Int = 0, ?length:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlinebufferSubData(this:Dynamic, target:Int, offset:Int, srcData:Dynamic, ?srcOffset:Int, ?length:Int):Void
Available on HTML5
staticclearBufferfv(this:Dynamic, buffer:Int, drawbuffer:Int, values:ArrayBufferView, srcOffset:Int = 0):Void
staticclearBufferiv(this:Dynamic, buffer:Int, drawbuffer:Int, values:ArrayBufferView, ?srcOffset:Int):Void
staticclearBufferuiv(this:Dynamic, buffer:Int, drawbuffer:Int, values:ArrayBufferView, ?srcOffset:Int):Void
staticcompressedTexImage2D(this:Dynamic, target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, srcData:ArrayBufferView, srcOffset:Int = 0, ?srcLengthOverride:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticcompressedTexImage2D(this:Dynamic, target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, srcData:Dynamic, ?srcOffset:Int, ?srcLengthOverride:Int):Void
Available on HTML5
staticcompressedTexImage3D(this:Dynamic, target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, srcData:ArrayBufferView, srcOffset:Int = 0, ?srcLengthOverride:Int):Void
staticinlinecompressedTexSubImage2D(this:Dynamic, target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, srcData:ArrayBufferView, srcOffset:Int = 0, ?srcLengthOverride:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlinecompressedTexSubImage2D(this:Dynamic, target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, srcData:Dynamic, ?srcOffset:Int, ?srcLengthOverride:Int):Void
Available on HTML5
staticinlinecompressedTexSubImage3D(this:Dynamic, target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, srcData:ArrayBufferView, srcOffset:Int = 0, ?srcLengthOverride:Int):Void
staticinlinecopyBufferSubData(this:Dynamic, readTarget:Int, writeTarget:Int, readOffset:DataPointer, writeOffset:DataPointer, size:Int):Void
staticinlinecopyTexImage2D(this:Dynamic, target:Int, level:Int, internalformat:Int, x:Int, y:Int, width:Int, height:Int, border:Int):Void
staticinlinecopyTexSubImage2D(this:Dynamic, target:Int, level:Int, xoffset:Int, yoffset:Int, x:Int, y:Int, width:Int, height:Int):Void
staticinlinecopyTexSubImage3D(this:Dynamic, target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, x:Int, y:Int, width:Int, height:Int):Void
staticinlinedrawArraysInstanced(this:Dynamic, mode:Int, first:Int, count:Int, instanceCount:Int):Void
staticinlinedrawElementsInstanced(this:Dynamic, mode:Int, count:Int, type:Int, offset:DataPointer, instanceCount:Int):Void
staticinlinedrawRangeElements(this:Dynamic, mode:Int, start:Int, end:Int, count:Int, type:Int, offset:DataPointer):Void
staticinlineframebufferRenderbuffer(this:Dynamic, target:Int, attachment:Int, renderbuffertarget:Int, renderbuffer:GLRenderbuffer):Void
staticinlineframebufferTexture2D(this:Dynamic, target:Int, attachment:Int, textarget:Int, texture:GLTexture, level:Int):Void
staticinlineframebufferTextureLayer(this:Dynamic, target:Int, attachment:Int, texture:GLTexture, level:Int, layer:Int):Void
staticinlinegetActiveUniformBlockName(this:Dynamic, program:GLProgram, uniformBlockIndex:Int):String
staticinlinegetActiveUniformBlockParameter(this:Dynamic, program:GLProgram, uniformBlockIndex:Int, pname:Int):Dynamic
staticinlinegetActiveUniforms(this:Dynamic, program:GLProgram, uniformIndices:Array<Int>, pname:Int):Dynamic
staticinlinegetBufferSubData(this:Dynamic, target:Int, srcByteOffset:DataPointer, dstData:ArrayBuffer, srcOffset:Int = 0, ?length:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlinegetBufferSubData(this:Dynamic, target:Int, srcByteOffset:DataPointer, dstData:Dynamic, ?srcOffset:Dynamic, ?length:Int):Void
Available on HTML5
staticinlinegetFramebufferAttachmentParameter(this:Dynamic, target:Int, attachment:Int, pname:Int):Dynamic
staticinlinegetInternalformatParameter(this:Dynamic, target:Int, internalformat:Int, pname:Int):Dynamic
staticinlinegetShaderPrecisionFormat(this:Dynamic, shadertype:Int, precisiontype:Int):GLShaderPrecisionFormat
staticinlinegetUniformIndices(this:Dynamic, program:GLProgram, uniformNames:Array<String>):Array<Int>
staticinlineinvalidateSubFramebuffer(this:Dynamic, target:Int, attachments:Array<Int>, x:Int, y:Int, width:Int, height:Int):Void
staticinlinereadPixels(this:Dynamic, x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView, dstOffset:Int = 0):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlinereadPixels(this:Dynamic, x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:Dynamic, ?dstOffset:Int):Void
Available on HTML5
staticinlinerenderbufferStorage(this:Dynamic, target:Int, internalformat:Int, width:Int, height:Int):Void
staticinlinerenderbufferStorageMultisample(this:Dynamic, target:Int, samples:Int, internalformat:Int, width:Int, height:Int):Void
staticinlinetexImage2D(this:Dynamic, target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, srcData:ArrayBufferView, srcOffset:Int = 0):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlinetexImage2D(this:Dynamic, target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Dynamic, ?format:Int, ?type:Int, ?srcData:Dynamic, ?srcOffset:Int):Void
Available on HTML5
staticinlinetexImage3D(this:Dynamic, target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, format:Int, type:Int, srcData:ArrayBufferView, srcOffset:Int = 0):Void
staticinlinetexStorage2D(this:Dynamic, target:Int, level:Int, internalformat:Int, width:Int, height:Int):Void
staticinlinetexStorage3D(this:Dynamic, target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int):Void
staticinlinetexSubImage2D(this:Dynamic, target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, srcData:ArrayBufferView, srcOffset:Int = 0):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlinetexSubImage2D(this:Dynamic, target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Dynamic, ?type:Int, ?srcData:Dynamic, ?srcOffset:Int):Void
Available on HTML5
staticinlinetexSubImage3D(this:Dynamic, target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, type:Int, srcData:ArrayBufferView, srcOffset:Int = 0):Void
staticinlinetransformFeedbackVaryings(this:Dynamic, program:GLProgram, varyings:Array<String>, bufferMode:Int):Void
staticinlineuniform1fv(this:Dynamic, location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlineuniform1fv(this:Dynamic, location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticinlineuniform1iv(this:Dynamic, location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlineuniform1iv(this:Dynamic, location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticinlineuniform1uiv(this:Dynamic, location:GLUniformLocation, v:UInt32Array, ?srcOffset:Int, ?srcLength:Int):Void
staticuniform2fv(this:Dynamic, location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticuniform2fv(this:Dynamic, location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticinlineuniform2iv(this:Dynamic, location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlineuniform2iv(this:Dynamic, location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticinlineuniform2uiv(this:Dynamic, location:GLUniformLocation, v:UInt32Array, ?srcOffset:Int, ?srcLength:Int):Void
staticinlineuniform3fv(this:Dynamic, location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlineuniform3fv(this:Dynamic, location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticinlineuniform3iv(this:Dynamic, location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlineuniform3iv(this:Dynamic, location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticinlineuniform3uiv(this:Dynamic, location:GLUniformLocation, v:UInt32Array, ?srcOffset:Int, ?srcLength:Int):Void
staticinlineuniform4f(this:Dynamic, location:GLUniformLocation, v0:Float, v1:Float, v2:Float, v3:Float):Void
staticinlineuniform4fv(this:Dynamic, location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlineuniform4fv(this:Dynamic, location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticinlineuniform4i(this:Dynamic, location:GLUniformLocation, v0:Int, v1:Int, v2:Int, v3:Int):Void
staticinlineuniform4iv(this:Dynamic, location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticinlineuniform4iv(this:Dynamic, location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticinlineuniform4ui(this:Dynamic, location:GLUniformLocation, v0:Int, v1:Int, v2:Int, v3:Int):Void
staticinlineuniform4uiv(this:Dynamic, location:GLUniformLocation, v:UInt32Array, ?srcOffset:Int, ?srcLength:Int):Void
staticinlineuniformBlockBinding(this:Dynamic, program:GLProgram, uniformBlockIndex:Int, uniformBlockBinding:Int):Void
staticuniformMatrix2fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticuniformMatrix2fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticuniformMatrix2x3fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
staticuniformMatrix2x4fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
staticuniformMatrix3fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticuniformMatrix3fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5
staticuniformMatrix3x2fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
staticuniformMatrix3x4fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
staticuniformMatrix4fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
Available on Android, Linux, Mac, Windows, iOS
staticuniformMatrix4fv(this:Dynamic, location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
Available on HTML5