diff options
author | vaxerski <[email protected]> | 2024-01-07 18:37:02 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2024-01-07 18:37:02 +0100 |
commit | f5b2fd2bc36b35850502640d18281350e953b70d (patch) | |
tree | 631d9a5c93e3a5d385fa65a713b9f676a2a455f0 | |
parent | 44ee9915e34910aac67ab60f1296eed8be8e7cea (diff) | |
download | Hyprland-f5b2fd2bc36b35850502640d18281350e953b70d.tar.gz Hyprland-f5b2fd2bc36b35850502640d18281350e953b70d.zip |
opengl: add renderdata.forceIntrospection
-rw-r--r-- | src/render/OpenGL.cpp | 10 | ||||
-rw-r--r-- | src/render/OpenGL.hpp | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index c6d16dd8..ffc899fe 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -232,7 +232,8 @@ void CHyprOpenGLImpl::begin(CMonitor* pMonitor, CRegion* pDamage, CFramebuffer* const auto PRBO = g_pHyprRenderer->getCurrentRBO(); const bool FBPROPERSIZE = fb && fb->m_vSize == pMonitor->vecPixelSize; - if (!FBPROPERSIZE || m_sFinalScreenShader.program > 0 || (PRBO && pMonitor->vecPixelSize != PRBO->getFB()->m_vSize) || passRequiresIntrospection(pMonitor)) { + if (m_RenderData.forceIntrospection || !FBPROPERSIZE || m_sFinalScreenShader.program > 0 || (PRBO && pMonitor->vecPixelSize != PRBO->getFB()->m_vSize) || + passRequiresIntrospection(pMonitor)) { // we have to offload // bind the offload Hypr Framebuffer m_RenderData.pCurrentMonData->offloadFB.bind(); @@ -307,9 +308,10 @@ void CHyprOpenGLImpl::end() { } // reset our data - m_RenderData.pMonitor = nullptr; - m_RenderData.mouseZoomFactor = 1.f; - m_RenderData.mouseZoomUseMouse = true; + m_RenderData.pMonitor = nullptr; + m_RenderData.mouseZoomFactor = 1.f; + m_RenderData.mouseZoomUseMouse = true; + m_RenderData.forceIntrospection = false; } void CHyprOpenGLImpl::initShaders() { diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index ba27b608..9fd6d197 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -108,6 +108,7 @@ struct SCurrentRenderData { float mouseZoomFactor = 1.f; bool mouseZoomUseMouse = true; // true by default bool useNearestNeighbor = false; + bool forceIntrospection = false; // cleaned in ::end() Vector2D primarySurfaceUVTopLeft = Vector2D(-1, -1); Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1); |