summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-02 16:54:40 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-02 16:54:40 +0200
commit43fc7662ccb8178f2984156d45c2406e302250fd (patch)
treeebc0e31dd44762a669b6f455e53867678e65f7ec /src/render/OpenGL.hpp
parentb5b78f383638eebc83fee7d964c08ce2599b0c06 (diff)
Major blur rework: optimization & fixes
Blur should be considerably faster now and work on full damage tracking
Diffstat (limited to 'src/render/OpenGL.hpp')
-rw-r--r--src/render/OpenGL.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp
index 75d8e9c7..984180fb 100644
--- a/src/render/OpenGL.hpp
+++ b/src/render/OpenGL.hpp
@@ -23,6 +23,12 @@ inline const float fullVerts[] = {
1, 1, // bottom right
0, 1, // bottom left
};
+inline const float fanVertsFull[] = {
+ -1.0f, -1.0f,
+ 1.0f, -1.0f,
+ 1.0f, 1.0f,
+ -1.0f, 1.0f
+};
struct SCurrentRenderData {
SMonitor* pMonitor = nullptr;
@@ -34,6 +40,7 @@ struct SCurrentRenderData {
struct SMonitorRenderData {
CFramebuffer primaryFB;
CFramebuffer mirrorFB;
+ CFramebuffer mirrorSwapFB;
CTexture stencilTex;
};
@@ -59,6 +66,7 @@ public:
void clearWithTex();
void scissor(const wlr_box*);
void scissor(const pixman_box32*);
+ void scissor(const int x, const int y, const int w, const int h);
void destroyMonitorResources(SMonitor*);
@@ -91,6 +99,9 @@ private:
GLuint compileShader(const GLuint&, std::string);
void createBGTextureForMonitor(SMonitor*);
+ // returns the out FB, can be either Mirror or MirrorSwap
+ CFramebuffer* blurMainFramebufferWithDamage(float a, wlr_box* pBox);
+
void renderTextureInternal(const CTexture&, wlr_box* pBox, float a, int round = 0, bool discardOpaque = false);
void renderTextureWithBlurInternal(const CTexture&, wlr_box*, float a, int round = 0);