mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/opengl: better place to reset uniform variables
Updates #2517
This commit is contained in:
parent
599be725b9
commit
cf76e3c646
@ -61,6 +61,11 @@ func (g *Graphics) End(present bool) error {
|
|||||||
// Call glFlush to prevent black flicking (especially on Android (#226) and iOS).
|
// Call glFlush to prevent black flicking (especially on Android (#226) and iOS).
|
||||||
// TODO: examples/sprites worked without this. Is this really needed?
|
// TODO: examples/sprites worked without this. Is this really needed?
|
||||||
g.context.ctx.Flush()
|
g.context.ctx.Flush()
|
||||||
|
|
||||||
|
// The last uniforms must be reset after swapping the buffer (#2517).
|
||||||
|
if present {
|
||||||
|
g.state.resetLastUniforms()
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,11 +270,6 @@ func (g *Graphics) DrawTriangles(dstID graphicsdriver.ImageID, srcIDs [graphics.
|
|||||||
g.context.ctx.Disable(gl.STENCIL_TEST)
|
g.context.ctx.Disable(gl.STENCIL_TEST)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The last uniforms must be reset after swapping the buffer (#2517).
|
|
||||||
if destination.screen {
|
|
||||||
g.state.resetLastUniforms()
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user