renderer: add support for rendering workspaces
This commit is contained in:
parent
92fecb8ad4
commit
3ae33b951f
4 changed files with 131 additions and 46 deletions
|
|
@ -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*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue