Interface WTCGLRendererState

Represents the cached state of the renderer. All of these properties can be considered "in use".

interface WTCGLRendererState {
    activeTextureUnit: number;
    blendEquation: WTCGLBlendEquation;
    blendFunc: WTCGLBlendFunction;
    boundBuffer: unknown;
    cullFace: null | number;
    depthFunc: null | number;
    depthMask: boolean;
    flipY: boolean;
    framebuffer: unknown;
    frontFace: null | number;
    premultiplyAlpha: boolean;
    textureUnits: number[];
    uniformLocations: WTCGLRendererUniformMap;
    unpackAlignment: number;
    viewport: {
        height: null | number;
        width: null | number;
        x: null | number;
        y: null | number;
    };
}

Properties

activeTextureUnit: number

The active texture unit being written to - used when initialising textures

blendEquation: WTCGLBlendEquation

The blend equation

The blend function

boundBuffer: unknown

The current attribute buffer being written to.

cullFace: null | number

Which face to cull. gl.CULL_FACE or null

depthFunc: null | number

The function to use when depth testing.

depthMask: boolean

Whether to write depth information.

flipY: boolean

Whether to flip the Y component of loaded textures in memory

framebuffer: unknown

The currently bound framebuffer. Null if writing to screen.

frontFace: null | number

A GLEnum representing the order to face vertices to use to determine whether what the "front" face of a polygon is. Eother gl.CCW or gl.CW

premultiplyAlpha: boolean

Whether to use premultiplied alpha.

textureUnits: number[]

The store of all texture units currently in memory and use.

uniformLocations: WTCGLRendererUniformMap

The cached uniform location map.

unpackAlignment: number

The unpack alignment for pixel stores.

viewport: {
    height: null | number;
    width: null | number;
    x: null | number;
    y: null | number;
}

An object representing the current viewport