gpu: rename BufferType to BufferBinding and make it a set

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-20 23:07:46 +01:00
parent 744a962beb
commit 411f566e3f
4 changed files with 37 additions and 37 deletions
+2 -2
View File
@@ -406,7 +406,7 @@ func (r *renderer) release() {
}
func newBlitter(ctx Backend) *blitter {
quadVerts := ctx.NewImmutableBuffer(BufferTypeVertices,
quadVerts := ctx.NewImmutableBuffer(BufferBindingVertices,
gunsafe.BytesView([]float32{
-1, +1, 0, 0,
+1, +1, 1, 0,
@@ -913,7 +913,7 @@ func newUniformBuffer(b Backend, uniformBlock interface{}) *uniformBuffer {
size := ref.Elem().Type().Size()
// Map the uniforms structure as a byte slice.
ptr := (*[1 << 30]byte)(unsafe.Pointer(ref.Pointer()))[:size:size]
ubuf := b.NewBuffer(BufferTypeUniforms, len(ptr))
ubuf := b.NewBuffer(BufferBindingUniforms, len(ptr))
return &uniformBuffer{buf: ubuf, ptr: ptr}
}