diff options
Diffstat (limited to 'src/render/OpenGL.hpp')
| -rw-r--r-- | src/render/OpenGL.hpp | 22 |
1 files changed, 15 insertions, 7 deletions
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 <GLES2/gl2ext.h> #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<CMonitor*, SMonitorRenderData> m_mMonitorRenderResources; std::unordered_map<CMonitor*, CTexture> m_mMonitorBGTextures; + struct { + PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES = nullptr; + PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR = nullptr; + } m_sProc; + private: std::list<GLuint> m_lBuffers; std::list<GLuint> 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; |
