From fab3370254691cdcd67f474405217ff1529e25a4 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Sat, 3 Jan 2026 15:13:01 +0100 Subject: renderer: minor framebuffer and renderbuffer changes (#12831) * framebuffer: dont release if format or size changes we dont have to release and recreate both the texture and framebuffer if size or format changes, we can just bind the texture and call glTexImage2D with the new format and size. * framebuffer: set the alloced viewport size if monitor size mismatch with the allocated m_size its going to set a mismatched viewport and cause rendering issues. and if they are mismatching there is a missing alloc call. * renderbuffer: cleanup unneded binds the renderbuffer is attached to the fbo and trying to rebind it in bind() is causing unnecessery state changes, just bind the fbo. add safeguard in the destructor, the constructor can return early on failure and leave m_rbo empty or m_image as EGL_NO_IMAGE_KHR. --- src/render/Renderbuffer.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/render/Renderbuffer.hpp') diff --git a/src/render/Renderbuffer.hpp b/src/render/Renderbuffer.hpp index c0924141..90c539b1 100644 --- a/src/render/Renderbuffer.hpp +++ b/src/render/Renderbuffer.hpp @@ -14,7 +14,6 @@ class CRenderbuffer { bool good(); void bind(); - void bindFB(); void unbind(); CFramebuffer* getFB(); uint32_t getFormat(); @@ -31,4 +30,4 @@ class CRenderbuffer { struct { CHyprSignalListener destroyBuffer; } m_listeners; -}; \ No newline at end of file +}; -- cgit v1.2.3