mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-10-08 17:30:53 +08:00
graphicsdriver/opengl: Refactoring
This commit is contained in:
@@ -87,7 +87,8 @@ func (d *Driver) Reset() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Driver) BufferSubData(vertices []float32, indices []uint16) {
|
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 {
|
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
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func bufferSubData(context *context, vertices []float32, indices []uint16) {
|
|
||||||
context.arrayBufferSubData(vertices)
|
|
||||||
context.elementArrayBufferSubData(indices)
|
|
||||||
}
|
|
||||||
|
|
||||||
// useProgram uses the program (programTexture).
|
// useProgram uses the program (programTexture).
|
||||||
func (d *Driver) useProgram(mode graphics.CompositeMode, colorM *affine.ColorM, filter graphics.Filter) error {
|
func (d *Driver) useProgram(mode graphics.CompositeMode, colorM *affine.ColorM, filter graphics.Filter) error {
|
||||||
destination := d.state.destination
|
destination := d.state.destination
|
||||||
|
Reference in New Issue
Block a user