Static
View sourceData is specified once and used many times (0x88E4, WebGL STATIC_DRAW).
Enum
Provides usage hints for WebGL buffer storage.
Pass a member to createBuffer or createBufferData as the
buffer-usage argument. The hint describes how often the buffer data is
expected to change and how often the buffer is expected to be used; it does
not prevent later updates.
import { BufferType, DrawUsage, createBufferData } from '@wimaengine/render-webgl'
const positions = new Float32Array([0, 0, 0, 1, 0, 0, 0, 1, 0])
const vertexBuffer = createBufferData(
gl,
BufferType.Array,
positions,
DrawUsage.Static
)Data is specified once and used many times (0x88E4, WebGL STATIC_DRAW).
Data may be updated repeatedly and used many times (0x88E8, WebGL DYNAMIC_DRAW).
Data is specified once and used a few times (0x88E0, WebGL STREAM_DRAW).