diff options
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/SwapChainGLImpl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/SwapChainGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/SwapChainGLImpl.cpp index 831fdb7e..fc33ccf9 100644 --- a/Graphics/GraphicsEngineOpenGL/src/SwapChainGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/SwapChainGLImpl.cpp @@ -112,6 +112,14 @@ void SwapChainGLImpl::Present(Uint32 SyncInterval) #else # error Unsupported platform #endif + + // Unbind back buffer from device context to be consistent with other backends + if (auto pDeviceContext = m_wpDeviceContext.Lock()) + { + auto* pDeviceCtxGl = pDeviceContext.RawPtr<DeviceContextGLImpl>(); + auto* pBackBuffer = ValidatedCast<TextureBaseGL>(m_pRenderTargetView->GetTexture()); + pDeviceCtxGl->UnbindTextureFromFramebuffer(pBackBuffer, false); + } } void SwapChainGLImpl::Resize(Uint32 NewWidth, Uint32 NewHeight) |
