summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-10-28 22:20:37 -0400
committerRye <rye@alchemyviewer.org>2025-10-31 07:46:07 -0400
commit14bf0509efad36650e6157975cd5e0d77e64183b (patch)
tree2a7692d99ab33cb2b217e211c73cb9750bef802b /indra/llrender/llrender.cpp
parent3d8cb2343b113a27b856be329b4edd37c74945f1 (diff)
Fix invalid calls to glLineWidth on some linux GL drivers
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r--indra/llrender/llrender.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 3f1dc3d3c1..970a9f6975 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1923,6 +1923,24 @@ void LLRender::diffuseColor4ub(U8 r, U8 g, U8 b, U8 a)
}
}
+void LLRender::setLineWidth(F32 width)
+{
+ gGL.flush();
+
+ if(sGLCoreProfile)
+ {
+ width = 1.f;
+ }
+ else
+ {
+ width = llclamp(width, gGLManager.mMinSmoothLineWidth, gGLManager.mMaxSmoothLineWidth);
+ }
+ if(mLineWidth != width)
+ {
+ mLineWidth = width;
+ glLineWidth(width);
+ }
+}
void LLRender::debugTexUnits(void)
{