summaryrefslogtreecommitdiff
path: root/src/debug/HyprNotificationOverlay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug/HyprNotificationOverlay.cpp')
-rw-r--r--src/debug/HyprNotificationOverlay.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp
index 6b3c3ea8..e67b0434 100644
--- a/src/debug/HyprNotificationOverlay.cpp
+++ b/src/debug/HyprNotificationOverlay.cpp
@@ -28,8 +28,6 @@ CHyprNotificationOverlay::CHyprNotificationOverlay() {
g_pHyprRenderer->damageBox(m_lastDamage);
});
-
- m_texture = makeShared<CTexture>();
}
CHyprNotificationOverlay::~CHyprNotificationOverlay() {
@@ -232,16 +230,7 @@ void CHyprNotificationOverlay::draw(PHLMONITOR pMonitor) {
m_lastDamage = damage;
- // copy the data to an OpenGL texture we have
- const auto DATA = cairo_image_surface_get_data(m_cairoSurface);
- m_texture->allocate();
- m_texture->bind();
- m_texture->setTexParameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- m_texture->setTexParameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- m_texture->setTexParameter(GL_TEXTURE_SWIZZLE_R, GL_BLUE);
- m_texture->setTexParameter(GL_TEXTURE_SWIZZLE_B, GL_RED);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, MONSIZE.x, MONSIZE.y, 0, GL_RGBA, GL_UNSIGNED_BYTE, DATA);
+ m_texture = g_pHyprRenderer->createTexture(m_cairoSurface);
CTexPassElement::SRenderData data;
data.tex = m_texture;