graphics: Remove glFlush() for performance

This commit is contained in:
Hajime Hoshi 2017-12-21 03:17:07 +09:00
parent e13bb0769b
commit c636dec721

View File

@ -252,8 +252,10 @@ func (c *drawImageCommand) Exec(indexOffsetInBytes int) error {
// The buffer is already bound at begin() but it is counterintuitive. // The buffer is already bound at begin() but it is counterintuitive.
opengl.GetContext().DrawElements(opengl.Triangles, 6*n, indexOffsetInBytes) opengl.GetContext().DrawElements(opengl.Triangles, 6*n, indexOffsetInBytes)
// This is necessary at least on MacBook Pro (a smilar problem at #419) // glFlush() might be necessary at least on MacBook Pro (a smilar problem at #419),
opengl.GetContext().Flush() // but basically this pass the tests (esp. TestImageTooManyFill).
// As glFlush() causes performance problems, this should be avoided as much as possible.
// Let's wait and see, and file a new issue when this problem is newly found.
return nil return nil
} }