diff options
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*); |
