Renamed gpu-uniforms to gpu-buffer, and messed around with its API.

I believe all the align, size, stride and byteOffset values are now in the proper units, ie. bytes.
This commit is contained in:
Rezmason
2021-11-08 22:56:00 -08:00
parent cf02073ff3
commit a143e3fc03
9 changed files with 59 additions and 66 deletions

View File

@@ -50,7 +50,7 @@ const makeUniformBuffer = (device, uniforms, data = null) => {
mappedAtCreation: data != null,
});
if (data != null) {
uniforms.write(data, buffer.getMappedRange());
uniforms.toBuffer(data, buffer.getMappedRange());
buffer.unmap();
}
return buffer;