2024-12-22 17:12:09 +01:00
|
|
|
#include "TextureMatteElement.hpp"
|
|
|
|
|
#include "../OpenGL.hpp"
|
|
|
|
|
|
2025-05-05 23:44:49 +02:00
|
|
|
CTextureMatteElement::CTextureMatteElement(const CTextureMatteElement::STextureMatteData& data_) : m_data(data_) {
|
2024-12-22 17:12:09 +01:00
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CTextureMatteElement::draw(const CRegion& damage) {
|
2025-05-05 23:44:49 +02:00
|
|
|
if (m_data.disableTransformAndModify) {
|
2025-06-15 12:11:28 +02:00
|
|
|
g_pHyprOpenGL->pushMonitorTransformEnabled(true);
|
2024-12-22 17:12:09 +01:00
|
|
|
g_pHyprOpenGL->setRenderModifEnabled(false);
|
2025-05-05 23:44:49 +02:00
|
|
|
g_pHyprOpenGL->renderTextureMatte(m_data.tex, m_data.box, *m_data.fb);
|
2024-12-22 17:12:09 +01:00
|
|
|
g_pHyprOpenGL->setRenderModifEnabled(true);
|
2025-06-15 12:11:28 +02:00
|
|
|
g_pHyprOpenGL->popMonitorTransformEnabled();
|
2024-12-22 17:12:09 +01:00
|
|
|
} else
|
2025-05-05 23:44:49 +02:00
|
|
|
g_pHyprOpenGL->renderTextureMatte(m_data.tex, m_data.box, *m_data.fb);
|
2024-12-22 17:12:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CTextureMatteElement::needsLiveBlur() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CTextureMatteElement::needsPrecomputeBlur() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|