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:
staticinlineread onlyACTIVE_ATTRIBUTES:Int = 35721staticinlineread onlyACTIVE_TEXTURE:Int = 34016staticinlineread onlyACTIVE_UNIFORMS:Int = 35718staticinlineread onlyALIASED_LINE_WIDTH_RANGE:Int = 33902staticinlineread onlyALIASED_POINT_SIZE_RANGE:Int = 33901staticinlineread onlyALPHA:Int = 6406staticinlineread onlyALPHA_BITS:Int = 3413staticinlineread onlyALWAYS:Int = 519staticinlineread onlyARRAY_BUFFER:Int = 34962staticinlineread onlyARRAY_BUFFER_BINDING:Int = 34964staticinlineread onlyATTACHED_SHADERS:Int = 35717staticinlineread onlyBACK:Int = 1029staticinlineread onlyBLEND:Int = 3042staticinlineread onlyBLEND_COLOR:Int = 32773staticinlineread onlyBLEND_DST_ALPHA:Int = 32970staticinlineread onlyBLEND_DST_RGB:Int = 32968staticinlineread onlyBLEND_EQUATION:Int = 32777staticinlineread onlyBLEND_EQUATION_ALPHA:Int = 34877staticinlineread onlyBLEND_EQUATION_RGB:Int = 32777staticinlineread onlyBLEND_SRC_ALPHA:Int = 32971staticinlineread onlyBLEND_SRC_RGB:Int = 32969staticinlineread onlyBLUE_BITS:Int = 3412staticinlineread onlyBOOL:Int = 35670staticinlineread onlyBOOL_VEC2:Int = 35671staticinlineread onlyBOOL_VEC3:Int = 35672staticinlineread onlyBOOL_VEC4:Int = 35673staticinlineread onlyBROWSER_DEFAULT_WEBGL:Int = 37444staticinlineread onlyBUFFER_SIZE:Int = 34660staticinlineread onlyBUFFER_USAGE:Int = 34661staticinlineread onlyBYTE:Int = 5120staticinlineread onlyCCW:Int = 2305staticinlineread onlyCLAMP_TO_EDGE:Int = 33071staticinlineread onlyCOLOR_ATTACHMENT0:Int = 36064staticinlineread onlyCOLOR_BUFFER_BIT:Int = 16384staticinlineread onlyCOLOR_CLEAR_VALUE:Int = 3106staticinlineread onlyCOLOR_WRITEMASK:Int = 3107staticinlineread onlyCOMPILE_STATUS:Int = 35713staticinlineread onlyCOMPRESSED_TEXTURE_FORMATS:Int = 34467staticinlineread onlyCONSTANT_ALPHA:Int = 32771staticinlineread onlyCONSTANT_COLOR:Int = 32769staticinlineread onlyCONTEXT_LOST_WEBGL:Int = 37442staticinlineread onlyCULL_FACE:Int = 2884staticinlineread onlyCULL_FACE_MODE:Int = 2885staticinlineread onlyCURRENT_PROGRAM:Int = 35725staticinlineread onlyCURRENT_VERTEX_ATTRIB:Int = 34342staticinlineread onlyCW:Int = 2304staticinlineread onlyDECR:Int = 7683staticinlineread onlyDECR_WRAP:Int = 34056staticinlineread onlyDELETE_STATUS:Int = 35712staticinlineread onlyDEPTH_ATTACHMENT:Int = 36096staticinlineread onlyDEPTH_BITS:Int = 3414staticinlineread onlyDEPTH_BUFFER_BIT:Int = 256staticinlineread onlyDEPTH_CLEAR_VALUE:Int = 2931staticinlineread onlyDEPTH_COMPONENT:Int = 6402staticinlineread onlyDEPTH_COMPONENT16:Int = 33189staticinlineread onlyDEPTH_FUNC:Int = 2932staticinlineread onlyDEPTH_RANGE:Int = 2928staticinlineread onlyDEPTH_STENCIL:Int = 34041staticinlineread onlyDEPTH_STENCIL_ATTACHMENT:Int = 33306staticinlineread onlyDEPTH_TEST:Int = 2929staticinlineread onlyDEPTH_WRITEMASK:Int = 2930staticinlineread onlyDITHER:Int = 3024staticinlineread onlyDONT_CARE:Int = 4352staticinlineread onlyDST_ALPHA:Int = 772staticinlineread onlyDST_COLOR:Int = 774staticinlineread onlyDYNAMIC_DRAW:Int = 35048staticinlineread onlyELEMENT_ARRAY_BUFFER:Int = 34963staticinlineread onlyELEMENT_ARRAY_BUFFER_BINDING:Int = 34965staticinlineread onlyEQUAL:Int = 514staticinlineread onlyFASTEST:Int = 4353staticinlineread onlyFLOAT:Int = 5126staticinlineread onlyFLOAT_MAT2:Int = 35674staticinlineread onlyFLOAT_MAT3:Int = 35675staticinlineread onlyFLOAT_MAT4:Int = 35676staticinlineread onlyFLOAT_VEC2:Int = 35664staticinlineread onlyFLOAT_VEC3:Int = 35665staticinlineread onlyFLOAT_VEC4:Int = 35666staticinlineread onlyFRAGMENT_SHADER:Int = 35632staticinlineread onlyFRAMEBUFFER:Int = 36160staticinlineread onlyFRAMEBUFFER_ATTACHMENT_OBJECT_NAME:Int = 36049staticinlineread onlyFRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:Int = 36048staticinlineread onlyFRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:Int = 36051staticinlineread onlyFRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:Int = 36050staticinlineread onlyFRAMEBUFFER_BINDING:Int = 36006staticinlineread onlyFRAMEBUFFER_COMPLETE:Int = 36053staticinlineread onlyFRAMEBUFFER_INCOMPLETE_ATTACHMENT:Int = 36054staticinlineread onlyFRAMEBUFFER_INCOMPLETE_DIMENSIONS:Int = 36057staticinlineread onlyFRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:Int = 36055staticinlineread onlyFRAMEBUFFER_UNSUPPORTED:Int = 36061staticinlineread onlyFRONT:Int = 1028staticinlineread onlyFRONT_AND_BACK:Int = 1032staticinlineread onlyFRONT_FACE:Int = 2886staticinlineread onlyFUNC_ADD:Int = 32774staticinlineread onlyFUNC_REVERSE_SUBTRACT:Int = 32779staticinlineread onlyFUNC_SUBTRACT:Int = 32778staticinlineread onlyGENERATE_MIPMAP_HINT:Int = 33170staticinlineread onlyGEQUAL:Int = 518staticinlineread onlyGREATER:Int = 516staticinlineread onlyGREEN_BITS:Int = 3411staticinlineread onlyHIGH_FLOAT:Int = 36338staticinlineread onlyHIGH_INT:Int = 36341staticinlineread onlyIMPLEMENTATION_COLOR_READ_FORMAT:Int = 35739staticinlineread onlyIMPLEMENTATION_COLOR_READ_TYPE:Int = 35738staticinlineread onlyINCR:Int = 7682staticinlineread onlyINCR_WRAP:Int = 34055staticinlineread onlyINT:Int = 5124staticinlineread onlyINT_VEC2:Int = 35667staticinlineread onlyINT_VEC3:Int = 35668staticinlineread onlyINT_VEC4:Int = 35669staticinlineread onlyINVALID_ENUM:Int = 1280staticinlineread onlyINVALID_FRAMEBUFFER_OPERATION:Int = 1286staticinlineread onlyINVALID_OPERATION:Int = 1282staticinlineread onlyINVALID_VALUE:Int = 1281staticinlineread onlyINVERT:Int = 5386staticinlineread onlyKEEP:Int = 7680staticinlineread onlyLEQUAL:Int = 515staticinlineread onlyLESS:Int = 513staticinlineread onlyLINEAR:Int = 9729staticinlineread onlyLINEAR_MIPMAP_LINEAR:Int = 9987staticinlineread onlyLINEAR_MIPMAP_NEAREST:Int = 9985staticinlineread onlyLINES:Int = 1staticinlineread onlyLINE_LOOP:Int = 2staticinlineread onlyLINE_STRIP:Int = 3staticinlineread onlyLINE_WIDTH:Int = 2849staticinlineread onlyLINK_STATUS:Int = 35714staticinlineread onlyLOW_FLOAT:Int = 36336staticinlineread onlyLOW_INT:Int = 36339staticinlineread onlyLUMINANCE:Int = 6409staticinlineread onlyLUMINANCE_ALPHA:Int = 6410staticinlineread onlyMAX_COMBINED_TEXTURE_IMAGE_UNITS:Int = 35661staticinlineread onlyMAX_CUBE_MAP_TEXTURE_SIZE:Int = 34076staticinlineread onlyMAX_FRAGMENT_UNIFORM_VECTORS:Int = 36349staticinlineread onlyMAX_RENDERBUFFER_SIZE:Int = 34024staticinlineread onlyMAX_TEXTURE_IMAGE_UNITS:Int = 34930staticinlineread onlyMAX_TEXTURE_SIZE:Int = 3379staticinlineread onlyMAX_VARYING_VECTORS:Int = 36348staticinlineread onlyMAX_VERTEX_ATTRIBS:Int = 34921staticinlineread onlyMAX_VERTEX_TEXTURE_IMAGE_UNITS:Int = 35660staticinlineread onlyMAX_VERTEX_UNIFORM_VECTORS:Int = 36347staticinlineread onlyMAX_VIEWPORT_DIMS:Int = 3386staticinlineread onlyMEDIUM_FLOAT:Int = 36337staticinlineread onlyMEDIUM_INT:Int = 36340staticinlineread onlyMIRRORED_REPEAT:Int = 33648staticinlineread onlyNEAREST:Int = 9728staticinlineread onlyNEAREST_MIPMAP_LINEAR:Int = 9986staticinlineread onlyNEAREST_MIPMAP_NEAREST:Int = 9984staticinlineread onlyNEVER:Int = 512staticinlineread onlyNICEST:Int = 4354staticinlineread onlyNONE:Int = 0staticinlineread onlyNOTEQUAL:Int = 517staticinlineread onlyNO_ERROR:Int = 0staticinlineread onlyONE:Int = 1staticinlineread onlyONE_MINUS_CONSTANT_ALPHA:Int = 32772staticinlineread onlyONE_MINUS_CONSTANT_COLOR:Int = 32770staticinlineread onlyONE_MINUS_DST_ALPHA:Int = 773staticinlineread onlyONE_MINUS_DST_COLOR:Int = 775staticinlineread onlyONE_MINUS_SRC_ALPHA:Int = 771staticinlineread onlyONE_MINUS_SRC_COLOR:Int = 769staticinlineread onlyOUT_OF_MEMORY:Int = 1285staticinlineread onlyPACK_ALIGNMENT:Int = 3333staticinlineread onlyPOINTS:Int = 0staticinlineread onlyPOLYGON_OFFSET_FACTOR:Int = 32824staticinlineread onlyPOLYGON_OFFSET_FILL:Int = 32823staticinlineread onlyPOLYGON_OFFSET_UNITS:Int = 10752staticinlineread onlyRED_BITS:Int = 3410staticinlineread onlyRENDERBUFFER:Int = 36161staticinlineread onlyRENDERBUFFER_ALPHA_SIZE:Int = 36179staticinlineread onlyRENDERBUFFER_BINDING:Int = 36007staticinlineread onlyRENDERBUFFER_BLUE_SIZE:Int = 36178staticinlineread onlyRENDERBUFFER_DEPTH_SIZE:Int = 36180staticinlineread onlyRENDERBUFFER_GREEN_SIZE:Int = 36177staticinlineread onlyRENDERBUFFER_HEIGHT:Int = 36163staticinlineread onlyRENDERBUFFER_INTERNAL_FORMAT:Int = 36164staticinlineread onlyRENDERBUFFER_RED_SIZE:Int = 36176staticinlineread onlyRENDERBUFFER_STENCIL_SIZE:Int = 36181staticinlineread onlyRENDERBUFFER_WIDTH:Int = 36162staticinlineread onlyRENDERER:Int = 7937staticinlineread onlyREPEAT:Int = 10497staticinlineread onlyREPLACE:Int = 7681staticinlineread onlyRGB:Int = 6407staticinlineread onlyRGB565:Int = 36194staticinlineread onlyRGB5_A1:Int = 32855staticinlineread onlyRGBA:Int = 6408staticinlineread onlyRGBA4:Int = 32854staticinlineread onlySAMPLER_2D:Int = 35678staticinlineread onlySAMPLER_CUBE:Int = 35680staticinlineread onlySAMPLES:Int = 32937staticinlineread onlySAMPLE_ALPHA_TO_COVERAGE:Int = 32926staticinlineread onlySAMPLE_BUFFERS:Int = 32936staticinlineread onlySAMPLE_COVERAGE:Int = 32928staticinlineread onlySAMPLE_COVERAGE_INVERT:Int = 32939staticinlineread onlySAMPLE_COVERAGE_VALUE:Int = 32938staticinlineread onlySCISSOR_BOX:Int = 3088staticinlineread onlySCISSOR_TEST:Int = 3089staticinlineread onlySHADER_TYPE:Int = 35663staticinlineread onlySHADING_LANGUAGE_VERSION:Int = 35724staticinlineread onlySHORT:Int = 5122staticinlineread onlySRC_ALPHA:Int = 770staticinlineread onlySRC_ALPHA_SATURATE:Int = 776staticinlineread onlySRC_COLOR:Int = 768staticinlineread onlySTATIC_DRAW:Int = 35044staticinlineread onlySTENCIL_ATTACHMENT:Int = 36128staticinlineread onlySTENCIL_BACK_FAIL:Int = 34817staticinlineread onlySTENCIL_BACK_FUNC:Int = 34816staticinlineread onlySTENCIL_BACK_PASS_DEPTH_FAIL:Int = 34818staticinlineread onlySTENCIL_BACK_PASS_DEPTH_PASS:Int = 34819staticinlineread onlySTENCIL_BACK_REF:Int = 36003staticinlineread onlySTENCIL_BACK_VALUE_MASK:Int = 36004staticinlineread onlySTENCIL_BACK_WRITEMASK:Int = 36005staticinlineread onlySTENCIL_BITS:Int = 3415staticinlineread onlySTENCIL_BUFFER_BIT:Int = 1024staticinlineread onlySTENCIL_CLEAR_VALUE:Int = 2961staticinlineread onlySTENCIL_FAIL:Int = 2964staticinlineread onlySTENCIL_FUNC:Int = 2962staticinlineread onlySTENCIL_INDEX8:Int = 36168staticinlineread onlySTENCIL_PASS_DEPTH_FAIL:Int = 2965staticinlineread onlySTENCIL_PASS_DEPTH_PASS:Int = 2966staticinlineread onlySTENCIL_REF:Int = 2967staticinlineread onlySTENCIL_TEST:Int = 2960staticinlineread onlySTENCIL_VALUE_MASK:Int = 2963staticinlineread onlySTENCIL_WRITEMASK:Int = 2968staticinlineread onlySTREAM_DRAW:Int = 35040staticinlineread onlySUBPIXEL_BITS:Int = 3408staticinlineread onlyTEXTURE:Int = 5890staticinlineread onlyTEXTURE0:Int = 33984staticinlineread onlyTEXTURE1:Int = 33985staticinlineread onlyTEXTURE10:Int = 33994staticinlineread onlyTEXTURE11:Int = 33995staticinlineread onlyTEXTURE12:Int = 33996staticinlineread onlyTEXTURE13:Int = 33997staticinlineread onlyTEXTURE14:Int = 33998staticinlineread onlyTEXTURE15:Int = 33999staticinlineread onlyTEXTURE16:Int = 34000staticinlineread onlyTEXTURE17:Int = 34001staticinlineread onlyTEXTURE18:Int = 34002staticinlineread onlyTEXTURE19:Int = 34003staticinlineread onlyTEXTURE2:Int = 33986staticinlineread onlyTEXTURE20:Int = 34004staticinlineread onlyTEXTURE21:Int = 34005staticinlineread onlyTEXTURE22:Int = 34006staticinlineread onlyTEXTURE23:Int = 34007staticinlineread onlyTEXTURE24:Int = 34008staticinlineread onlyTEXTURE25:Int = 34009staticinlineread onlyTEXTURE26:Int = 34010staticinlineread onlyTEXTURE27:Int = 34011staticinlineread onlyTEXTURE28:Int = 34012staticinlineread onlyTEXTURE29:Int = 34013staticinlineread onlyTEXTURE3:Int = 33987staticinlineread onlyTEXTURE30:Int = 34014staticinlineread onlyTEXTURE31:Int = 34015staticinlineread onlyTEXTURE4:Int = 33988staticinlineread onlyTEXTURE5:Int = 33989staticinlineread onlyTEXTURE6:Int = 33990staticinlineread onlyTEXTURE7:Int = 33991staticinlineread onlyTEXTURE8:Int = 33992staticinlineread onlyTEXTURE9:Int = 33993staticinlineread onlyTEXTURE_2D:Int = 3553staticinlineread onlyTEXTURE_BINDING_2D:Int = 32873staticinlineread onlyTEXTURE_BINDING_CUBE_MAP:Int = 34068staticinlineread onlyTEXTURE_CUBE_MAP:Int = 34067staticinlineread onlyTEXTURE_CUBE_MAP_NEGATIVE_X:Int = 34070staticinlineread onlyTEXTURE_CUBE_MAP_NEGATIVE_Y:Int = 34072staticinlineread onlyTEXTURE_CUBE_MAP_NEGATIVE_Z:Int = 34074staticinlineread onlyTEXTURE_CUBE_MAP_POSITIVE_X:Int = 34069staticinlineread onlyTEXTURE_CUBE_MAP_POSITIVE_Y:Int = 34071staticinlineread onlyTEXTURE_CUBE_MAP_POSITIVE_Z:Int = 34073staticinlineread onlyTEXTURE_MAG_FILTER:Int = 10240staticinlineread onlyTEXTURE_MIN_FILTER:Int = 10241staticinlineread onlyTEXTURE_WRAP_S:Int = 10242staticinlineread onlyTEXTURE_WRAP_T:Int = 10243staticinlineread onlyTRIANGLES:Int = 4staticinlineread onlyTRIANGLE_FAN:Int = 6staticinlineread onlyTRIANGLE_STRIP:Int = 5staticinlineread onlyUNPACK_ALIGNMENT:Int = 3317staticinlineread onlyUNPACK_COLORSPACE_CONVERSION_WEBGL:Int = 37443staticinlineread onlyUNPACK_FLIP_Y_WEBGL:Int = 37440staticinlineread onlyUNPACK_PREMULTIPLY_ALPHA_WEBGL:Int = 37441staticinlineread onlyUNSIGNED_BYTE:Int = 5121staticinlineread onlyUNSIGNED_INT:Int = 5125staticinlineread onlyUNSIGNED_SHORT:Int = 5123staticinlineread onlyUNSIGNED_SHORT_4_4_4_4:Int = 32819staticinlineread onlyUNSIGNED_SHORT_5_5_5_1:Int = 32820staticinlineread onlyUNSIGNED_SHORT_5_6_5:Int = 33635staticinlineread onlyVALIDATE_STATUS:Int = 35715staticinlineread onlyVENDOR:Int = 7936staticinlineread onlyVERSION:Int = 7938staticinlineread onlyVERTEX_ATTRIB_ARRAY_BUFFER_BINDING:Int = 34975staticinlineread onlyVERTEX_ATTRIB_ARRAY_ENABLED:Int = 34338staticinlineread onlyVERTEX_ATTRIB_ARRAY_NORMALIZED:Int = 34922staticinlineread onlyVERTEX_ATTRIB_ARRAY_POINTER:Int = 34373staticinlineread onlyVERTEX_ATTRIB_ARRAY_SIZE:Int = 34339staticinlineread onlyVERTEX_ATTRIB_ARRAY_STRIDE:Int = 34340staticinlineread onlyVERTEX_ATTRIB_ARRAY_TYPE:Int = 34341staticinlineread onlyVERTEX_SHADER:Int = 35633staticinlineread onlyVIEWPORT:Int = 2978staticinlineread onlyZERO:Int = 0read onlycanvas:CanvasElementA read-only back-reference to the HTMLCanvasElement. Might be null if it is not associated with a canvas element.
read onlydrawingBufferHeight:IntThe read-only height of the current drawing buffer. Should match the height of the canvas element associated with this context.
read onlydrawingBufferWidth:IntThe read-only width of the current drawing buffer. Should match the width of the canvas element associated with this context.
activeTexture(texture:Int):VoidSelects the active texture unit.
attachShader(program:Program, shader:Shader):VoidAttaches a WebGLShader to a WebGLProgram.
bindAttribLocation(program:Program, index:Int, name:String):VoidBinds a generic vertex index to a named attribute variable.
bindBuffer(target:Int, buffer:Buffer):VoidBinds a WebGLBuffer object to a given target.
bindFramebuffer(target:Int, framebuffer:Framebuffer):VoidBinds a WebGLFrameBuffer object to a given target.
bindRenderbuffer(target:Int, renderbuffer:Renderbuffer):VoidBinds a WebGLRenderBuffer object to a given target.
bindTexture(target:Int, texture:Texture):VoidBinds a WebGLTexture object to a given target.
blendColor(red:Float, green:Float, blue:Float, alpha:Float):VoidSets the source and destination blending factors.
blendEquation(mode:Int):VoidSets both the RGB blend equation and alpha blend equation to a single equation.
blendEquationSeparate(modeRGB:Int, modeAlpha:Int):VoidSets the RGB blend equation and alpha blend equation separately.
blendFunc(sfactor:Int, dfactor:Int):VoidDefines which function is used for blending pixel arithmetic.
blendFuncSeparate(srcRGB:Int, dstRGB:Int, srcAlpha:Int, dstAlpha:Int):VoidDefines which function is used for blending pixel arithmetic for RGB and alpha components separately.
bufferData(target:Int, data:ArrayBufferView, usage:Int):VoidbufferData(target:Int, size:Int, usage:Int):VoidbufferData(target:Int, data:ArrayBuffer, usage:Int):VoidUpdates buffer data.
bufferSubData(target:Int, offset:Int, data:ArrayBufferView):VoidbufferSubData(target:Int, offset:Int, data:ArrayBuffer):VoidUpdates buffer data starting at a passed offset.
checkFramebufferStatus(target:Int):IntReturns the status of the framebuffer.
clear(mask:Int):VoidClears specified buffers to preset values.
clearColor(red:Float, green:Float, blue:Float, alpha:Float):VoidSpecifies the color values used when clearing color buffers.
clearDepth(depth:Float):VoidSpecifies the depth value used when clearing the depth buffer.
clearStencil(s:Int):VoidSpecifies the stencil value used when clearing the stencil buffer.
colorMask(red:Bool, green:Bool, blue:Bool, alpha:Bool):VoidSets which color components to enable or to disable when drawing or rendering to a WebGLFramebuffer.
compileShader(shader:Shader):VoidCompiles a WebGLShader.
compressedTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, data:ArrayBufferView):VoidSpecifies 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):VoidSpecifies 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):VoidCopies a 2D texture image.
copyTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, x:Int, y:Int, width:Int, height:Int):VoidCopies a 2D texture sub-image.
createBuffer():BufferCreates a WebGLBuffer object.
createFramebuffer():FramebufferCreates a WebGLFrameBuffer object.
createProgram():ProgramCreates a WebGLProgram.
createRenderbuffer():RenderbufferCreates a WebGLRenderBuffer object.
createShader(type:Int):ShaderCreates a WebGLShader.
createTexture():TextureCreates a WebGLTexture object.
cullFace(mode:Int):VoidSpecifies whether or not front- and/or back-facing polygons can be culled.
deleteBuffer(buffer:Buffer):VoidDeletes a WebGLBuffer object.
deleteFramebuffer(framebuffer:Framebuffer):VoidDeletes a WebGLFrameBuffer object.
deleteProgram(program:Program):VoidDeletes a WebGLProgram.
deleteRenderbuffer(renderbuffer:Renderbuffer):VoidDeletes a WebGLRenderBuffer object.
deleteShader(shader:Shader):VoidDeletes a WebGLShader.
deleteTexture(texture:Texture):VoidDeletes a WebGLTexture object.
depthFunc(func:Int):VoidSpecifies a function that compares incoming pixel depth to the current depth buffer value.
depthMask(flag:Bool):VoidSets whether writing into the depth buffer is enabled or disabled.
depthRange(zNear:Float, zFar:Float):VoidSpecifies the depth range mapping from normalized device coordinates to window or viewport coordinates.
detachShader(program:Program, shader:Shader):VoidDetaches a WebGLShader.
disable(cap:Int):VoidDisables specific WebGL capabilities for this context.
disableVertexAttribArray(index:Int):VoidDisables a vertex attribute array at a given position.
drawArrays(mode:Int, first:Int, count:Int):VoidRenders primitives from array data.
drawElements(mode:Int, count:Int, type:Int, offset:Int):VoidRenders primitives from element array data.
enable(cap:Int):VoidEnables specific WebGL capabilities for this context.
enableVertexAttribArray(index:Int):VoidEnables a vertex attribute array at a given position.
finish():VoidBlocks execution until all previously called commands are finished.
flush():VoidEmpties different buffer commands, causing all commands to be executed as quickly as possible.
framebufferRenderbuffer(target:Int, attachment:Int, renderbuffertarget:Int, renderbuffer:Renderbuffer):VoidAttaches a WebGLRenderingBuffer object to a WebGLFrameBuffer object.
framebufferTexture2D(target:Int, attachment:Int, textarget:Int, texture:Texture, level:Int):VoidAttaches a textures image to a WebGLFrameBuffer object.
frontFace(mode:Int):VoidSpecifies whether polygons are front- or back-facing by setting a winding orientation.
generateMipmap(target:Int):VoidGenerates a set of mipmaps for a WebGLTexture object.
getActiveAttrib(program:Program, index:Int):ActiveInfoReturns information about an active attribute variable.
getActiveUniform(program:Program, index:Int):ActiveInfoReturns 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):IntReturns the location of an attribute variable.
getBufferParameter(target:Int, pname:Int):DynamicReturns information about the buffer.
getContextAttributes():ContextAttributesReturns a WebGLContextAttributes object that contains the actual context parameters. Might return null, if the context is lost.
getError():IntReturns error information.
getExtension<T>(name:Extension<T>):TReturns an extension object.
Throws:
null |
DOMError |
|---|
getFramebufferAttachmentParameter(target:Int, attachment:Int, pname:Int):DynamicReturns information about the framebuffer.
Throws:
null |
DOMError |
|---|
getParameter(pname:Int):DynamicReturns a value for the passed parameter name.
Throws:
null |
DOMError |
|---|
getProgramInfoLog(program:Program):StringReturns the information log for a WebGLProgram object.
getProgramParameter(program:Program, pname:Int):DynamicReturns information about the program.
getRenderbufferParameter(target:Int, pname:Int):DynamicReturns information about the renderbuffer.
getShaderInfoLog(shader:Shader):StringReturns the information log for a WebGLShader object.
getShaderParameter(shader:Shader, pname:Int):DynamicReturns information about the shader.
getShaderPrecisionFormat(shadertype:Int, precisiontype:Int):ShaderPrecisionFormatReturns a WebGLShaderPrecisionFormat object describing the precision for the numeric format of the shader.
getShaderSource(shader:Shader):StringReturns 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):DynamicReturns information about the texture.
getUniform(program:Program, location:UniformLocation):DynamicReturns the value of a uniform variable at a given location.
getUniformLocation(program:Program, name:String):UniformLocationReturns the location of a uniform variable.
getVertexAttrib(index:Int, pname:Int):DynamicReturns information about a vertex attribute at a given position.
Throws:
null |
DOMError |
|---|
getVertexAttribOffset(index:Int, pname:Int):IntReturns the address of a given vertex attribute.
hint(target:Int, mode:Int):VoidSpecifies hints for certain behaviors. The interpretation of these hints depend on the implementation.
isBuffer(buffer:Buffer):BoolReturns a Boolean indicating if the passed buffer is valid.
isContextLost():BoolReturns true if the context is lost, otherwise returns false.
isEnabled(cap:Int):BoolTests whether a specific WebGL capability is enabled or not for this context.
isFramebuffer(framebuffer:Framebuffer):BoolReturns a Boolean indicating if the passed WebGLFrameBuffer object is valid.
isProgram(program:Program):BoolReturns a Boolean indicating if the passed WebGLProgram is valid.
isRenderbuffer(renderbuffer:Renderbuffer):BoolReturns a Boolean indicating if the passed WebGLRenderingBuffer is valid.
isShader(shader:Shader):BoolReturns a Boolean indicating if the passed WebGLShader is valid.
isTexture(texture:Texture):BoolReturns a Boolean indicating if the passed WebGLTexture is valid.
lineWidth(width:Float):VoidSets the line width of rasterized lines.
linkProgram(program:Program):VoidLinks the passed WebGLProgram object.
pixelStorei(pname:Int, param:Int):VoidSpecifies the pixel storage modes
polygonOffset(factor:Float, units:Float):VoidSpecifies the scale factors and units to calculate depth values.
readPixels(x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView):VoidReads a block of pixels from the WebGLFrameBuffer.
Throws:
null |
DOMError |
|---|
renderbufferStorage(target:Int, internalformat:Int, width:Int, height:Int):VoidCreates a renderbuffer data store.
sampleCoverage(value:Float, invert:Bool):VoidSpecifies multi-sample coverage parameters for anti-aliasing effects.
scissor(x:Int, y:Int, width:Int, height:Int):VoidDefines the scissor box.
shaderSource(shader:Shader, source:String):VoidSets the source code in a WebGLShader.
stencilFunc(func:Int, ref:Int, mask:Int):VoidSets the both front and back function and reference value for stencil testing.
stencilFuncSeparate(face:Int, func:Int, ref:Int, mask:Int):VoidSets the front and/or back function and reference value for stencil testing.
stencilMask(mask:Int):VoidControls enabling and disabling of both the front and back writing of individual bits in the stencil planes.
stencilMaskSeparate(face:Int, mask:Int):VoidControls enabling and disabling of front and/or back writing of individual bits in the stencil planes.
stencilOp(fail:Int, zfail:Int, zpass:Int):VoidSets both the front and back-facing stencil test actions.
stencilOpSeparate(face:Int, fail:Int, zfail:Int, zpass:Int):VoidSets the front and/or back-facing stencil test actions.
texImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, video:VideoElement):VoidtexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, pixels:ArrayBufferView):VoidtexImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, pixels:ImageBitmap):VoidtexImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, pixels:ImageData):VoidtexImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, image:ImageElement):VoidtexImage2D(target:Int, level:Int, internalformat:Int, format:Int, type:Int, canvas:CanvasElement):VoidSpecifies a 2D texture image.
Throws:
null |
DOMError |
|---|
texParameterf(target:Int, pname:Int, param:Float):VoidtexParameteri(target:Int, pname:Int, param:Int):VoidtexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, video:VideoElement):VoidtexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView):VoidtexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, pixels:ImageBitmap):VoidtexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, pixels:ImageData):VoidtexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, image:ImageElement):VoidtexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, format:Int, type:Int, canvas:CanvasElement):VoidUpdates a sub-rectangle of the current WebGLTexture.
Throws:
null |
DOMError |
|---|
uniform1f(location:UniformLocation, x:Float):Voiduniform1fv(location:UniformLocation, data:Float32Array):Voiduniform1fv(location:UniformLocation, data:Array<Float>):Voiduniform1i(location:UniformLocation, x:Int):Voiduniform1iv(location:UniformLocation, data:Int32Array):Voiduniform1iv(location:UniformLocation, data:Array<Int>):Voiduniform2f(location:UniformLocation, x:Float, y:Float):Voiduniform2fv(location:UniformLocation, data:Float32Array):Voiduniform2fv(location:UniformLocation, data:Array<Float>):Voiduniform2i(location:UniformLocation, x:Int, y:Int):Voiduniform2iv(location:UniformLocation, data:Int32Array):Voiduniform2iv(location:UniformLocation, data:Array<Int>):Voiduniform3f(location:UniformLocation, x:Float, y:Float, z:Float):Voiduniform3fv(location:UniformLocation, data:Float32Array):Voiduniform3fv(location:UniformLocation, data:Array<Float>):Voiduniform3i(location:UniformLocation, x:Int, y:Int, z:Int):Voiduniform3iv(location:UniformLocation, data:Int32Array):Voiduniform3iv(location:UniformLocation, data:Array<Int>):Voiduniform4f(location:UniformLocation, x:Float, y:Float, z:Float, w:Float):Voiduniform4fv(location:UniformLocation, data:Float32Array):Voiduniform4fv(location:UniformLocation, data:Array<Float>):Voiduniform4i(location:UniformLocation, x:Int, y:Int, z:Int, w:Int):Voiduniform4iv(location:UniformLocation, data:Int32Array):Voiduniform4iv(location:UniformLocation, data:Array<Int>):VoiduniformMatrix2fv(location:UniformLocation, transpose:Bool, data:Float32Array):VoiduniformMatrix2fv(location:UniformLocation, transpose:Bool, data:Array<Float>):VoiduniformMatrix3fv(location:UniformLocation, transpose:Bool, data:Float32Array):VoiduniformMatrix3fv(location:UniformLocation, transpose:Bool, data:Array<Float>):VoiduniformMatrix4fv(location:UniformLocation, transpose:Bool, data:Float32Array):VoiduniformMatrix4fv(location:UniformLocation, transpose:Bool, data:Array<Float>):VoiduseProgram(program:Program):VoidUses the specified WebGLProgram as part the current rendering state.
validateProgram(program:Program):VoidValidates a WebGLProgram.
vertexAttrib1f(indx:Int, x:Float):VoidvertexAttrib1fv(indx:Int, values:Float32Array):VoidvertexAttrib1fv(indx:Int, values:Array<Float>):VoidvertexAttrib2f(indx:Int, x:Float, y:Float):VoidvertexAttrib2fv(indx:Int, values:Float32Array):VoidvertexAttrib2fv(indx:Int, values:Array<Float>):VoidvertexAttrib3f(indx:Int, x:Float, y:Float, z:Float):VoidvertexAttrib3fv(indx:Int, values:Float32Array):VoidvertexAttrib3fv(indx:Int, values:Array<Float>):VoidvertexAttrib4f(indx:Int, x:Float, y:Float, z:Float, w:Float):VoidvertexAttrib4fv(indx:Int, values:Float32Array):VoidvertexAttrib4fv(indx:Int, values:Array<Float>):VoidvertexAttribPointer(indx:Int, size:Int, type:Int, normalized:Bool, stride:Int, offset:Int):VoidSpecifies the data formats and locations of vertex attributes in a vertex attributes array.
viewport(x:Int, y:Int, width:Int, height:Int):VoidSets the viewport.
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/webgl/RenderingContext.html