mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
graphicsdriver: Rename BufferSubData -> SetVertices
This commit is contained in:
parent
846a719d6c
commit
907a28c434
@ -165,10 +165,7 @@ func (q *commandQueue) Flush() {
|
|||||||
nc++
|
nc++
|
||||||
}
|
}
|
||||||
if 0 < ne {
|
if 0 < ne {
|
||||||
// Note that the vertices passed to BufferSubData is not under GC management
|
driver().SetVertices(vs[:nv], es[:ne])
|
||||||
// in opengl package due to unsafe-way.
|
|
||||||
// See BufferSubData in context_mobile.go.
|
|
||||||
driver().BufferSubData(vs[:nv], es[:ne])
|
|
||||||
es = es[ne:]
|
es = es[ne:]
|
||||||
vs = vs[nv:]
|
vs = vs[nv:]
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type GraphicsDriver interface {
|
type GraphicsDriver interface {
|
||||||
BufferSubData(vertices []float32, indices []uint16)
|
SetVertices(vertices []float32, indices []uint16)
|
||||||
Flush()
|
Flush()
|
||||||
MaxImageSize() int
|
MaxImageSize() int
|
||||||
NewImage(width, height int) (Image, error)
|
NewImage(width, height int) (Image, error)
|
||||||
|
@ -86,7 +86,10 @@ func (d *Driver) Reset() error {
|
|||||||
return d.state.reset(&d.context)
|
return d.state.reset(&d.context)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Driver) BufferSubData(vertices []float32, indices []uint16) {
|
func (d *Driver) SetVertices(vertices []float32, indices []uint16) {
|
||||||
|
// Note that the vertices passed to BufferSubData is not under GC management
|
||||||
|
// in opengl package due to unsafe-way.
|
||||||
|
// See BufferSubData in context_mobile.go.
|
||||||
d.context.arrayBufferSubData(vertices)
|
d.context.arrayBufferSubData(vertices)
|
||||||
d.context.elementArrayBufferSubData(indices)
|
d.context.elementArrayBufferSubData(indices)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user