diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-04-12 12:41:23 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-04-12 12:41:23 +0100 |
| commit | 3ae33b951f340cd86d33f5199ba558a9ccf53691 (patch) | |
| tree | dd3168948863fd269e0b3f2847538e7fb3892721 /src/render/OpenGL.hpp | |
| parent | 92fecb8ad412a180eeaba115f85e0419afd5e1fb (diff) | |
renderer: add support for rendering workspaces
Diffstat (limited to 'src/render/OpenGL.hpp')
| -rw-r--r-- | src/render/OpenGL.hpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index 3c563946..6f54ea35 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -23,11 +23,17 @@ inline const float fullVerts[] = { }; inline const float fanVertsFull[] = {-1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f}; -enum eDiscardMode { +enum eDiscardMode +{ DISCARD_OPAQUE = 1, DISCARD_ALPHAZERO = 1 << 1 }; +struct SRenderModifData { + Vector2D translate = {}; + float scale = 1.f; +}; + struct SMonitorRenderData { CFramebuffer primaryFB; CFramebuffer mirrorFB; // these are used for some effects, @@ -61,11 +67,14 @@ struct SMonitorRenderData { struct SCurrentRenderData { CMonitor* pMonitor = nullptr; float projection[9]; + float savedProjection[9]; SMonitorRenderData* pCurrentMonData = nullptr; pixman_region32_t* pDamage = nullptr; + SRenderModifData renderModif; + Vector2D primarySurfaceUVTopLeft = Vector2D(-1, -1); Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1); @@ -91,6 +100,10 @@ class CHyprOpenGLImpl { void renderRoundedShadow(wlr_box*, int round, int range, float a = 1.0); void renderBorder(wlr_box*, const CGradientValueData&, int round, float a = 1.0); + void saveMatrix(); + void setMatrixScaleTranslate(const Vector2D& translate, const float& scale); + void restoreMatrix(); + void makeWindowSnapshot(CWindow*); void makeRawWindowSnapshot(CWindow*, CFramebuffer*); void makeLayerSnapshot(SLayerSurface*); |
