diff options
| author | UjinT34 <41110182+UjinT34@users.noreply.github.com> | 2025-03-14 02:15:18 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-14 00:15:18 +0100 |
| commit | 8c97cb7858e5d6c35d1a055930904346fb4248db (patch) | |
| tree | 87d7e30393f9177d035183f273be54f03b9451d5 /src/render/OpenGL.hpp | |
| parent | e86d3a14e46d19d8a47f8ceb6410546715d45f10 (diff) | |
renderer: add simple color management (#9506)
Adds proper color management and transformations for CM surfaces.
Diffstat (limited to 'src/render/OpenGL.hpp')
| -rw-r--r-- | src/render/OpenGL.hpp | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index cf1d2549..11079591 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -27,6 +27,7 @@ #include <hyprutils/os/FileDescriptor.hpp> #include "../debug/TracyDefines.hpp" +#include "../protocols/core/Compositor.hpp" struct gbm_device; class CHyprRenderer; @@ -105,41 +106,42 @@ struct SMonitorRenderData { CShader m_shSHADOW; CShader m_shBORDER1; CShader m_shGLITCH; - // + CShader m_shCM; }; struct SCurrentRenderData { - PHLMONITORREF pMonitor; - Mat3x3 projection; - Mat3x3 savedProjection; - Mat3x3 monitorProjection; - - SMonitorRenderData* pCurrentMonData = nullptr; - CFramebuffer* currentFB = nullptr; // current rendering to - CFramebuffer* mainFB = nullptr; // main to render to - CFramebuffer* outFB = nullptr; // out to render to (if offloaded, etc) - - CRegion damage; - CRegion finalDamage; // damage used for funal off -> main - - SRenderModifData renderModif; - float mouseZoomFactor = 1.f; - bool mouseZoomUseMouse = true; // true by default - bool useNearestNeighbor = false; - bool blockScreenShader = false; - bool simplePass = false; - - Vector2D primarySurfaceUVTopLeft = Vector2D(-1, -1); - Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1); - - CBox clipBox = {}; // scaled coordinates - CRegion clipRegion; - - uint32_t discardMode = DISCARD_OPAQUE; - float discardOpacity = 0.f; - - PHLLSREF currentLS; - PHLWINDOWREF currentWindow; + PHLMONITORREF pMonitor; + Mat3x3 projection; + Mat3x3 savedProjection; + Mat3x3 monitorProjection; + + SMonitorRenderData* pCurrentMonData = nullptr; + CFramebuffer* currentFB = nullptr; // current rendering to + CFramebuffer* mainFB = nullptr; // main to render to + CFramebuffer* outFB = nullptr; // out to render to (if offloaded, etc) + + CRegion damage; + CRegion finalDamage; // damage used for funal off -> main + + SRenderModifData renderModif; + float mouseZoomFactor = 1.f; + bool mouseZoomUseMouse = true; // true by default + bool useNearestNeighbor = false; + bool blockScreenShader = false; + bool simplePass = false; + + Vector2D primarySurfaceUVTopLeft = Vector2D(-1, -1); + Vector2D primarySurfaceUVBottomRight = Vector2D(-1, -1); + + CBox clipBox = {}; // scaled coordinates + CRegion clipRegion; + + uint32_t discardMode = DISCARD_OPAQUE; + float discardOpacity = 0.f; + + PHLLSREF currentLS; + PHLWINDOWREF currentWindow; + WP<CWLSurfaceResource> surface; }; class CEGLSync { |
