diff options
| author | xDarksome <dev@darkso.me> | 2022-07-02 19:43:52 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-02 19:43:52 +0300 |
| commit | 185c4d6ea13ad5f4483aa2e389e43bd09106002f (patch) | |
| tree | a7bc4a9510c39e367317b5ce64d2ee0e0a72d4f0 /src/render/OpenGL.hpp | |
| parent | fc4b10d13c14c4eb08febb0637f27177cb6a1940 (diff) | |
| parent | b7b3344188e3ebd2baed14bc288ee42a1ae8d6f2 (diff) | |
Merge branch 'hyprwm:main' into main
Diffstat (limited to 'src/render/OpenGL.hpp')
| -rw-r--r-- | src/render/OpenGL.hpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index 9d6e098d..292eba36 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -29,10 +29,20 @@ inline const float fanVertsFull[] = { -1.0f, 1.0f }; +struct SMonitorRenderData { + CFramebuffer primaryFB; + CFramebuffer mirrorFB; + CFramebuffer mirrorSwapFB; + + CTexture stencilTex; +}; + struct SCurrentRenderData { SMonitor* pMonitor = nullptr; float projection[9]; + SMonitorRenderData* pCurrentMonData = nullptr; + pixman_region32_t* pDamage = nullptr; bool renderingPrimarySurface = false; @@ -40,14 +50,6 @@ struct SCurrentRenderData { Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1); }; -struct SMonitorRenderData { - CFramebuffer primaryFB; - CFramebuffer mirrorFB; - CFramebuffer mirrorSwapFB; - - CTexture stencilTex; -}; - class CHyprOpenGLImpl { public: @@ -59,9 +61,10 @@ public: void renderRect(wlr_box*, const CColor&, int round = 0); void renderRectWithDamage(wlr_box*, const CColor&, pixman_region32_t* damage, int round = 0); void renderTexture(wlr_texture*, wlr_box*, float a, int round = 0); - void renderTexture(const CTexture&, wlr_box*, float a, int round = 0, bool discardOpaque = false, bool border = false, bool allowPrimary = false); - void renderTextureWithBlur(const CTexture&, wlr_box*, float a, wlr_surface* pSurface, int round = 0, bool border = false); + void renderTexture(const CTexture&, wlr_box*, float a, int round = 0, bool discardOpaque = false, bool allowPrimary = false); + void renderTextureWithBlur(const CTexture&, wlr_box*, float a, wlr_surface* pSurface, int round = 0); void renderRoundedShadow(wlr_box*, int round, int range, float a = 1.0); + void renderBorder(wlr_box*, const CColor&, int round); void makeWindowSnapshot(CWindow*); void makeLayerSnapshot(SLayerSurface*); @@ -101,13 +104,14 @@ private: bool m_bEndFrame = false; // Shaders - SQuad m_shQUAD; + CShader m_shQUAD; CShader m_shRGBA; CShader m_shRGBX; CShader m_shEXT; CShader m_shBLUR1; CShader m_shBLUR2; CShader m_shSHADOW; + CShader m_shBORDER1; // GLuint createProgram(const std::string&, const std::string&); @@ -117,8 +121,7 @@ private: // returns the out FB, can be either Mirror or MirrorSwap CFramebuffer* blurMainFramebufferWithDamage(float a, wlr_box* pBox, pixman_region32_t* damage); - void renderTextureInternalWithDamage(const CTexture&, wlr_box* pBox, float a, pixman_region32_t* damage, int round = 0, bool discardOpaque = false, bool border = false, bool noAA = false, bool allowPrimary = false); - void renderBorder(wlr_box*, const CColor&, int thick = 1, int round = 0); + void renderTextureInternalWithDamage(const CTexture&, wlr_box* pBox, float a, pixman_region32_t* damage, int round = 0, bool discardOpaque = false, bool noAA = false, bool allowPrimary = false); }; inline std::unique_ptr<CHyprOpenGLImpl> g_pHyprOpenGL;
\ No newline at end of file |
