mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
graphicsdriver/opengl: Refactoring
This commit is contained in:
parent
aff77d98e4
commit
b2b51fb1bf
@ -87,7 +87,8 @@ func (d *Driver) Reset() error {
|
||||
}
|
||||
|
||||
func (d *Driver) BufferSubData(vertices []float32, indices []uint16) {
|
||||
bufferSubData(&d.context, vertices, indices)
|
||||
d.context.arrayBufferSubData(vertices)
|
||||
d.context.elementArrayBufferSubData(indices)
|
||||
}
|
||||
|
||||
func (d *Driver) UseProgram(mode graphics.CompositeMode, colorM *affine.ColorM, filter graphics.Filter) error {
|
||||
|
@ -253,11 +253,6 @@ func areSameFloat32Array(a, b []float32) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func bufferSubData(context *context, vertices []float32, indices []uint16) {
|
||||
context.arrayBufferSubData(vertices)
|
||||
context.elementArrayBufferSubData(indices)
|
||||
}
|
||||
|
||||
// useProgram uses the program (programTexture).
|
||||
func (d *Driver) useProgram(mode graphics.CompositeMode, colorM *affine.ColorM, filter graphics.Filter) error {
|
||||
destination := d.state.destination
|
||||
|
Loading…
Reference in New Issue
Block a user