mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 21:05:58 +01:00
opengl: add renderdata.forceIntrospection
This commit is contained in:
parent
44ee9915e3
commit
f5b2fd2bc3
2 changed files with 7 additions and 4 deletions
|
@ -232,7 +232,8 @@ void CHyprOpenGLImpl::begin(CMonitor* pMonitor, CRegion* pDamage, CFramebuffer*
|
||||||
const auto PRBO = g_pHyprRenderer->getCurrentRBO();
|
const auto PRBO = g_pHyprRenderer->getCurrentRBO();
|
||||||
const bool FBPROPERSIZE = fb && fb->m_vSize == pMonitor->vecPixelSize;
|
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
|
// we have to offload
|
||||||
// bind the offload Hypr Framebuffer
|
// bind the offload Hypr Framebuffer
|
||||||
m_RenderData.pCurrentMonData->offloadFB.bind();
|
m_RenderData.pCurrentMonData->offloadFB.bind();
|
||||||
|
@ -307,9 +308,10 @@ void CHyprOpenGLImpl::end() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset our data
|
// reset our data
|
||||||
m_RenderData.pMonitor = nullptr;
|
m_RenderData.pMonitor = nullptr;
|
||||||
m_RenderData.mouseZoomFactor = 1.f;
|
m_RenderData.mouseZoomFactor = 1.f;
|
||||||
m_RenderData.mouseZoomUseMouse = true;
|
m_RenderData.mouseZoomUseMouse = true;
|
||||||
|
m_RenderData.forceIntrospection = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprOpenGLImpl::initShaders() {
|
void CHyprOpenGLImpl::initShaders() {
|
||||||
|
|
|
@ -108,6 +108,7 @@ struct SCurrentRenderData {
|
||||||
float mouseZoomFactor = 1.f;
|
float mouseZoomFactor = 1.f;
|
||||||
bool mouseZoomUseMouse = true; // true by default
|
bool mouseZoomUseMouse = true; // true by default
|
||||||
bool useNearestNeighbor = false;
|
bool useNearestNeighbor = false;
|
||||||
|
bool forceIntrospection = false; // cleaned in ::end()
|
||||||
|
|
||||||
Vector2D primarySurfaceUVTopLeft = Vector2D(-1, -1);
|
Vector2D primarySurfaceUVTopLeft = Vector2D(-1, -1);
|
||||||
Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1);
|
Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1);
|
||||||
|
|
Loading…
Reference in a new issue