mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
graphicsdriver: Rename BufferSubData -> SetVertices
This commit is contained in:
parent
846a719d6c
commit
907a28c434
@ -165,10 +165,7 @@ func (q *commandQueue) Flush() {
|
||||
nc++
|
||||
}
|
||||
if 0 < ne {
|
||||
// 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.
|
||||
driver().BufferSubData(vs[:nv], es[:ne])
|
||||
driver().SetVertices(vs[:nv], es[:ne])
|
||||
es = es[ne:]
|
||||
vs = vs[nv:]
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
)
|
||||
|
||||
type GraphicsDriver interface {
|
||||
BufferSubData(vertices []float32, indices []uint16)
|
||||
SetVertices(vertices []float32, indices []uint16)
|
||||
Flush()
|
||||
MaxImageSize() int
|
||||
NewImage(width, height int) (Image, error)
|
||||
|
@ -86,7 +86,10 @@ func (d *Driver) Reset() error {
|
||||
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.elementArrayBufferSubData(indices)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user