diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-17 12:00:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-17 12:00:31 +0200 |
| commit | 74dbf196c1676c964821e4023bd5a4759485c977 (patch) | |
| tree | 3ac4837b91661afe55eaef5abcdd438f436911ee /src/render/OpenGL.hpp | |
| parent | 24df15105ee2fc7f2975ef2958c2e7b1258569d1 (diff) | |
| parent | baa9e0caea3ce76f72def6e89659dd851f25831d (diff) | |
Merge pull request #39 from vaxerski/damage-tracking
Added damage tracking
Diffstat (limited to 'src/render/OpenGL.hpp')
| -rw-r--r-- | src/render/OpenGL.hpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index c2dded11..ae22a477 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -27,6 +27,8 @@ inline const float fullVerts[] = { struct SCurrentRenderData { SMonitor* pMonitor = nullptr; float projection[9]; + + pixman_region32_t* pDamage = nullptr; }; struct SMonitorRenderData { @@ -41,13 +43,13 @@ public: CHyprOpenGLImpl(); - void begin(SMonitor*); + void begin(SMonitor*, pixman_region32_t*); void end(); void renderRect(wlr_box*, const CColor&); - void renderTexture(wlr_texture*, float matrix[9], float a, int round = 0); - void renderTexture(const CTexture&, float matrix[9], float a, int round = 0); - void renderTextureWithBlur(const CTexture&, float matrix[9], float a, 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); + void renderTextureWithBlur(const CTexture&, wlr_box*, float a, int round = 0); void renderBorder(wlr_box*, const CColor&, int thick = 1, int round = 0); void makeWindowSnapshot(CWindow*); @@ -56,6 +58,7 @@ public: void clear(const CColor&); void clearWithTex(); void scissor(const wlr_box*); + void scissor(const pixman_box32*); SCurrentRenderData m_RenderData; @@ -85,6 +88,10 @@ private: GLuint createProgram(const std::string&, const std::string&); GLuint compileShader(const GLuint&, std::string); void createBGTextureForMonitor(SMonitor*); + + void renderTextureInternal(const CTexture&, wlr_box* pBox, float a, int round = 0); + void renderTextureWithBlurInternal(const CTexture&, wlr_box*, float a, int round = 0); + }; inline std::unique_ptr<CHyprOpenGLImpl> g_pHyprOpenGL;
\ No newline at end of file |
