Class AttributeState

Information about how to access data in a buffer.

Hierarchy

  • AttributeState

Constructors

Properties

Accessors

Methods

Constructors

  • Creates an attribute.

    Parameters

    • name: string

      The name of the attribute in the WebGL program.

    • buffer: Buffer

      The buffer which supplies data to the attribute.

    • size: 2 | 1 | 3 | 4 = 3

      The number of components per vertex attribute.

    • normalized: boolean = false

      Whether to normalize the data after getting it from the buffer.

    • stride: number = 0

      The offset in bytes between the beginning of consecutive vertex attributes. Must not exceed 255.

    • offset: number = 0

      The offset in bytes of the first component in the buffer.

    Returns AttributeState

Properties

buffer: Buffer

The buffer which supplies data to the attribute.

gl: WebGL2RenderingContext

The rendering context of this buffer.

name: string

The name of this attribute in a shader program.

normalized: boolean

Whether to normalize data after getting it from this buffer.

offset: number

The offset in bytes of the first component in the buffer.

size: 2 | 1 | 3 | 4

The number of components per vertex attribute.

stride: number

The offset in bytes between the beginning of consecutive vertex attributes. Must not exceed 255.

Accessors

Methods

Generated using TypeDoc