mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-30 03:45:59 +01:00
opengl: fix invalid tex references to tex-less shader
This commit is contained in:
parent
e43f7fc98d
commit
0f1911a8d4
1 changed files with 4 additions and 6 deletions
|
@ -158,7 +158,8 @@ void CHyprOpenGLImpl::end() {
|
||||||
wlr_box monbox = {0, 0, m_RenderData.pMonitor->vecTransformedSize.x, m_RenderData.pMonitor->vecTransformedSize.y};
|
wlr_box monbox = {0, 0, m_RenderData.pMonitor->vecTransformedSize.x, m_RenderData.pMonitor->vecTransformedSize.y};
|
||||||
|
|
||||||
if (m_RenderData.mouseZoomFactor != 1.f) {
|
if (m_RenderData.mouseZoomFactor != 1.f) {
|
||||||
const auto ZOOMCENTER = m_RenderData.mouseZoomUseMouse ? (g_pInputManager->getMouseCoordsInternal() - m_RenderData.pMonitor->vecPosition) * m_RenderData.pMonitor->scale :
|
const auto ZOOMCENTER = m_RenderData.mouseZoomUseMouse ?
|
||||||
|
(g_pInputManager->getMouseCoordsInternal() - m_RenderData.pMonitor->vecPosition) * m_RenderData.pMonitor->scale :
|
||||||
m_RenderData.pMonitor->vecTransformedSize / 2.f;
|
m_RenderData.pMonitor->vecTransformedSize / 2.f;
|
||||||
monbox.x -= ZOOMCENTER.x;
|
monbox.x -= ZOOMCENTER.x;
|
||||||
monbox.y -= ZOOMCENTER.y;
|
monbox.y -= ZOOMCENTER.y;
|
||||||
|
@ -477,10 +478,8 @@ void CHyprOpenGLImpl::renderRectWithDamage(wlr_box* box, const CColor& col, pixm
|
||||||
glUniform1i(m_RenderData.pCurrentMonData->m_shQUAD.primitiveMultisample, (int)(*PMULTISAMPLEEDGES == 1 && round != 0));
|
glUniform1i(m_RenderData.pCurrentMonData->m_shQUAD.primitiveMultisample, (int)(*PMULTISAMPLEEDGES == 1 && round != 0));
|
||||||
|
|
||||||
glVertexAttribPointer(m_RenderData.pCurrentMonData->m_shQUAD.posAttrib, 2, GL_FLOAT, GL_FALSE, 0, fullVerts);
|
glVertexAttribPointer(m_RenderData.pCurrentMonData->m_shQUAD.posAttrib, 2, GL_FLOAT, GL_FALSE, 0, fullVerts);
|
||||||
glVertexAttribPointer(m_RenderData.pCurrentMonData->m_shQUAD.texAttrib, 2, GL_FLOAT, GL_FALSE, 0, fullVerts);
|
|
||||||
|
|
||||||
glEnableVertexAttribArray(m_RenderData.pCurrentMonData->m_shQUAD.posAttrib);
|
glEnableVertexAttribArray(m_RenderData.pCurrentMonData->m_shQUAD.posAttrib);
|
||||||
glEnableVertexAttribArray(m_RenderData.pCurrentMonData->m_shQUAD.texAttrib);
|
|
||||||
|
|
||||||
if (m_RenderData.clipBox.width != 0 && m_RenderData.clipBox.height != 0) {
|
if (m_RenderData.clipBox.width != 0 && m_RenderData.clipBox.height != 0) {
|
||||||
pixman_region32_t damageClip;
|
pixman_region32_t damageClip;
|
||||||
|
@ -505,7 +504,6 @@ void CHyprOpenGLImpl::renderRectWithDamage(wlr_box* box, const CColor& col, pixm
|
||||||
}
|
}
|
||||||
|
|
||||||
glDisableVertexAttribArray(m_RenderData.pCurrentMonData->m_shQUAD.posAttrib);
|
glDisableVertexAttribArray(m_RenderData.pCurrentMonData->m_shQUAD.posAttrib);
|
||||||
glDisableVertexAttribArray(m_RenderData.pCurrentMonData->m_shQUAD.texAttrib);
|
|
||||||
|
|
||||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue