From 5ceb0ec15df6301cafe95a1b1f73b4f4bf255968 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Thu, 15 May 2025 11:13:24 +0200 Subject: core: drop the legacy renderer (#10408) * core: drop the legacy renderer the legacy renderer is broken and barely used, drop it. * Nix: drop support for legacyRenderer --------- Co-authored-by: Mihai Fufezan --- src/render/Framebuffer.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/render/Framebuffer.cpp') diff --git a/src/render/Framebuffer.cpp b/src/render/Framebuffer.cpp index ab5a14a3..b3681c95 100644 --- a/src/render/Framebuffer.cpp +++ b/src/render/Framebuffer.cpp @@ -40,14 +40,11 @@ bool CFramebuffer::alloc(int w, int h, uint32_t drmFormat) { glBindFramebuffer(GL_FRAMEBUFFER, m_fb); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_tex->m_texID, 0); -// TODO: Allow this with gles2 -#ifndef GLES2 if (m_stencilTex) { glBindTexture(GL_TEXTURE_2D, m_stencilTex->m_texID); glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, w, h, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, nullptr); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, m_stencilTex->m_texID, 0); } -#endif auto status = glCheckFramebufferStatus(GL_FRAMEBUFFER); RASSERT((status == GL_FRAMEBUFFER_COMPLETE), "Framebuffer incomplete, couldn't create! (FB status: {}, GL Error: 0x{:x})", status, (int)glGetError()); @@ -64,8 +61,6 @@ bool CFramebuffer::alloc(int w, int h, uint32_t drmFormat) { } void CFramebuffer::addStencil(SP tex) { - // TODO: Allow this with gles2 -#ifndef GLES2 m_stencilTex = tex; glBindTexture(GL_TEXTURE_2D, m_stencilTex->m_texID); glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, m_size.x, m_size.y, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, nullptr); @@ -79,15 +74,10 @@ void CFramebuffer::addStencil(SP tex) { glBindTexture(GL_TEXTURE_2D, 0); glBindFramebuffer(GL_FRAMEBUFFER, 0); -#endif } void CFramebuffer::bind() { -#ifndef GLES2 glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_fb); -#else - glBindFramebuffer(GL_FRAMEBUFFER, m_iFb); -#endif if (g_pHyprOpenGL) glViewport(0, 0, g_pHyprOpenGL->m_renderData.pMonitor->m_pixelSize.x, g_pHyprOpenGL->m_renderData.pMonitor->m_pixelSize.y); @@ -96,11 +86,7 @@ void CFramebuffer::bind() { } void CFramebuffer::unbind() { -#ifndef GLES2 glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); -#else - glBindFramebuffer(GL_FRAMEBUFFER, 0); -#endif } void CFramebuffer::release() { -- cgit v1.2.3