mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-03 22:44:28 +01:00
graphics: Reset Viewport cache at each frame
This commit is contained in:
parent
3f59c9394c
commit
e9de66aca2
@ -67,6 +67,8 @@ func (c *graphicsContext) needsRestoring(context *opengl.Context) (bool, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *graphicsContext) initializeIfNeeded() error {
|
func (c *graphicsContext) initializeIfNeeded() error {
|
||||||
|
// glViewport must be called at every frame on iOS
|
||||||
|
ui.GLContext().ResetViewportSize()
|
||||||
if !c.initialized {
|
if !c.initialized {
|
||||||
if err := graphics.Initialize(ui.GLContext()); err != nil {
|
if err := graphics.Initialize(ui.GLContext()); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user