plasma-arc / wgpu-state.js
p3nGu1nZz's picture
added pipeline and state classes
d13e19f
raw
history blame
430 Bytes
// wgpu-state.js
export function createState(config) {
return {
device: null,
pipeline: null,
vertexBuffer: null,
indexBuffer: null,
uniformBuffer: null,
texture: null,
sampler: null,
bindGroup: null,
uniformValues: new Float32Array(config.uniformBufferSize / 4),
matrix: null,
numGlyphs: 0,
width: 0,
height: 0
};
}