aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-01-07 13:12:02 +0100
committervaxerski <[email protected]>2023-01-07 13:12:08 +0100
commit2b248b25c8446621713766360d2e00bd927f5fdf (patch)
tree9a9edb623f26fe14299d29c8e1c5beca55b1b7bb
parent0d2e1e1270ba0bf03c022974342ab412e98b8c67 (diff)
downloadHyprland-2b248b25c8446621713766360d2e00bd927f5fdf.tar.gz
Hyprland-2b248b25c8446621713766360d2e00bd927f5fdf.zip
clamp a instead of asserting
-rw-r--r--src/render/OpenGL.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index fc40b75e..4d24842b 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -460,7 +460,8 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(const CTexture& tex, wlr_b
bool allowCustomUV, bool allowDim) {
RASSERT(m_RenderData.pMonitor, "Tried to render texture without begin()!");
RASSERT((tex.m_iTexID > 0), "Attempted to draw NULL texture!");
- RASSERT(alpha <= 1.0, "Tried to render texture with a > 1");
+
+ alpha = std::clamp(alpha, 0.f, 1.f);
if (!pixman_region32_not_empty(m_RenderData.pDamage))
return;