-
-
Notifications
You must be signed in to change notification settings - Fork 957
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renderer: use a render pass for render modif in client render
fixes #8918
- Loading branch information
Showing
4 changed files
with
64 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "RendererHintsPassElement.hpp" | ||
#include "../OpenGL.hpp" | ||
|
||
CRendererHintsPassElement::CRendererHintsPassElement(const CRendererHintsPassElement::SData& data_) : data(data_) { | ||
; | ||
} | ||
|
||
void CRendererHintsPassElement::draw(const CRegion& damage) { | ||
if (data.renderModif.has_value()) | ||
g_pHyprOpenGL->m_RenderData.renderModif = *data.renderModif; | ||
} | ||
|
||
bool CRendererHintsPassElement::needsLiveBlur() { | ||
return false; | ||
} | ||
|
||
bool CRendererHintsPassElement::needsPrecomputeBlur() { | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
#include "PassElement.hpp" | ||
#include <optional> | ||
#include "../OpenGL.hpp" | ||
|
||
class CRendererHintsPassElement : public IPassElement { | ||
public: | ||
struct SData { | ||
std::optional<SRenderModifData> renderModif; | ||
}; | ||
|
||
CRendererHintsPassElement(const SData& data); | ||
virtual ~CRendererHintsPassElement() = default; | ||
|
||
virtual void draw(const CRegion& damage); | ||
virtual bool needsLiveBlur(); | ||
virtual bool needsPrecomputeBlur(); | ||
|
||
virtual const char* passName() { | ||
return "CRendererHintsPassElement"; | ||
} | ||
|
||
private: | ||
SData data; | ||
}; |