summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender2dutils.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <118752495+marchcat@users.noreply.github.com>2025-12-04 00:30:33 +0200
committerGitHub <noreply@github.com>2025-12-04 00:30:33 +0200
commit8c134d5a4a9f08a87104530fe910bc39434cacf2 (patch)
treedad5ddf6daf7f5e1bc7b47cd670a99ca73d4c5a1 /indra/llrender/llrender2dutils.cpp
parent2c3ce8fb8ce3967d957e13d48627b45dd32f0e00 (diff)
parent590f58dbad3dc3db3482dba86bf2619a87a7dad5 (diff)
Merge pull request #5020 from secondlife/marchcat/slua-linux
develop-linux → SLua PV merge
Diffstat (limited to 'indra/llrender/llrender2dutils.cpp')
-rw-r--r--indra/llrender/llrender2dutils.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 5b08c29d64..e9d2212a67 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -833,8 +833,7 @@ void gl_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& c
{
gGL.color4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], color.mV[VALPHA]);
- gGL.flush();
- glLineWidth(2.5f);
+ gGL.setLineWidth(2.5f);
gGL.begin(LLRender::LINES);
{
@@ -843,7 +842,7 @@ void gl_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& c
}
gGL.end();
- LLRender2D::setLineWidth(1.f);
+ gGL.setLineWidth(1.f);
}
void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, bool filled, F32 start_angle, F32 end_angle)
@@ -1798,16 +1797,8 @@ void LLRender2D::loadIdentity()
// static
void LLRender2D::setLineWidth(F32 width)
{
- gGL.flush();
- // If outside the allowed range, glLineWidth fails with "invalid value".
- // On Darwin, the range is [1, 1].
- static GLfloat range[2]{0.0};
- if (range[1] == 0)
- {
- glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, range);
- }
width *= lerp(LLRender::sUIGLScaleFactor.mV[VX], LLRender::sUIGLScaleFactor.mV[VY], 0.5f);
- glLineWidth(llclamp(width, range[0], range[1]));
+ gGL.setLineWidth(width);
}
LLPointer<LLUIImage> LLRender2D::getUIImageByID(const LLUUID& image_id, S32 priority)