From 4152ac76d0813d9d0f67d2f04653a13fa6e17433 Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Sat, 7 Mar 2026 00:44:10 +0300 Subject: renderer: refactor Texture, Framebuffer and Renderbuffer (#13437) Part 1 of the renderer refactors --- src/debug/HyprNotificationOverlay.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/debug/HyprNotificationOverlay.cpp') 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(); } 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; -- cgit v1.2.3