summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-14 16:43:29 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-14 16:43:29 +0200
commit75af34da96b80a3d228a25e8c75ba1137df9e058 (patch)
treee280c5cff2ee24b15141413a18d3cbd693ef8869 /src/render/OpenGL.hpp
parent158af1eb090dbae7650e99878942363651c216e3 (diff)
added basic damage tracking
Diffstat (limited to 'src/render/OpenGL.hpp')
-rw-r--r--src/render/OpenGL.hpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp
index c2dded11..97a27997 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,9 @@ 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);
+
};
inline std::unique_ptr<CHyprOpenGLImpl> g_pHyprOpenGL; \ No newline at end of file