diff options
| author | Rye <rye@alchemyviewer.org> | 2025-10-28 22:20:37 -0400 |
|---|---|---|
| committer | Rye <rye@alchemyviewer.org> | 2025-10-31 07:46:07 -0400 |
| commit | 14bf0509efad36650e6157975cd5e0d77e64183b (patch) | |
| tree | 2a7692d99ab33cb2b217e211c73cb9750bef802b /indra/llrender/llgl.cpp | |
| parent | 3d8cb2343b113a27b856be329b4edd37c74945f1 (diff) | |
Fix invalid calls to glLineWidth on some linux GL drivers
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/llrender/llgl.cpp')
| -rw-r--r-- | indra/llrender/llgl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index f5f70c2935..7b8eb7809e 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1261,6 +1261,13 @@ bool LLGLManager::initGL() glGetIntegerv(GL_MAX_VARYING_VECTORS, &mMaxVaryingVectors); glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &mMaxUniformBlockSize); + // If outside the allowed range, glLineWidth fails with "invalid value". + // On Darwin, the range is [1, 1]. + GLfloat line_width_range[2]{0.f}; + glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, line_width_range); + mMinSmoothLineWidth = line_width_range[0]; + mMaxSmoothLineWidth = line_width_range[1]; + // sanity clamp max uniform block size to 64k just in case // there's some implementation that reports a crazy value mMaxUniformBlockSize = llmin(mMaxUniformBlockSize, 65536); |
