mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
graphicsdriver/opengl: Remove unnecessary function calls
This commit is contained in:
parent
3ecb00f717
commit
d927241223
@ -284,12 +284,8 @@ func (d *Driver) useProgram(mode graphics.CompositeMode, colorM *affine.ColorM,
|
|||||||
}]
|
}]
|
||||||
if d.state.lastProgram != program {
|
if d.state.lastProgram != program {
|
||||||
d.context.useProgram(program)
|
d.context.useProgram(program)
|
||||||
if d.state.lastProgram != zeroProgram {
|
|
||||||
theArrayBufferLayout.disable(&d.context, d.state.lastProgram)
|
|
||||||
}
|
|
||||||
theArrayBufferLayout.enable(&d.context, program)
|
|
||||||
|
|
||||||
if d.state.lastProgram == zeroProgram {
|
if d.state.lastProgram == zeroProgram {
|
||||||
|
theArrayBufferLayout.enable(&d.context, program)
|
||||||
d.context.bindBuffer(arrayBuffer, d.state.arrayBuffer)
|
d.context.bindBuffer(arrayBuffer, d.state.arrayBuffer)
|
||||||
d.context.bindBuffer(elementArrayBuffer, d.state.elementArrayBuffer)
|
d.context.bindBuffer(elementArrayBuffer, d.state.elementArrayBuffer)
|
||||||
d.context.uniformInt(program, "texture", 0)
|
d.context.uniformInt(program, "texture", 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user