mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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 {
|
||||
// glViewport must be called at every frame on iOS
|
||||
ui.GLContext().ResetViewportSize()
|
||||
if !c.initialized {
|
||||
if err := graphics.Initialize(ui.GLContext()); err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user