summaryrefslogtreecommitdiff
path: root/src/render/Framebuffer.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-05-15 11:13:24 +0200
committerGitHub <noreply@github.com>2025-05-15 10:13:24 +0100
commit5ceb0ec15df6301cafe95a1b1f73b4f4bf255968 (patch)
tree80d14a0fd1edbdda851a9ecc6138e810d99179ad /src/render/Framebuffer.cpp
parentf707d86912fa75c19920818321aec99d1f287c46 (diff)
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 <mihai@fufexan.net>
Diffstat (limited to 'src/render/Framebuffer.cpp')
-rw-r--r--src/render/Framebuffer.cpp14
1 files changed, 0 insertions, 14 deletions
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<CTexture> 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<CTexture> 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() {