From 09fe1886d703ff4d24c5fb5c9c73f20ca24149f5 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 2 Nov 2018 02:41:47 +0900 Subject: [PATCH] graphicscommand: Add comments Add explanation why ResetViewportSize is needed. --- internal/graphicscommand/command.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/graphicscommand/command.go b/internal/graphicscommand/command.go index 2b7d4e8ab..3bf2bedb3 100644 --- a/internal/graphicscommand/command.go +++ b/internal/graphicscommand/command.go @@ -147,6 +147,11 @@ func (q *commandQueue) Flush() { } // glViewport must be called at least at every frame on iOS. + // This is introduced at https://github.com/hajimehoshi/ebiten/commit/e9de66aca2007a679de4ba11ea14ef061dca2f6e. + // At that time viewport sizes were always same so it was needed to force to call + // glViewport, but now viewport sizes can change and apps can work without this. This is + // needed only when the screen framebuffer size and the first framebuffer size are same, + // probably. opengl.GetContext().ResetViewportSize() es := q.indices vs := q.vertices