GlDataType

View source

Provides the numeric labels for scalar data types understood by WebGL.

Each member is the corresponding WebGL enum constant. Pass a member to an API that describes a WebGL scalar type, such as MeshAttribute.

Examples

import { GlDataType, MeshAttribute } from '@wimaengine/render-core'

const weights = new MeshAttribute('weights', 9, GlDataType.Float, 1)

Variants


Byte

View source

WebGL BYTE constant (0x1400) for signed 8-bit integer data.

UnsignedByte

View source

WebGL UNSIGNED_BYTE constant (0x1401) for unsigned 8-bit integer data.

Short

View source

WebGL SHORT constant (0x1402) for signed 16-bit integer data.

UnsignedShort

View source

WebGL UNSIGNED_SHORT constant (0x1403) for unsigned 16-bit integer data.

Int

View source

WebGL INT constant (0x1404) for signed 32-bit integer data.

UnsignedInt

View source

WebGL UNSIGNED_INT constant (0x1405) for unsigned 32-bit integer data.

Float

View source

WebGL FLOAT constant (0x1406) for 32-bit floating-point data.