From 8a37dd8e8741a317485dd3461fd8b1bcd2d8fb0e Mon Sep 17 00:00:00 2001 From: Don Williamson Date: Tue, 28 Feb 2017 00:12:48 +0000 Subject: [PATCH] GL Renderer, OSX, no swap chain: Bind back buffer fbo ready for NSOpenGLContext flushBuffer (#1056) --- src/renderer_gl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index fffa9beab..96093d63a 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2290,6 +2290,9 @@ namespace bgfx { namespace gl m_ovr.flip(); m_ovr.swap(_hmd); + // Ensure the back buffer is bound as the source of the flip + GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_backBufferFbo)); + // need to swap GL render context even if OVR is enabled to get // the mirror texture in the output m_glctx.swap();