mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
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:
parent
07da7a2348
commit
3ec0020f02
@ -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()
|
||||
})
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
|
@ -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()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user