diff --git a/gpu/backend.go b/gpu/backend.go index e33b1c5f..f008d834 100644 --- a/gpu/backend.go +++ b/gpu/backend.go @@ -158,7 +158,7 @@ const ( const ( BufferTypeIndices BufferType = iota - BufferTypeData + BufferTypeVertices ) const ( diff --git a/gpu/gl/backend.go b/gpu/gl/backend.go index c663cd56..c0ff9072 100644 --- a/gpu/gl/backend.go +++ b/gpu/gl/backend.go @@ -166,7 +166,7 @@ func (b *Backend) NewBuffer(typ gpu.BufferType, data []byte) gpu.Buffer { obj := b.funcs.CreateBuffer() var gltyp Enum switch typ { - case gpu.BufferTypeData: + case gpu.BufferTypeVertices: gltyp = ARRAY_BUFFER case gpu.BufferTypeIndices: gltyp = ELEMENT_ARRAY_BUFFER diff --git a/gpu/gpu.go b/gpu/gpu.go index 5eb6678e..f88b4877 100644 --- a/gpu/gpu.go +++ b/gpu/gpu.go @@ -376,7 +376,7 @@ func newBlitter(ctx Backend) *blitter { if err != nil { panic(err) } - quadVerts := ctx.NewBuffer(BufferTypeData, + quadVerts := ctx.NewBuffer(BufferTypeVertices, gunsafe.BytesView([]float32{ -1, +1, 0, 0, +1, +1, 1, 0, diff --git a/gpu/path.go b/gpu/path.go index 0e6c6bba..7b45e557 100644 --- a/gpu/path.go +++ b/gpu/path.go @@ -239,7 +239,7 @@ func (c *coverer) release() { } func buildPath(ctx Backend, p []byte) *pathData { - buf := ctx.NewBuffer(BufferTypeData, p) + buf := ctx.NewBuffer(BufferTypeVertices, p) return &pathData{ ncurves: len(p) / path.VertStride, data: buf,