Protected _webGLRendererFrameBuffer 状态完整。
The WebGLRenderingContext.bindBuffer() method of the WebGL API binds a given WebGLBuffer to a target.
A GLenum specifying the binding point (target).
A WebGLBuffer to bind.
The WebGLRenderingContext.bindFramebuffer() method of the WebGL API binds to the specified target the provided WebGLFramebuffer, or, if the framebuffer argument is null, the default WebGLFramebuffer, which is associated with the canvas rendering context.
A GLenum specifying the binding point (target).
A WebGLFramebuffer object to bind, or null for binding the Canvas or OffscreenCanvas object associated with the rendering context.
The WebGLRenderingContext.bindRenderbuffer() method of the WebGL API binds a given WebGLRenderbuffer to a target, which must be gl.RENDERBUFFER.
A GLenum specifying the binding point (target).
A WebGLRenderbuffer object to bind.
The WebGLRenderingContext.bindTexture() method of the WebGL API binds a given WebGLTexture to a target (binding point).
A GLenum specifying the binding point (target).
A WebGLTexture object to bind.
The WebGLRenderingContext.blendEquation() method of the WebGL API is used to set both the RGB blend equation and alpha blend equation to a single equation.
The blend equation determines how a new pixel is combined with a pixel already in the WebGLFramebuffer.
A GLenum specifying how source and destination colors are combined.
The WebGLRenderingContext.blendFunc() method of the WebGL API defines which function is used for blending pixel arithmetic.
A WebGL_API.Types specifying a multiplier for the source blending factors. The default value is gl.ONE. For possible values, see below.
A WebGL_API.Types specifying a multiplier for the destination blending factors. The default value is gl.ZERO. For possible values, see below.
The WebGLRenderingContext.bufferData() method of the WebGL API initializes and creates the buffer object's data store.
A GLenum specifying the binding point (target).
An ArrayBuffer, SharedArrayBuffer, a TypedArray or a DataView that will be copied into the data store. If null, a data store is still created, but the content is uninitialized and undefined.
A GLenum specifying the intended usage pattern of the data store for optimization purposes.
The WebGLRenderingContext.checkFramebufferStatus() method of the WebGL API returns the completeness status of the WebGLFramebuffer object.
A GLenum specifying the binding point (target).
The WebGLRenderingContext.clear() method of the WebGL API clears buffers to preset values.
The preset values can be set by clearColor(), clearDepth() or clearStencil().
The scissor box, dithering, and buffer writemasks can affect the clear() method.
A GLbitfield bitwise OR mask that indicates the buffers to be cleared.
The WebGLRenderingContext.clearColor() method of the WebGL API specifies the color values used when clearing color buffers.
This specifies what color values to use when calling the clear() method. The values are clamped between 0 and 1.
Optional red: numberA GLclampf specifying the red color value used when the color buffers are cleared. Default value: 0.
Optional green: numberA GLclampf specifying the green color value used when the color buffers are cleared. Default value: 0.
Optional blue: numberA GLclampf specifying the blue color value used when the color buffers are cleared. Default value: 0.
Optional alpha: numberA GLclampf specifying the alpha (transparency) value used when the color buffers are cleared. Default value: 0.
The WebGLRenderingContext.clearDepth() method of the WebGL API specifies the clear value for the depth buffer.
This specifies what depth value to use when calling the clear() method. The value is clamped between 0 and 1.
A GLclampf specifying the depth value used when the depth buffer is cleared. Default value: 1.
The WebGLRenderingContext.clearStencil() method of the WebGL API specifies the clear value for the stencil buffer.
This specifies what stencil value to use when calling the clear() method.
Optional s: numberA GLint specifying the index used when the stencil buffer is cleared. Default value: 0.
The WebGLRenderingContext.colorMask() method of the WebGL API sets which color components to enable or to disable when drawing or rendering to a WebGLFramebuffer.
A GLboolean specifying whether or not the red color component can be written into the frame buffer. Default value: true.
A GLboolean specifying whether or not the green color component can be written into the frame buffer. Default value: true.
A GLboolean specifying whether or not the blue color component can be written into the frame buffer. Default value: true.
A GLboolean specifying whether or not the alpha (transparency) component can be written into the frame buffer. Default value: true.
The WebGLRenderingContext.createBuffer() method of the WebGL API creates and initializes a WebGLBuffer storing data such as vertices or colors.
A WebGLBuffer storing data such as vertices or colors.
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/createBuffer
The WebGLRenderingContext.createProgram() method of the WebGL API creates and initializes a WebGLProgram object.
A WebGLProgram object that is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). These are then linked into a usable program.
The WebGLRenderingContext.createRenderbuffer() method of the WebGL API creates and initializes a WebGLRenderbuffer object.
A WebGLRenderbuffer object that stores data such an image, or can be source or target of an rendering operation.
The WebGLRenderingContext method createShader() of the WebGL API creates a WebGLShader that can then be configured further using WebGLRenderingContext.shaderSource() and WebGLRenderingContext.compileShader().
Either gl.VERTEX_SHADER or gl.FRAGMENT_SHADER
A new (WebGLShader).
The WebGL2RenderingContext.createVertexArray() method of the WebGL 2 API creates and initializes a WebGLVertexArrayObject object that represents a vertex array object (VAO) pointing to vertex array data and which provides names for different sets of vertex data.
A WebGLVertexArrayObject representing a vertex array object (VAO) which points to vertex array data.
The WebGLRenderingContext.cullFace() method of the WebGL API specifies whether or not front- and/or back-facing polygons can be culled.
A GLenum specifying whether front- or back-facing polygons are candidates for culling.
The WebGLRenderingContext.deleteBuffer() method of the WebGL API deletes a given WebGLBuffer. This method has no effect if the buffer has already been deleted. Normally you don't need to call this method yourself, when the buffer object is dereferenced it will be marked as free.
A WebGLBuffer object to delete.
The WebGLRenderingContext.deleteFramebuffer() method of the WebGL API deletes a given WebGLFramebuffer object. This method has no effect if the frame buffer has already been deleted.
A WebGLFramebuffer object to delete.
The WebGLRenderingContext.deleteRenderbuffer() method of the WebGL API deletes a given WebGLRenderbuffer object. This method has no effect if the render buffer has already been deleted.
deleteRenderbuffer(renderbuffer)
The WebGLRenderingContext.deleteShader() method of the WebGL API marks a given WebGLShader object for deletion. It will then be deleted whenever the shader is no longer in use. This method has no effect if the shader has already been deleted, and the WebGLShader is automatically marked for deletion when it is destroyed by the garbage collector.
A WebGLShader object to delete.
The WebGLRenderingContext.depthFunc() method of the WebGL API specifies a function that compares incoming pixel depth to the current depth buffer value.
A GLenum specifying the depth comparison function, which sets the conditions under which the pixel will be drawn. The default value is gl.LESS.
The WebGLRenderingContext.depthMask() method of the WebGL API sets whether writing into the depth buffer is enabled or disabled.
A GLboolean specifying whether or not writing into the depth buffer is enabled. Default value: true, meaning that writing is enabled.
The WebGLRenderingContext.disable() method of the WebGL API disables specific WebGL capabilities for this context.
A GLenum specifying which WebGL capability to disable.
The WebGLRenderingContext.drawArrays() method of the WebGL API renders primitives from array data.
A GLenum specifying the type primitive to render.
A GLint specifying the starting index in the array of vector points.
A GLsizei specifying the number of indices to be rendered.
The WebGL2RenderingContext.drawArraysInstanced() method of the WebGL 2 API renders primitives from array data like the gl.drawArrays() method. In addition, it can execute multiple instances of the range of elements.
A GLenum specifying the type primitive to render.
A GLint specifying the starting index in the array of vector points.
A GLsizei specifying the number of indices to be rendered.
A GLsizei specifying the number of instances of the range of elements to execute.
The WebGLRenderingContext.drawElements() method of the WebGL API renders primitives from array data.
A GLenum specifying the type primitive to render.
A GLsizei specifying the number of elements of the bound element array buffer to be rendered. For example, to draw a wireframe triangle with gl.LINES the count should be 2 endpoints per line × 3 lines = 6 elements. However to draw the same wireframe triangle with gl.LINE_STRIP the element array buffer does not repeat the indices for the end of the first line/start of the second line, and end of the second line/start of the third line, so count will be four. To draw the same triangle with gl.LINE_LOOP the element array buffer does not repeat the first/last vertex either so count will be three.
A GLenum specifying the type of the values in the element array buffer.
A GLintptr specifying a byte offset in the element array buffer. Must be a valid multiple of the size of the given type.
The WebGL2RenderingContext.drawElementsInstanced() method of the WebGL 2 API renders primitives from array data like the gl.drawElements() method. In addition, it can execute multiple instances of a set of elements.
A GLenum specifying the type primitive to render.
A GLsizei specifying the number of elements to be rendered.
A GLenum specifying the type of the values in the element array buffer.
A GLintptr specifying an offset in the element array buffer. Must be a valid multiple of the size of the given type.
A GLsizei specifying the number of instances of the set of elements to execute.
The WebGLRenderingContext.enable() method of the WebGL API enables specific WebGL capabilities for this context.
A GLenum specifying which WebGL capability to enable.
The WebGLRenderingContext method enableVertexAttribArray(), part of the WebGL API, turns on the generic vertex attribute array at the specified index into the list of attribute arrays.
A GLuint specifying the index number that uniquely identifies the vertex attribute to enable. If you know the name of the attribute but not its index, you can get the index by calling getAttribLocation().
The WebGLRenderingContext.framebufferRenderbuffer() method of the WebGL API attaches a WebGLRenderbuffer object to a WebGLFramebuffer object.
A GLenum specifying the binding point (target) for the framebuffer.
A GLenum specifying the binding point (target) for the render buffer.
A WebGLRenderbuffer object to attach.
The WebGLRenderingContext.framebufferTexture2D() method of the WebGL API attaches a texture to a WebGLFramebuffer.
A GLenum specifying the binding point (target).
A GLenum specifying the attachment point for the texture.
A GLenum specifying the texture target.
A WebGLTexture object whose image to attach.
Optional level: numberA GLint specifying the mipmap level of the texture image to be attached. Must be 0.
The WebGLRenderingContext.frontFace() method of the WebGL API specifies whether polygons are front- or back-facing by setting a winding orientation.
A GLenum type winding orientation. The default value is gl.CCW.
The WebGLRenderingContext.generateMipmap() method of the WebGL API generates a set of mipmaps for a WebGLTexture object.
Mipmaps are used to create distance with objects. A higher-resolution mipmap is used for objects that are closer, and a lower-resolution mipmap is used for objects that are farther away. It starts with the resolution of the texture image and halves the resolution until a 1x1 dimension texture image is created.
A GLenum specifying the binding point (target) of the active texture whose mipmaps will be generated.
The WebGLRenderingContext.getActiveAttrib() method of the WebGL API returns a WebGLActiveInfo object containing size, type, and name of a vertex attribute. It is generally used when querying unknown attributes either for debugging or generic library creation.
A WebGLProgram containing the vertex attribute.
A GLuint specifying the index of the vertex attribute to get. This value is an index 0 to N - 1 as returned by gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES).
A WebGLActiveInfo object.
The WebGLRenderingContext.getActiveUniform() method of the WebGL API returns a WebGLActiveInfo object containing size, type, and name of a uniform attribute. It is generally used when querying unknown uniforms either for debugging or generic library creation.
A WebGLProgram specifying the WebGL shader program from which to obtain the uniform variable's information.
A GLuint specifying the index of the uniform attribute to get. This value is an index 0 to N - 1 as returned by gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS).
A WebGLActiveInfo object describing the uniform.
The WebGLRenderingContext.getAttribLocation() method of the WebGL API returns the location of an attribute variable in a given WebGLProgram.
A WebGLProgram containing the attribute variable.
A string specifying the name of the attribute variable whose location to get.
A GLint number indicating the location of the variable name if found. Returns -1 otherwise.
The WebGLRenderingContext.getExtension() method enables a WebGL extension.
A String for the name of the WebGL extension to enable.
A WebGL extension object, or null if name does not match (case-insensitive) to one of the strings in WebGLRenderingContext.getSupportedExtensions.
The WebGLRenderingContext.getParameter() method of the WebGL API returns a value for the passed parameter name.
A GLenum specifying which parameter value to return.
The WebGLRenderingContext.getProgramInfoLog returns the information log for the specified WebGLProgram object. It contains errors that occurred during failed linking or validation of WebGLProgram objects.
The WebGLProgram to query.
A string that contains diagnostic messages, warning messages, and other information about the last linking or validation operation. When a WebGLProgram object is initially created, its information log will be a string of length 0.
The WebGLRenderingContext.getProgramParameter() method of the WebGL API returns information about the given program.
A WebGLProgram to get parameter information from.
A GLenum specifying the information to query.
Returns the requested program information (as specified with pname).
The WebGLRenderingContext.getShaderInfoLog returns the information log for the specified WebGLShader object. It contains warnings, debugging and compile information.
A WebGLShader to query.
A string that contains diagnostic messages, warning messages, and other information about the last compile operation. When a WebGLShader object is initially created, its information log will be a string of length 0.
The WebGLRenderingContext.getShaderParameter() method of the WebGL API returns information about the given shader.
A WebGLShader to get parameter information from.
A GLenum specifying the information to query.
Returns the requested shader information (as specified with pname).
The WebGLRenderingContext.getShaderPrecisionFormat() method of the WebGL API returns a new WebGLShaderPrecisionFormat object describing the range and precision for the specified shader numeric format.
Either a gl.FRAGMENT_SHADER or a gl.VERTEX_SHADER.
A precision type value. Either gl.LOW_FLOAT, gl.MEDIUM_FLOAT, gl.HIGH_FLOAT, gl.LOW_INT, gl.MEDIUM_INT, or gl.HIGH_INT.
A WebGLShaderPrecisionFormat object or null, if an error occurs.
Part of the WebGL API, the WebGLRenderingContext method getUniformLocation() returns the location of a specific uniform variable which is part of a given WebGLProgram.
The WebGLProgram in which to locate the specified uniform variable.
A string specifying the name of the uniform variable whose location is to be returned. The name can't have any whitespace in it, and you can't use this function to get the location of any uniforms starting with the reserved string "gl_", since those are internal to the WebGL layer.
A WebGLUniformLocation value indicating the location of the named variable, if it exists. If the specified variable doesn't exist, null is returned instead.
The WebGLRenderingContext.pixelStorei() method of the WebGL API specifies the pixel storage modes.
A GLenum specifying which parameter to set.
A GLint specifying a value to set the pname parameter to.
The WebGLRenderingContext.polygonOffset() method of the WebGL API specifies the scale factors and units to calculate depth values.
The offset is added before the depth test is performed and before the value is written into the depth buffer.
A GLfloat which sets the scale factor for the variable depth offset for each polygon. The default value is 0.
A GLfloat which sets the multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. The default value is 0.
The WebGLRenderingContext.readPixels() method of the WebGL API reads a block of pixels from a specified rectangle of the current color framebuffer into a TypedArray or a DataView object.
A GLint specifying the first horizontal pixel that is read from the lower left corner of a rectangular block of pixels.
A GLint specifying the first vertical pixel that is read from the lower left corner of a rectangular block of pixels.
A GLsizei specifying the width of the rectangle.
A GLsizei specifying the height of the rectangle.
A GLenum specifying the format of the pixel data.
A GLenum specifying the data type of the pixel data.
An object to read data into.
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels
The WebGLRenderingContext.renderbufferStorage() method of the WebGL API creates and initializes a renderbuffer object's data store.
A GLenum specifying the target renderbuffer object. Possible values:
A GLenum specifying the internal format of the renderbuffer.
A GLsizei specifying the width of the renderbuffer in pixels.
A GLsizei specifying the height of the renderbuffer in pixels.
The WebGLRenderingContext.scissor() method of the WebGL API sets a scissor box, which limits the drawing to a specified rectangle.
A GLint specifying the horizontal coordinate for the lower left corner of the box. Default value: 0.
A GLint specifying the vertical coordinate for the lower left corner of the box. Default value: 0.
A non-negative GLsizei specifying the width of the scissor box. Default value: width of the canvas.
A non-negative GLsizei specifying the height of the scissor box. Default value: height of the canvas.
The WebGLRenderingContext.shaderSource() method of the WebGL API sets the source code of a WebGLShader.
A WebGLShader object in which to set the source code.
A string containing the GLSL source code to set.
The WebGLRenderingContext.stencilFunc() method of the WebGL API sets the front and back function and reference value for stencil testing.
Stenciling enables and disables drawing on a per-pixel basis. It is typically used in multipass rendering to achieve special effects.
A GLenum specifying the test function. The default function is gl.ALWAYS.
A GLint specifying the reference value for the stencil test. This value is clamped to the range 0 to 2^n - 1 where n is the number of bitplanes in the stencil buffer. The default value is 0.
A GLuint specifying a bit-wise mask that is used to AND the reference value and the stored stencil value when the test is done. The default value is all 1.
The WebGLRenderingContext.stencilMask() method of the WebGL API controls enabling and disabling of both the front and back writing of individual bits in the stencil planes.
The WebGLRenderingContext.stencilMaskSeparate() method can set front and back stencil writemasks to different values.
A GLuint specifying a bit mask to enable or disable writing of individual bits in the stencil planes. By default, the mask is all 1.
The WebGLRenderingContext.texImage2D() method of the WebGL API specifies a two-dimensional texture image.
A GLenum specifying the binding point (target) of the active texture.
A GLint specifying the level of detail. Level 0 is the base image level and level n is the n-th mipmap reduction level.
A GLenum specifying the color components in the texture.
A GLenum specifying the format of the texel data. In WebGL 1, this must be the same as internalformat (see above).
A GLenum specifying the data type of the texel data.
One of the following objects can be used as a pixel source for the texture.
The WebGLRenderingContext.texImage2D() method of the WebGL API specifies a two-dimensional texture image.
A GLenum specifying the binding point (target) of the active texture.
A GLint specifying the level of detail. Level 0 is the base image level and level n is the n-th mipmap reduction level.
A GLenum specifying the color components in the texture.
A GLsizei specifying the width of the texture.
A GLsizei specifying the height of the texture.
A GLint specifying the width of the border. Must be 0.
A GLenum specifying the format of the texel data. In WebGL 1, this must be the same as internalformat (see above).
A GLenum specifying the data type of the texel data.
One of the following objects can be used as a pixel source for the texture.
The WebGLRenderingContext.texParameterfi methods of the WebGL API set texture parameters.
A GLenum specifying the binding point (target).
The param parameter is a GLfloat or GLint specifying the value for the specified parameter
The pname parameter is a GLenum specifying the texture parameter to set.
The WebGLRenderingContext.texParameterfi methods of the WebGL API set texture parameters.
The WebGLRenderingContext.texParameterfi methods of the WebGL API set texture parameters.
A GLenum specifying the binding point (target).
The param parameter is a GLfloat or GLint specifying the value for the specified parameter
The pname parameter is a GLenum specifying the texture parameter to set.
The WebGLRenderingContext.texParameterfi methods of the WebGL API set texture parameters.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniform[1234][fi]v methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
A WebGLUniformLocation object containing the location of the uniform attribute to modify.
A new value to be used for the uniform variable.
The WebGLRenderingContext.uniformMatrix[234]fv() methods of the WebGL API specify matrix values for uniform variables.
The three versions of this method (uniformMatrix2fv(), uniformMatrix3fv(), and uniformMatrix4fv()) take as the input value 2-component, 3-component, and 4-component square matrices, respectively. They are expected to have 4, 9 or 16 floats.
A WebGLUniformLocation object containing the location of the uniform attribute to modify. The location is obtained using getUniformLocation().
A GLboolean specifying whether to transpose the matrix. Must be false.
A Float32Array or sequence of GLfloat values. The values are assumed to be supplied in column major order.
The WebGLRenderingContext.uniformMatrix[234]fv() methods of the WebGL API specify matrix values for uniform variables.
The three versions of this method (uniformMatrix2fv(), uniformMatrix3fv(), and uniformMatrix4fv()) take as the input value 2-component, 3-component, and 4-component square matrices, respectively. They are expected to have 4, 9 or 16 floats.
A WebGLUniformLocation object containing the location of the uniform attribute to modify. The location is obtained using getUniformLocation().
A GLboolean specifying whether to transpose the matrix. Must be false.
A Float32Array or sequence of GLfloat values. The values are assumed to be supplied in column major order.
The WebGLRenderingContext.uniformMatrix[234]fv() methods of the WebGL API specify matrix values for uniform variables.
The three versions of this method (uniformMatrix2fv(), uniformMatrix3fv(), and uniformMatrix4fv()) take as the input value 2-component, 3-component, and 4-component square matrices, respectively. They are expected to have 4, 9 or 16 floats.
A WebGLUniformLocation object containing the location of the uniform attribute to modify. The location is obtained using getUniformLocation().
A GLboolean specifying whether to transpose the matrix. Must be false.
A Float32Array or sequence of GLfloat values. The values are assumed to be supplied in column major order.
The WebGL2RenderingContext.vertexAttribDivisor() method of the WebGL 2 API modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with gl.drawArraysInstanced() and gl.drawElementsInstanced().
A GLuint specifying the index of the generic vertex attributes.
A GLuint specifying the number of instances that will pass between updates of the generic attribute.
The WebGL2RenderingContext.vertexAttribIPointer() method of the WebGL 2 API specifies integer data formats and locations of vertex attributes in a vertex attributes array.
A GLuint specifying the index of the vertex attribute that is to be modified.
A GLint specifying the number of components per vertex attribute. Must be 1, 2, 3, or 4.
A GLenum specifying the data type of each component in the array. Must be one of: gl.BYTE, gl.UNSIGNED_BYTE, gl.SHORT, gl.UNSIGNED_SHORT, gl.INT, or gl.UNSIGNED_INT.
A GLsizei specifying the offset in bytes between the beginning of consecutive vertex attributes.
A GLintptr specifying an offset in bytes of the first component in the vertex attribute array. Must be a multiple of type.
The WebGLRenderingContext.vertexAttribPointer() method of the WebGL API binds the buffer currently bound to gl.ARRAY_BUFFER to a generic vertex attribute of the current vertex buffer object and specifies its layout.
A GLuint specifying the index of the vertex attribute that is to be modified.
A GLint specifying the number of components per vertex attribute. Must be 1, 2, 3, or 4.
A GLenum specifying the data type of each component in the array.
A GLboolean specifying whether integer data values should be normalized into a certain range when being cast to a float.
A GLsizei specifying the offset in bytes between the beginning of consecutive vertex attributes. Cannot be larger than 255. If stride is 0, the attribute is assumed to be tightly packed, that is, the attributes are not interleaved but each attribute is in a separate block, and the next vertex' attribute follows immediately after the current vertex.
A GLintptr specifying an offset in bytes of the first component in the vertex attribute array. Must be a multiple of the byte length of type.
The WebGLRenderingContext.viewport() method of the WebGL API sets the viewport, which specifies the affine transformation of x and y from normalized device coordinates to window coordinates.
A GLint specifying the horizontal coordinate for the lower left corner of the viewport origin. Default value: 0.
A GLint specifying the vertical coordinate for the lower left corner of the viewport origin. Default value: 0.
A non-negative GLsizei specifying the width of the viewport. Default value: width of the canvas.
A non-negative GLsizei specifying the height of the viewport. Default value: height of the canvas.
Generated using TypeDoc
WebGL上下文。
对应 lib.dom.d.ts 中 WebGL2RenderingContext 接口。