summaryrefslogtreecommitdiff
path: root/src/debug/HyprNotificationOverlay.cpp
diff options
context:
space:
mode:
authorUjinT34 <41110182+UjinT34@users.noreply.github.com>2026-03-07 00:44:10 +0300
committerGitHub <noreply@github.com>2026-03-06 21:44:10 +0000
commit4152ac76d0813d9d0f67d2f04653a13fa6e17433 (patch)
treec341f1883cf5a182d32e4ad00192ba8786a9bb75 /src/debug/HyprNotificationOverlay.cpp
parenta5858018d896e0e0f0db517f893cd9a0936dd881 (diff)
renderer: refactor Texture, Framebuffer and Renderbuffer (#13437)
Part 1 of the renderer refactors
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;