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
@@ -150,7 +150,7 @@ func newStenciler(ctx Backend) *stenciler {
indices[i*6+4] = i*4 + 1
indices[i*6+5] = i*4 + 3
}
indexBuf := ctx.NewImmutableBuffer(BufferTypeIndices, gunsafe.BytesView(indices))
indexBuf := ctx.NewImmutableBuffer(BufferBindingIndices, gunsafe.BytesView(indices))
progLayout, err := ctx.NewInputLayout(shader_stencil_vert, []InputDesc{
{Type: DataTypeShort, Size: 2, Offset: int(unsafe.Offsetof((*(*path.Vertex)(nil)).CornerX))},
{Type: DataTypeFloat, Size: 1, Offset: int(unsafe.Offsetof((*(*path.Vertex)(nil)).MaxY))},
@@ -255,7 +255,7 @@ func (c *coverer) release() {
}
func buildPath(ctx Backend, p []byte) *pathData {
buf := ctx.NewImmutableBuffer(BufferTypeVertices, p)
buf := ctx.NewImmutableBuffer(BufferBindingVertices, p)
return &pathData{
ncurves: len(p) / path.VertStride,
data: buf,