summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender2dutils.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-11 13:26:19 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-11 13:26:19 +0800
commit930907de7821d8e9f0ae59fafcbb0a0837ad5f9f (patch)
tree348eb797c1ec9c4edae4ce8857ca994a2a9fe918 /indra/llrender/llrender2dutils.cpp
parent27d50140177100d8b87322176ded972fda05318c (diff)
Preprocess non portable OpenGL 1.2 code
Diffstat (limited to 'indra/llrender/llrender2dutils.cpp')
-rw-r--r--indra/llrender/llrender2dutils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 52869406d2..4600b848ac 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -1514,10 +1514,12 @@ void LLRender2D::setLineWidth(F32 width)
// If outside the allowed range, glLineWidth fails with "invalid value".
// On Darwin, the range is [1, 1].
static GLfloat range[2]{0.0};
+#if GL_VERSION_1_2
if (range[1] == 0)
{
glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, range);
}
+#endif
width *= lerp(LLRender::sUIGLScaleFactor.mV[VX], LLRender::sUIGLScaleFactor.mV[VY], 0.5f);
glLineWidth(llclamp(width, range[0], range[1]));
}