W3cubDocs

/Haxe JavaScript

RenderingContext

package js.html.webgl

extended by WebGL2RenderingContext

Available on js

The WebGLRenderingContext interface provides the OpenGL ES 2.0 rendering context for the drawing surface of an HTML canvas element.

Documentation WebGLRenderingContext by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Static variables

staticinlineread onlyACTIVE_ATTRIBUTES:Int = 35721

staticinlineread onlyACTIVE_TEXTURE:Int = 34016

staticinlineread onlyACTIVE_UNIFORMS:Int = 35718

staticinlineread onlyALIASED_LINE_WIDTH_RANGE:Int = 33902

staticinlineread onlyALIASED_POINT_SIZE_RANGE:Int = 33901

staticinlineread onlyALPHA:Int = 6406

staticinlineread onlyALPHA_BITS:Int = 3413

staticinlineread onlyALWAYS:Int = 519

staticinlineread onlyARRAY_BUFFER:Int = 34962

staticinlineread onlyARRAY_BUFFER_BINDING:Int = 34964

staticinlineread onlyATTACHED_SHADERS:Int = 35717

staticinlineread onlyBACK:Int = 1029

staticinlineread onlyBLEND:Int = 3042

staticinlineread onlyBLEND_COLOR:Int = 32773

staticinlineread onlyBLEND_DST_ALPHA:Int = 32970

staticinlineread onlyBLEND_DST_RGB:Int = 32968

staticinlineread onlyBLEND_EQUATION:Int = 32777

staticinlineread onlyBLEND_EQUATION_ALPHA:Int = 34877

staticinlineread onlyBLEND_EQUATION_RGB:Int = 32777

staticinlineread onlyBLEND_SRC_ALPHA:Int = 32971

staticinlineread onlyBLEND_SRC_RGB:Int = 32969

staticinlineread onlyBLUE_BITS:Int = 3412

staticinlineread onlyBOOL:Int = 35670

staticinlineread onlyBOOL_VEC2:Int = 35671

staticinlineread onlyBOOL_VEC3:Int = 35672

staticinlineread onlyBOOL_VEC4:Int = 35673

staticinlineread onlyBROWSER_DEFAULT_WEBGL:Int = 37444

staticinlineread onlyBUFFER_SIZE:Int = 34660

staticinlineread onlyBUFFER_USAGE:Int = 34661

staticinlineread onlyBYTE:Int = 5120

staticinlineread onlyCCW:Int = 2305

staticinlineread onlyCLAMP_TO_EDGE:Int = 33071

staticinlineread onlyCOLOR_ATTACHMENT0:Int = 36064

staticinlineread onlyCOLOR_BUFFER_BIT:Int = 16384

staticinlineread onlyCOLOR_CLEAR_VALUE:Int = 3106

staticinlineread onlyCOLOR_WRITEMASK:Int = 3107

staticinlineread onlyCOMPILE_STATUS:Int = 35713

staticinlineread onlyCOMPRESSED_TEXTURE_FORMATS:Int = 34467

staticinlineread onlyCONSTANT_ALPHA:Int = 32771

staticinlineread onlyCONSTANT_COLOR:Int = 32769

staticinlineread onlyCONTEXT_LOST_WEBGL:Int = 37442

staticinlineread onlyCULL_FACE:Int = 2884

staticinlineread onlyCULL_FACE_MODE:Int = 2885

staticinlineread onlyCURRENT_PROGRAM:Int = 35725

staticinlineread onlyCURRENT_VERTEX_ATTRIB:Int = 34342

staticinlineread onlyCW:Int = 2304

staticinlineread onlyDECR:Int = 7683

staticinlineread onlyDECR_WRAP:Int = 34056

staticinlineread onlyDELETE_STATUS:Int = 35712

staticinlineread onlyDEPTH_ATTACHMENT:Int = 36096

staticinlineread onlyDEPTH_BITS:Int = 3414

staticinlineread onlyDEPTH_BUFFER_BIT:Int = 256

staticinlineread onlyDEPTH_CLEAR_VALUE:Int = 2931

staticinlineread onlyDEPTH_COMPONENT:Int = 6402

staticinlineread onlyDEPTH_COMPONENT16:Int = 33189

staticinlineread onlyDEPTH_FUNC:Int = 2932

staticinlineread onlyDEPTH_RANGE:Int = 2928

staticinlineread onlyDEPTH_STENCIL:Int = 34041

staticinlineread onlyDEPTH_STENCIL_ATTACHMENT:Int = 33306

staticinlineread onlyDEPTH_TEST:Int = 2929

staticinlineread onlyDEPTH_WRITEMASK:Int = 2930

staticinlineread onlyDITHER:Int = 3024

staticinlineread onlyDONT_CARE:Int = 4352

staticinlineread onlyDST_ALPHA:Int = 772

staticinlineread onlyDST_COLOR:Int = 774

staticinlineread onlyDYNAMIC_DRAW:Int = 35048

staticinlineread onlyELEMENT_ARRAY_BUFFER:Int = 34963

staticinlineread onlyELEMENT_ARRAY_BUFFER_BINDING:Int = 34965

staticinlineread onlyEQUAL:Int = 514

staticinlineread onlyFASTEST:Int = 4353

staticinlineread onlyFLOAT:Int = 5126

staticinlineread onlyFLOAT_MAT2:Int = 35674

staticinlineread onlyFLOAT_MAT3:Int = 35675

staticinlineread onlyFLOAT_MAT4:Int = 35676

staticinlineread onlyFLOAT_VEC2:Int = 35664

staticinlineread onlyFLOAT_VEC3:Int = 35665

staticinlineread onlyFLOAT_VEC4:Int = 35666

staticinlineread onlyFRAGMENT_SHADER:Int = 35632

staticinlineread onlyFRAMEBUFFER:Int = 36160

staticinlineread onlyFRAMEBUFFER_ATTACHMENT_OBJECT_NAME:Int = 36049

staticinlineread onlyFRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:Int = 36048

staticinlineread onlyFRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:Int = 36051

staticinlineread onlyFRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:Int = 36050

staticinlineread onlyFRAMEBUFFER_BINDING:Int = 36006

staticinlineread onlyFRAMEBUFFER_COMPLETE:Int = 36053

staticinlineread onlyFRAMEBUFFER_INCOMPLETE_ATTACHMENT:Int = 36054

staticinlineread onlyFRAMEBUFFER_INCOMPLETE_DIMENSIONS:Int = 36057

staticinlineread onlyFRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:Int = 36055

staticinlineread onlyFRAMEBUFFER_UNSUPPORTED:Int = 36061

staticinlineread onlyFRONT:Int = 1028

staticinlineread onlyFRONT_AND_BACK:Int = 1032

staticinlineread onlyFRONT_FACE:Int = 2886

staticinlineread onlyFUNC_ADD:Int = 32774

staticinlineread onlyFUNC_REVERSE_SUBTRACT:Int = 32779

staticinlineread onlyFUNC_SUBTRACT:Int = 32778

staticinlineread onlyGENERATE_MIPMAP_HINT:Int = 33170

staticinlineread onlyGEQUAL:Int = 518

staticinlineread onlyGREATER:Int = 516

staticinlineread onlyGREEN_BITS:Int = 3411

staticinlineread onlyHIGH_FLOAT:Int = 36338

staticinlineread onlyHIGH_INT:Int = 36341

staticinlineread onlyIMPLEMENTATION_COLOR_READ_FORMAT:Int = 35739

staticinlineread onlyIMPLEMENTATION_COLOR_READ_TYPE:Int = 35738

staticinlineread onlyINCR:Int = 7682

staticinlineread onlyINCR_WRAP:Int = 34055

staticinlineread onlyINT:Int = 5124

staticinlineread onlyINT_VEC2:Int = 35667

staticinlineread onlyINT_VEC3:Int = 35668

staticinlineread onlyINT_VEC4:Int = 35669

staticinlineread onlyINVALID_ENUM:Int = 1280

staticinlineread onlyINVALID_FRAMEBUFFER_OPERATION:Int = 1286

staticinlineread onlyINVALID_OPERATION:Int = 1282

staticinlineread onlyINVALID_VALUE:Int = 1281

staticinlineread onlyINVERT:Int = 5386

staticinlineread onlyKEEP:Int = 7680

staticinlineread onlyLEQUAL:Int = 515

staticinlineread onlyLESS:Int = 513

staticinlineread onlyLINEAR:Int = 9729

staticinlineread onlyLINEAR_MIPMAP_LINEAR:Int = 9987

staticinlineread onlyLINEAR_MIPMAP_NEAREST:Int = 9985

staticinlineread onlyLINES:Int = 1

staticinlineread onlyLINE_LOOP:Int = 2

staticinlineread onlyLINE_STRIP:Int = 3

staticinlineread onlyLINE_WIDTH:Int = 2849

staticinlineread onlyLOW_FLOAT:Int = 36336

staticinlineread onlyLOW_INT:Int = 36339

staticinlineread onlyLUMINANCE:Int = 6409

staticinlineread onlyLUMINANCE_ALPHA:Int = 6410

staticinlineread onlyMAX_COMBINED_TEXTURE_IMAGE_UNITS:Int = 35661

staticinlineread onlyMAX_CUBE_MAP_TEXTURE_SIZE:Int = 34076

staticinlineread onlyMAX_FRAGMENT_UNIFORM_VECTORS:Int = 36349

staticinlineread onlyMAX_RENDERBUFFER_SIZE:Int = 34024

staticinlineread onlyMAX_TEXTURE_IMAGE_UNITS:Int = 34930

staticinlineread onlyMAX_TEXTURE_SIZE:Int = 3379

staticinlineread onlyMAX_VARYING_VECTORS:Int = 36348

staticinlineread onlyMAX_VERTEX_ATTRIBS:Int = 34921

staticinlineread onlyMAX_VERTEX_TEXTURE_IMAGE_UNITS:Int = 35660

staticinlineread onlyMAX_VERTEX_UNIFORM_VECTORS:Int = 36347

staticinlineread onlyMAX_VIEWPORT_DIMS:Int = 3386

staticinlineread onlyMEDIUM_FLOAT:Int = 36337

staticinlineread onlyMEDIUM_INT:Int = 36340

staticinlineread onlyMIRRORED_REPEAT:Int = 33648

staticinlineread onlyNEAREST:Int = 9728

staticinlineread onlyNEAREST_MIPMAP_LINEAR:Int = 9986

staticinlineread onlyNEAREST_MIPMAP_NEAREST:Int = 9984

staticinlineread onlyNEVER:Int = 512

staticinlineread onlyNICEST:Int = 4354

staticinlineread onlyNONE:Int = 0

staticinlineread onlyNOTEQUAL:Int = 517

staticinlineread onlyNO_ERROR:Int = 0

staticinlineread onlyONE:Int = 1

staticinlineread onlyONE_MINUS_CONSTANT_ALPHA:Int = 32772

staticinlineread onlyONE_MINUS_CONSTANT_COLOR:Int = 32770

staticinlineread onlyONE_MINUS_DST_ALPHA:Int = 773

staticinlineread onlyONE_MINUS_DST_COLOR:Int = 775

staticinlineread onlyONE_MINUS_SRC_ALPHA:Int = 771

staticinlineread onlyONE_MINUS_SRC_COLOR:Int = 769

staticinlineread onlyOUT_OF_MEMORY:Int = 1285

staticinlineread onlyPACK_ALIGNMENT:Int = 3333

staticinlineread onlyPOINTS:Int = 0

staticinlineread onlyPOLYGON_OFFSET_FACTOR:Int = 32824

staticinlineread onlyPOLYGON_OFFSET_FILL:Int = 32823

staticinlineread onlyPOLYGON_OFFSET_UNITS:Int = 10752

staticinlineread onlyRED_BITS:Int = 3410

staticinlineread onlyRENDERBUFFER:Int = 36161

staticinlineread onlyRENDERBUFFER_ALPHA_SIZE:Int = 36179

staticinlineread onlyRENDERBUFFER_BINDING:Int = 36007

staticinlineread onlyRENDERBUFFER_BLUE_SIZE:Int = 36178

staticinlineread onlyRENDERBUFFER_DEPTH_SIZE:Int = 36180

staticinlineread onlyRENDERBUFFER_GREEN_SIZE:Int = 36177

staticinlineread onlyRENDERBUFFER_HEIGHT:Int = 36163

staticinlineread onlyRENDERBUFFER_INTERNAL_FORMAT:Int = 36164

staticinlineread onlyRENDERBUFFER_RED_SIZE:Int = 36176

staticinlineread onlyRENDERBUFFER_STENCIL_SIZE:Int = 36181

staticinlineread onlyRENDERBUFFER_WIDTH:Int = 36162

staticinlineread onlyRENDERER:Int = 7937

staticinlineread onlyREPEAT:Int = 10497

staticinlineread onlyREPLACE:Int = 7681

staticinlineread onlyRGB:Int = 6407

staticinlineread onlyRGB565:Int = 36194

staticinlineread onlyRGB5_A1:Int = 32855

staticinlineread onlyRGBA:Int = 6408

staticinlineread onlyRGBA4:Int = 32854

staticinlineread onlySAMPLER_2D:Int = 35678

staticinlineread onlySAMPLER_CUBE:Int = 35680

staticinlineread onlySAMPLES:Int = 32937

staticinlineread onlySAMPLE_ALPHA_TO_COVERAGE:Int = 32926

staticinlineread onlySAMPLE_BUFFERS:Int = 32936

staticinlineread onlySAMPLE_COVERAGE:Int = 32928

staticinlineread onlySAMPLE_COVERAGE_INVERT:Int = 32939

staticinlineread onlySAMPLE_COVERAGE_VALUE:Int = 32938

staticinlineread onlySCISSOR_BOX:Int = 3088

staticinlineread onlySCISSOR_TEST:Int = 3089

staticinlineread onlySHADER_TYPE:Int = 35663

staticinlineread onlySHADING_LANGUAGE_VERSION:Int = 35724

staticinlineread onlySHORT:Int = 5122

staticinlineread onlySRC_ALPHA:Int = 770

staticinlineread onlySRC_ALPHA_SATURATE:Int = 776

staticinlineread onlySRC_COLOR:Int = 768

staticinlineread onlySTATIC_DRAW:Int = 35044

staticinlineread onlySTENCIL_ATTACHMENT:Int = 36128

staticinlineread onlySTENCIL_BACK_FAIL:Int = 34817

staticinlineread onlySTENCIL_BACK_FUNC:Int = 34816

staticinlineread onlySTENCIL_BACK_PASS_DEPTH_FAIL:Int = 34818

staticinlineread onlySTENCIL_BACK_PASS_DEPTH_PASS:Int = 34819

staticinlineread onlySTENCIL_BACK_REF:Int = 36003

staticinlineread onlySTENCIL_BACK_VALUE_MASK:Int = 36004

staticinlineread onlySTENCIL_BACK_WRITEMASK:Int = 36005

staticinlineread onlySTENCIL_BITS:Int = 3415

staticinlineread onlySTENCIL_BUFFER_BIT:Int = 1024

staticinlineread onlySTENCIL_CLEAR_VALUE:Int = 2961

staticinlineread onlySTENCIL_FAIL:Int = 2964

staticinlineread onlySTENCIL_FUNC:Int = 2962

staticinlineread onlySTENCIL_INDEX8:Int = 36168

staticinlineread onlySTENCIL_PASS_DEPTH_FAIL:Int = 2965

staticinlineread onlySTENCIL_PASS_DEPTH_PASS:Int = 2966

staticinlineread onlySTENCIL_REF:Int = 2967

staticinlineread onlySTENCIL_TEST:Int = 2960

staticinlineread onlySTENCIL_VALUE_MASK:Int = 2963

staticinlineread onlySTENCIL_WRITEMASK:Int = 2968

staticinlineread onlySTREAM_DRAW:Int = 35040

staticinlineread onlySUBPIXEL_BITS:Int = 3408

staticinlineread onlyTEXTURE:Int = 5890

staticinlineread onlyTEXTURE0:Int = 33984

staticinlineread onlyTEXTURE1:Int = 33985

staticinlineread onlyTEXTURE10:Int = 33994

staticinlineread onlyTEXTURE11:Int = 33995

staticinlineread onlyTEXTURE12:Int = 33996

staticinlineread onlyTEXTURE13:Int = 33997

staticinlineread onlyTEXTURE14:Int = 33998

staticinlineread onlyTEXTURE15:Int = 33999

staticinlineread onlyTEXTURE16:Int = 34000

staticinlineread onlyTEXTURE17:Int = 34001

staticinlineread onlyTEXTURE18:Int = 34002

staticinlineread onlyTEXTURE19:Int = 34003

staticinlineread onlyTEXTURE2:Int = 33986

staticinlineread onlyTEXTURE20:Int = 34004

staticinlineread onlyTEXTURE21:Int = 34005

staticinlineread onlyTEXTURE22:Int = 34006

staticinlineread onlyTEXTURE23:Int = 34007

staticinlineread onlyTEXTURE24:Int = 34008

staticinlineread onlyTEXTURE25:Int = 34009

staticinlineread onlyTEXTURE26:Int = 34010

staticinlineread onlyTEXTURE27:Int = 34011

staticinlineread onlyTEXTURE28:Int = 34012

staticinlineread onlyTEXTURE29:Int = 34013

staticinlineread onlyTEXTURE3:Int = 33987

staticinlineread onlyTEXTURE30:Int = 34014

staticinlineread onlyTEXTURE31:Int = 34015

staticinlineread onlyTEXTURE4:Int = 33988

staticinlineread onlyTEXTURE5:Int = 33989

staticinlineread onlyTEXTURE6:Int = 33990

staticinlineread onlyTEXTURE7:Int = 33991

staticinlineread onlyTEXTURE8:Int = 33992

staticinlineread onlyTEXTURE9:Int = 33993

staticinlineread onlyTEXTURE_2D:Int = 3553

staticinlineread onlyTEXTURE_BINDING_2D:Int = 32873

staticinlineread onlyTEXTURE_BINDING_CUBE_MAP:Int = 34068

staticinlineread onlyTEXTURE_CUBE_MAP:Int = 34067

staticinlineread onlyTEXTURE_CUBE_MAP_NEGATIVE_X:Int = 34070

staticinlineread onlyTEXTURE_CUBE_MAP_NEGATIVE_Y:Int = 34072

staticinlineread onlyTEXTURE_CUBE_MAP_NEGATIVE_Z:Int = 34074

staticinlineread onlyTEXTURE_CUBE_MAP_POSITIVE_X:Int = 34069

staticinlineread onlyTEXTURE_CUBE_MAP_POSITIVE_Y:Int = 34071

staticinlineread onlyTEXTURE_CUBE_MAP_POSITIVE_Z:Int = 34073

staticinlineread onlyTEXTURE_MAG_FILTER:Int = 10240

staticinlineread onlyTEXTURE_MIN_FILTER:Int = 10241

staticinlineread onlyTEXTURE_WRAP_S:Int = 10242

staticinlineread onlyTEXTURE_WRAP_T:Int = 10243

staticinlineread onlyTRIANGLES:Int = 4

staticinlineread onlyTRIANGLE_FAN:Int = 6

staticinlineread onlyTRIANGLE_STRIP:Int = 5

staticinlineread onlyUNPACK_ALIGNMENT:Int = 3317

staticinlineread onlyUNPACK_COLORSPACE_CONVERSION_WEBGL:Int = 37443

staticinlineread onlyUNPACK_FLIP_Y_WEBGL:Int = 37440

staticinlineread onlyUNPACK_PREMULTIPLY_ALPHA_WEBGL:Int = 37441

staticinlineread onlyUNSIGNED_BYTE:Int = 5121

staticinlineread onlyUNSIGNED_INT:Int = 5125

staticinlineread onlyUNSIGNED_SHORT:Int = 5123

staticinlineread onlyUNSIGNED_SHORT_4_4_4_4:Int = 32819

staticinlineread onlyUNSIGNED_SHORT_5_5_5_1:Int = 32820

staticinlineread onlyUNSIGNED_SHORT_5_6_5:Int = 33635

staticinlineread onlyVALIDATE_STATUS:Int = 35715

staticinlineread onlyVENDOR:Int = 7936

staticinlineread onlyVERSION:Int = 7938

staticinlineread onlyVERTEX_ATTRIB_ARRAY_BUFFER_BINDING:Int = 34975

staticinlineread onlyVERTEX_ATTRIB_ARRAY_ENABLED:Int = 34338

staticinlineread onlyVERTEX_ATTRIB_ARRAY_NORMALIZED:Int = 34922

staticinlineread onlyVERTEX_ATTRIB_ARRAY_POINTER:Int = 34373

staticinlineread onlyVERTEX_ATTRIB_ARRAY_SIZE:Int = 34339

staticinlineread onlyVERTEX_ATTRIB_ARRAY_STRIDE:Int = 34340

staticinlineread onlyVERTEX_ATTRIB_ARRAY_TYPE:Int = 34341

staticinlineread onlyVERTEX_SHADER:Int = 35633

staticinlineread onlyVIEWPORT:Int = 2978

staticinlineread onlyZERO:Int = 0

Variables

read onlycanvas:CanvasElement

A read-only back-reference to the HTMLCanvasElement. Might be null if it is not associated with a canvas element.

read onlydrawingBufferHeight:Int

The read-only height of the current drawing buffer. Should match the height of the canvas element associated with this context.

read onlydrawingBufferWidth:Int

The read-only width of the current drawing buffer. Should match the width of the canvas element associated with this context.

Methods

activeTexture(texture:Int):Void

Selects the active texture unit.

attachShader(program:Program, shader:Shader):Void

Attaches a WebGLShader to a WebGLProgram.

bindAttribLocation(program:Program, index:Int, name:String):Void

Binds a generic vertex index to a named attribute variable.

bindBuffer(target:Int, buffer:Buffer):Void

Binds a WebGLBuffer object to a given target.

bindFramebuffer(target:Int, framebuffer:Framebuffer):Void

Binds a WebGLFrameBuffer object to a given target.

bindRenderbuffer(target:Int, renderbuffer:Renderbuffer):Void

Binds a WebGLRenderBuffer object to a given target.

bindTexture(target:Int, texture:Texture):Void

Binds a WebGLTexture object to a given target.

blendColor(red:Float, green:Float, blue:Float, alpha:Float):Void

Sets the source and destination blending factors.

blendEquation(mode:Int):Void

Sets both the RGB blend equation and alpha blend equation to a single equation.

blendEquationSeparate(modeRGB:Int, modeAlpha:Int):Void

Sets the RGB blend equation and alpha blend equation separately.

blendFunc(sfactor:Int, dfactor:Int):Void

Defines which function is used for blending pixel arithmetic.

blendFuncSeparate(srcRGB:Int, dstRGB:Int, srcAlpha:Int, dstAlpha:Int):Void

Defines which function is used for blending pixel arithmetic for RGB and alpha components separately.

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

bufferData(target:Int, size:Int, usage:Int):Void

bufferData(target:Int, data:ArrayBuffer, usage:Int):Void

Updates buffer data.

bufferSubData(target:Int, offset:Int, data:ArrayBufferView):Void

bufferSubData(target:Int, offset:Int, data:ArrayBuffer):Void

Updates buffer data starting at a passed offset.

checkFramebufferStatus(target:Int):Int

Returns the status of the framebuffer.

clear(mask:Int):Void

Clears specified buffers to preset values.

clearColor(red:Float, green:Float, blue:Float, alpha:Float):Void

Specifies the color values used when clearing color buffers.

clearDepth(depth:Float):Void

Specifies the depth value used when clearing the depth buffer.

clearStencil(s:Int):Void

Specifies the stencil value used when clearing the stencil buffer.

colorMask(red:Bool, green:Bool, blue:Bool, alpha:Bool):Void

Sets which color components to enable or to disable when drawing or rendering to a WebGLFramebuffer.

compileShader(shader:Shader):Void

Compiles a WebGLShader.

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

Specifies a 2D texture image in a compressed format.

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

Specifies a 2D texture sub-image in a compressed format.

copyTexImage2D(target:Int, level:Int, internalformat:Int, x:Int, y:Int, width:Int, height:Int, border:Int):Void

Copies a 2D texture image.

copyTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, x:Int, y:Int, width:Int, height:Int):Void

Copies a 2D texture sub-image.

createBuffer():Buffer

Creates a WebGLBuffer object.

createFramebuffer():Framebuffer

Creates a WebGLFrameBuffer object.

createProgram():Program

Creates a WebGLProgram.

createRenderbuffer():Renderbuffer

Creates a WebGLRenderBuffer object.

createShader(type:Int):Shader

Creates a WebGLShader.

createTexture():Texture

Creates a WebGLTexture object.

cullFace(mode:Int):Void

Specifies whether or not front- and/or back-facing polygons can be culled.

deleteBuffer(buffer:Buffer):Void

Deletes a WebGLBuffer object.

deleteFramebuffer(framebuffer:Framebuffer):Void

Deletes a WebGLFrameBuffer object.

deleteProgram(program:Program):Void

Deletes a WebGLProgram.

deleteRenderbuffer(renderbuffer:Renderbuffer):Void

Deletes a WebGLRenderBuffer object.

deleteShader(shader:Shader):Void

Deletes a WebGLShader.

deleteTexture(texture:Texture):Void

Deletes a WebGLTexture object.

depthFunc(func:Int):Void

Specifies a function that compares incoming pixel depth to the current depth buffer value.

depthMask(flag:Bool):Void

Sets whether writing into the depth buffer is enabled or disabled.

depthRange(zNear:Float, zFar:Float):Void

Specifies the depth range mapping from normalized device coordinates to window or viewport coordinates.

detachShader(program:Program, shader:Shader):Void

Detaches a WebGLShader.

disable(cap:Int):Void

Disables specific WebGL capabilities for this context.

disableVertexAttribArray(index:Int):Void

Disables a vertex attribute array at a given position.

drawArrays(mode:Int, first:Int, count:Int):Void

Renders primitives from array data.

drawElements(mode:Int, count:Int, type:Int, offset:Int):Void

Renders primitives from element array data.

enable(cap:Int):Void

Enables specific WebGL capabilities for this context.

enableVertexAttribArray(index:Int):Void

Enables a vertex attribute array at a given position.

finish():Void

Blocks execution until all previously called commands are finished.

flush():Void

Empties different buffer commands, causing all commands to be executed as quickly as possible.

framebufferRenderbuffer(target:Int, attachment:Int, renderbuffertarget:Int, renderbuffer:Renderbuffer):Void

Attaches a WebGLRenderingBuffer object to a WebGLFrameBuffer object.

framebufferTexture2D(target:Int, attachment:Int, textarget:Int, texture:Texture, level:Int):Void

Attaches a textures image to a WebGLFrameBuffer object.

frontFace(mode:Int):Void

Specifies whether polygons are front- or back-facing by setting a winding orientation.

generateMipmap(target:Int):Void

Generates a set of mipmaps for a WebGLTexture object.

getActiveAttrib(program:Program, index:Int):ActiveInfo

Returns information about an active attribute variable.

getActiveUniform(program:Program, index:Int):ActiveInfo

Returns information about an active uniform variable.

getAttachedShaders(program:Program):Array<Shader>

Returns a list of WebGLShader objects attached to a WebGLProgram.

getAttribLocation(program:Program, name:String):Int

Returns the location of an attribute variable.

getBufferParameter(target:Int, pname:Int):Dynamic

Returns information about the buffer.

getContextAttributes():ContextAttributes

Returns a WebGLContextAttributes object that contains the actual context parameters. Might return null, if the context is lost.

getError():Int

Returns error information.

getExtension<T>(name:Extension<T>):T

Returns an extension object.

Throws:

null

DOMError

getFramebufferAttachmentParameter(target:Int, attachment:Int, pname:Int):Dynamic

Returns information about the framebuffer.

Throws:

null

DOMError

getParameter(pname:Int):Dynamic

Returns a value for the passed parameter name.

Throws:

null

DOMError

getProgramInfoLog(program:Program):String

Returns the information log for a WebGLProgram object.

getProgramParameter(program:Program, pname:Int):Dynamic

Returns information about the program.

getRenderbufferParameter(target:Int, pname:Int):Dynamic

Returns information about the renderbuffer.

getShaderInfoLog(shader:Shader):String

Returns the information log for a WebGLShader object.

getShaderParameter(shader:Shader, pname:Int):Dynamic

Returns information about the shader.

getShaderPrecisionFormat(shadertype:Int, precisiontype:Int):ShaderPrecisionFormat

Returns a WebGLShaderPrecisionFormat object describing the precision for the numeric format of the shader.

getShaderSource(shader:Shader):String

Returns the source code of a WebGLShader as a string.

getSupportedExtensions():Array<String>

Returns an Array of DOMString elements with all the supported WebGL extensions.

getTexParameter(target:Int, pname:Int):Dynamic

Returns information about the texture.

getUniform(program:Program, location:UniformLocation):Dynamic

Returns the value of a uniform variable at a given location.

getUniformLocation(program:Program, name:String):UniformLocation

Returns the location of a uniform variable.

getVertexAttrib(index:Int, pname:Int):Dynamic

Returns information about a vertex attribute at a given position.

Throws:

null

DOMError

getVertexAttribOffset(index:Int, pname:Int):Int

Returns the address of a given vertex attribute.

hint(target:Int, mode:Int):Void

Specifies hints for certain behaviors. The interpretation of these hints depend on the implementation.

isBuffer(buffer:Buffer):Bool

Returns a Boolean indicating if the passed buffer is valid.

isContextLost():Bool

Returns true if the context is lost, otherwise returns false.

isEnabled(cap:Int):Bool

Tests whether a specific WebGL capability is enabled or not for this context.

isFramebuffer(framebuffer:Framebuffer):Bool

Returns a Boolean indicating if the passed WebGLFrameBuffer object is valid.

isProgram(program:Program):Bool

Returns a Boolean indicating if the passed WebGLProgram is valid.

isRenderbuffer(renderbuffer:Renderbuffer):Bool

Returns a Boolean indicating if the passed WebGLRenderingBuffer is valid.

isShader(shader:Shader):Bool

Returns a Boolean indicating if the passed WebGLShader is valid.

isTexture(texture:Texture):Bool

Returns a Boolean indicating if the passed WebGLTexture is valid.

lineWidth(width:Float):Void

Sets the line width of rasterized lines.

linkProgram(program:Program):Void

Links the passed WebGLProgram object.

pixelStorei(pname:Int, param:Int):Void

Specifies the pixel storage modes

polygonOffset(factor:Float, units:Float):Void

Specifies the scale factors and units to calculate depth values.

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

Reads a block of pixels from the WebGLFrameBuffer.

Throws:

null

DOMError

renderbufferStorage(target:Int, internalformat:Int, width:Int, height:Int):Void

Creates a renderbuffer data store.

sampleCoverage(value:Float, invert:Bool):Void

Specifies multi-sample coverage parameters for anti-aliasing effects.

scissor(x:Int, y:Int, width:Int, height:Int):Void

Defines the scissor box.

shaderSource(shader:Shader, source:String):Void

Sets the source code in a WebGLShader.

stencilFunc(func:Int, ref:Int, mask:Int):Void

Sets the both front and back function and reference value for stencil testing.

stencilFuncSeparate(face:Int, func:Int, ref:Int, mask:Int):Void

Sets the front and/or back function and reference value for stencil testing.

stencilMask(mask:Int):Void

Controls enabling and disabling of both the front and back writing of individual bits in the stencil planes.

stencilMaskSeparate(face:Int, mask:Int):Void

Controls enabling and disabling of front and/or back writing of individual bits in the stencil planes.

stencilOp(fail:Int, zfail:Int, zpass:Int):Void

Sets both the front and back-facing stencil test actions.

stencilOpSeparate(face:Int, fail:Int, zfail:Int, zpass:Int):Void

Sets the front and/or back-facing stencil test actions.

texImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, video:VideoElement):Void

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

texImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, pixels:ImageBitmap):Void

texImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, pixels:ImageData):Void

texImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, image:ImageElement):Void

texImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, canvas:CanvasElement):Void

Specifies a 2D texture image.

Throws:

null

DOMError

texParameterf(target:Int, pname:Int, param:Float):Void

texParameteri(target:Int, pname:Int, param:Int):Void

texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, video:VideoElement):Void

texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView):Void

texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, pixels:ImageBitmap):Void

texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, pixels:ImageData):Void

texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, image:ImageElement):Void

texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, canvas:CanvasElement):Void

Updates a sub-rectangle of the current WebGLTexture.

Throws:

null

DOMError

uniform1f(location:UniformLocation, x:Float):Void

uniform1fv(location:UniformLocation, data:Float32Array):Void

uniform1fv(location:UniformLocation, data:Array<Float>):Void

uniform1i(location:UniformLocation, x:Int):Void

uniform1iv(location:UniformLocation, data:Int32Array):Void

uniform1iv(location:UniformLocation, data:Array<Int>):Void

uniform2f(location:UniformLocation, x:Float, y:Float):Void

uniform2fv(location:UniformLocation, data:Float32Array):Void

uniform2fv(location:UniformLocation, data:Array<Float>):Void

uniform2i(location:UniformLocation, x:Int, y:Int):Void

uniform2iv(location:UniformLocation, data:Int32Array):Void

uniform2iv(location:UniformLocation, data:Array<Int>):Void

uniform3f(location:UniformLocation, x:Float, y:Float, z:Float):Void

uniform3fv(location:UniformLocation, data:Float32Array):Void

uniform3fv(location:UniformLocation, data:Array<Float>):Void

uniform3i(location:UniformLocation, x:Int, y:Int, z:Int):Void

uniform3iv(location:UniformLocation, data:Int32Array):Void

uniform3iv(location:UniformLocation, data:Array<Int>):Void

uniform4f(location:UniformLocation, x:Float, y:Float, z:Float, w:Float):Void

uniform4fv(location:UniformLocation, data:Float32Array):Void

uniform4fv(location:UniformLocation, data:Array<Float>):Void

uniform4i(location:UniformLocation, x:Int, y:Int, z:Int, w:Int):Void

uniform4iv(location:UniformLocation, data:Int32Array):Void

uniform4iv(location:UniformLocation, data:Array<Int>):Void

uniformMatrix2fv(location:UniformLocation, transpose:Bool, data:Float32Array):Void

uniformMatrix2fv(location:UniformLocation, transpose:Bool, data:Array<Float>):Void

uniformMatrix3fv(location:UniformLocation, transpose:Bool, data:Float32Array):Void

uniformMatrix3fv(location:UniformLocation, transpose:Bool, data:Array<Float>):Void

uniformMatrix4fv(location:UniformLocation, transpose:Bool, data:Float32Array):Void

uniformMatrix4fv(location:UniformLocation, transpose:Bool, data:Array<Float>):Void

useProgram(program:Program):Void

Uses the specified WebGLProgram as part the current rendering state.

validateProgram(program:Program):Void

Validates a WebGLProgram.

vertexAttrib1f(indx:Int, x:Float):Void

vertexAttrib1fv(indx:Int, values:Float32Array):Void

vertexAttrib1fv(indx:Int, values:Array<Float>):Void

vertexAttrib2f(indx:Int, x:Float, y:Float):Void

vertexAttrib2fv(indx:Int, values:Float32Array):Void

vertexAttrib2fv(indx:Int, values:Array<Float>):Void

vertexAttrib3f(indx:Int, x:Float, y:Float, z:Float):Void

vertexAttrib3fv(indx:Int, values:Float32Array):Void

vertexAttrib3fv(indx:Int, values:Array<Float>):Void

vertexAttrib4f(indx:Int, x:Float, y:Float, z:Float, w:Float):Void

vertexAttrib4fv(indx:Int, values:Float32Array):Void

vertexAttrib4fv(indx:Int, values:Array<Float>):Void

vertexAttribPointer(indx:Int, size:Int, type:Int, normalized:Bool, stride:Int, offset:Int):Void

Specifies the data formats and locations of vertex attributes in a vertex attributes array.

viewport(x:Int, y:Int, width:Int, height:Int):Void

Sets the viewport.

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/webgl/RenderingContext.html