graphics: Bug fix (#201): Remove gl.Flush for performance (this ws added by #161 but no longer needed because of BindZeroFrameBuffer)

This commit is contained in:
Hajime Hoshi 2016-04-08 21:45:53 +09:00
parent 07da7a2348
commit 3ec0020f02
3 changed files with 0 additions and 13 deletions

View File

@ -426,9 +426,3 @@ func (c *Context) DrawElements(mode Mode, len int) {
gl.DrawElements(uint32(mode), int32(len), gl.UNSIGNED_SHORT, gl.PtrOffset(0))
})
}
func (c *Context) Finish() {
c.RunOnContextThread(func() {
gl.Finish()
})
}

View File

@ -343,7 +343,3 @@ func (c *Context) BufferSubData(bufferType BufferType, data []int16) {
func (c *Context) DrawElements(mode Mode, len int) {
gl.DrawElements(mgl.Enum(mode), len, mgl.UNSIGNED_SHORT, 0)
}
func (c *Context) Finish() {
gl.Finish()
}

View File

@ -192,9 +192,6 @@ func (u *UserInterface) SwapBuffers() {
func (u *UserInterface) swapBuffers() {
// The bound framebuffer must be the default one (0) before swapping buffers.
u.context.BindZeroFramebuffer()
// Call glFinish before glfwSwapBuffer to make sure
// all OpenGL tasks are executed.
u.context.Finish()
u.context.RunOnContextThread(func() {
u.window.SwapBuffers()
})