mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
ui: Bug fix: The default framebuffer must be bound before swapping buffers
This commit is contained in:
parent
8788c8439f
commit
fc200ec6f2
@ -171,6 +171,8 @@ func (u *userInterface) isClosed() bool {
|
||||
}
|
||||
|
||||
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()
|
||||
@ -190,7 +192,6 @@ func (u *userInterface) setScreenSize(width, height, scale int) bool {
|
||||
|
||||
// To make sure the current existing framebuffers are rendered,
|
||||
// swap buffers here before SetSize is called.
|
||||
u.context.BindZeroFramebuffer()
|
||||
u.swapBuffers()
|
||||
|
||||
ch := make(chan struct{})
|
||||
|
Loading…
Reference in New Issue
Block a user