mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
gpu: rename BufferTypeData to less vague BufferTypeVertices
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -158,7 +158,7 @@ const (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
BufferTypeIndices BufferType = iota
|
BufferTypeIndices BufferType = iota
|
||||||
BufferTypeData
|
BufferTypeVertices
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
+1
-1
@@ -166,7 +166,7 @@ func (b *Backend) NewBuffer(typ gpu.BufferType, data []byte) gpu.Buffer {
|
|||||||
obj := b.funcs.CreateBuffer()
|
obj := b.funcs.CreateBuffer()
|
||||||
var gltyp Enum
|
var gltyp Enum
|
||||||
switch typ {
|
switch typ {
|
||||||
case gpu.BufferTypeData:
|
case gpu.BufferTypeVertices:
|
||||||
gltyp = ARRAY_BUFFER
|
gltyp = ARRAY_BUFFER
|
||||||
case gpu.BufferTypeIndices:
|
case gpu.BufferTypeIndices:
|
||||||
gltyp = ELEMENT_ARRAY_BUFFER
|
gltyp = ELEMENT_ARRAY_BUFFER
|
||||||
|
|||||||
+1
-1
@@ -376,7 +376,7 @@ func newBlitter(ctx Backend) *blitter {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
quadVerts := ctx.NewBuffer(BufferTypeData,
|
quadVerts := ctx.NewBuffer(BufferTypeVertices,
|
||||||
gunsafe.BytesView([]float32{
|
gunsafe.BytesView([]float32{
|
||||||
-1, +1, 0, 0,
|
-1, +1, 0, 0,
|
||||||
+1, +1, 1, 0,
|
+1, +1, 1, 0,
|
||||||
|
|||||||
+1
-1
@@ -239,7 +239,7 @@ func (c *coverer) release() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func buildPath(ctx Backend, p []byte) *pathData {
|
func buildPath(ctx Backend, p []byte) *pathData {
|
||||||
buf := ctx.NewBuffer(BufferTypeData, p)
|
buf := ctx.NewBuffer(BufferTypeVertices, p)
|
||||||
return &pathData{
|
return &pathData{
|
||||||
ncurves: len(p) / path.VertStride,
|
ncurves: len(p) / path.VertStride,
|
||||||
data: buf,
|
data: buf,
|
||||||
|
|||||||
Reference in New Issue
Block a user