mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 16:13:21 +02:00
parent
111669a699
commit
38c1d00f3c
8 changed files with 127 additions and 20 deletions
47
src/render/CursorPassElement.cpp
Normal file
47
src/render/CursorPassElement.cpp
Normal file
|
@ -0,0 +1,47 @@
|
|||
#include "CursorPassElement.hpp"
|
||||
#include "renderer.hpp"
|
||||
|
||||
#include <hyprland/src/render/pass/TexPassElement.hpp>
|
||||
#include <hyprland/src/render/OpenGL.hpp>
|
||||
|
||||
#include <hyprutils/utils/ScopeGuard.hpp>
|
||||
using namespace Hyprutils::Utils;
|
||||
|
||||
CCursorPassElement::CCursorPassElement(const CCursorPassElement::SRenderData& data_) : data(data_) {
|
||||
;
|
||||
}
|
||||
|
||||
void CCursorPassElement::draw(const CRegion& damage) {
|
||||
renderCursorTextureInternalWithDamage(
|
||||
data.tex,
|
||||
&data.box,
|
||||
data.damage.empty() ? damage : data.damage,
|
||||
1.F,
|
||||
data.syncTimeline,
|
||||
data.syncPoint,
|
||||
data.hotspot,
|
||||
data.nearest,
|
||||
data.stretchAngle,
|
||||
data.stretchMagnitude
|
||||
);
|
||||
}
|
||||
|
||||
bool CCursorPassElement::needsLiveBlur() {
|
||||
return false; // TODO?
|
||||
}
|
||||
|
||||
bool CCursorPassElement::needsPrecomputeBlur() {
|
||||
return false; // TODO?
|
||||
}
|
||||
|
||||
std::optional<CBox> CCursorPassElement::boundingBox() {
|
||||
return data.box.copy().scale(1.F / g_pHyprOpenGL->m_RenderData.pMonitor->scale).round();
|
||||
}
|
||||
|
||||
CRegion CCursorPassElement::opaqueRegion() {
|
||||
return {}; // TODO:
|
||||
}
|
||||
|
||||
void CCursorPassElement::discard() {
|
||||
;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue