graphicscommand: Add comments

Add explanation why ResetViewportSize is needed.
This commit is contained in:
Hajime Hoshi 2018-11-02 02:41:47 +09:00
parent 3a8ddd6279
commit 09fe1886d7

View File

@ -147,6 +147,11 @@ func (q *commandQueue) Flush() {
} }
// glViewport must be called at least at every frame on iOS. // 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() opengl.GetContext().ResetViewportSize()
es := q.indices es := q.indices
vs := q.vertices vs := q.vertices