From 2ebfd0c7456eff7e9c03d379d1dfbc611dc26672 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Fri, 24 Nov 2023 10:54:21 +0000 Subject: renderer: Move to a full Hyprland GL rendering pipeline (#3920) Also updates wlroots --- src/render/OpenGL.hpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/render/OpenGL.hpp') diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index 8c412302..4311e16c 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -14,6 +14,9 @@ #include "Texture.hpp" #include "Framebuffer.hpp" #include "Transformer.hpp" +#include "Renderbuffer.hpp" + +#include #include "../debug/TracyDefines.hpp" @@ -39,7 +42,7 @@ struct SRenderModifData { }; struct SMonitorRenderData { - CFramebuffer primaryFB; + CFramebuffer offloadFB; CFramebuffer mirrorFB; // these are used for some effects, CFramebuffer mirrorSwapFB; // etc CFramebuffer offMainFB; @@ -80,6 +83,7 @@ struct SCurrentRenderData { SMonitorRenderData* pCurrentMonData = nullptr; CFramebuffer* currentFB = nullptr; + CFramebuffer* mainFB = nullptr; CRegion damage; @@ -105,7 +109,6 @@ class CHyprOpenGLImpl { void begin(CMonitor*, CRegion*, bool fake = false); void end(); - void bindWlrOutputFb(); void renderRect(CBox*, const CColor&, int round = 0); void renderRectWithBlur(CBox*, const CColor&, int round = 0, float blurA = 1.f); @@ -157,7 +160,6 @@ class CHyprOpenGLImpl { SCurrentRenderData m_RenderData; GLint m_iCurrentOutputFb = 0; - GLint m_iWLROutputFb = 0; bool m_bReloadScreenShader = true; // at launch it can be set @@ -169,6 +171,11 @@ class CHyprOpenGLImpl { std::unordered_map m_mMonitorRenderResources; std::unordered_map m_mMonitorBGTextures; + struct { + PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES = nullptr; + PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR = nullptr; + } m_sProc; + private: std::list m_lBuffers; std::list m_lTextures; @@ -176,10 +183,11 @@ class CHyprOpenGLImpl { int m_iDRMFD; std::string m_szExtensions; - bool m_bFakeFrame = false; - bool m_bEndFrame = false; - bool m_bApplyFinalShader = false; - bool m_bBlend = false; + bool m_bFakeFrame = false; + bool m_bEndFrame = false; + bool m_bApplyFinalShader = false; + bool m_bBlend = false; + bool m_bOffloadedFramebuffer = false; CShader m_sFinalScreenShader; CTimer m_tGlobalTimer; -- cgit v1.2.3