opengl: use a stack for storing monitor transform enabled

fixes #10487
This commit is contained in:
Vaxry 2025-06-15 12:11:28 +02:00
parent 57d20a1bf6
commit 3db3baa19e
No known key found for this signature in database
GPG key ID: 665806380871D640
7 changed files with 48 additions and 30 deletions

View file

@ -24,7 +24,7 @@ void CSurfacePassElement::draw(const CRegion& damage) {
g_pHyprOpenGL->m_renderData.discardMode = m_data.discardMode;
g_pHyprOpenGL->m_renderData.discardOpacity = m_data.discardOpacity;
g_pHyprOpenGL->m_renderData.useNearestNeighbor = m_data.useNearestNeighbor;
g_pHyprOpenGL->m_endFrame = m_data.flipEndFrame;
g_pHyprOpenGL->pushMonitorTransformEnabled(m_data.flipEndFrame);
CScopeGuard x = {[]() {
g_pHyprOpenGL->m_renderData.primarySurfaceUVTopLeft = Vector2D(-1, -1);
@ -35,7 +35,7 @@ void CSurfacePassElement::draw(const CRegion& damage) {
g_pHyprOpenGL->m_renderData.discardMode = 0;
g_pHyprOpenGL->m_renderData.discardOpacity = 0;
g_pHyprOpenGL->m_renderData.useNearestNeighbor = false;
g_pHyprOpenGL->m_endFrame = false;
g_pHyprOpenGL->popMonitorTransformEnabled();
g_pHyprOpenGL->m_renderData.currentWindow.reset();
g_pHyprOpenGL->m_renderData.surface.reset();
g_pHyprOpenGL->m_renderData.currentLS.reset();