import { WebGLRenderingContext } from "https://deno.land/x/caviar@2.6.6/deps.ts";
Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of a dwm window.
Constructors
Properties
Represents the actual height of the current drawing buffer. It should match the height attribute of the window associated with this context, but might differ if the implementation is not able to provide the requested height.
Methods
Attaches either a fragment or vertex WebGLShader to a WebGLProgram.
Sets the source and destination blending factors.
Sets both the RGB blend equation and alpha blend equation to a single equation.
Sets the RGB blend equation and alpha blend equation separately.
Defines which function is used for blending pixel arithmetic.
Defines which function is used for blending pixel arithmetic for RGB and alpha components separately.
Initializes and creates the buffer object's data store.
Specifies the color values used when clearing color buffers.
Sets which color components to enable or to disable when drawing or rendering to a WebGLFramebuffer.
Compiles a GLSL shader into binary data so that it can be used by a WebGLProgram.
Creates a WebGLShader that can then be configured further using WebGLRenderingContext.shaderSource() and WebGLRenderingContext.compileShader().
Deletes a given WebGLBuffer. This method has no effect if the buffer has already been deleted.
Deletes a given WebGLFramebuffer object. This method has no effect if the frame buffer has already been deleted.
Specifies a function that compares incoming pixel depth to the current depth buffer value.
Specifies the depth range mapping from normalized device coordinates to window or viewport coordinates.
Turns on the generic vertex attribute array at the specified index into the list of attribute arrays.
Attaches a WebGLRenderbuffer object to a WebGLFramebuffer object.
Specifies whether polygons are front- or back-facing by setting a winding orientation.
Returns the location of an attribute variable in a given WebGLProgram.
Returns a WebGLContextAttributes object that contains the actual context parameters. Might return null, if the context is lost.
Specifies hints for certain behaviors. The interpretation of these hints depend on the implementation.
Links a given WebGLProgram, completing the process of preparing the GPU code for the program's fragment and vertex shaders.
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.
Specifies multi-sample coverage parameters for anti-aliasing effects.
Sets a scissor box, which limits the drawing to a specified rectangle.
Sets the front and back function and reference value for stencil testing.
Sets the front and/or back function and reference value for stencil testing.
Controls enabling and disabling of both the front and back writing of individual bits in the stencil planes.
controls enabling and disabling of front and/or back writing of individual bits in the stencil planes. The WebGLRenderingContext.stencilMask() method can set both, the front and back stencil writemasks to one value at the same time.
Sets both the front and back-facing stencil test actions.
Sets the front and/or back-facing stencil test actions.
Sets the specified WebGLProgram as part of the current rendering state.
Specify constant values for generic vertex attributes.
Sets the viewport, which specifies the affine transformation of x and y from normalized device coordinates to window coordinates.