Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions indra/llrender/llgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1329,11 +1329,7 @@ bool LLGLManager::initGL()
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];
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, mAliasedLineRange.mV);

// sanity clamp max uniform block size to 64k just in case
// there's some implementation that reports a crazy value
Expand Down
3 changes: 1 addition & 2 deletions indra/llrender/llgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ class LLGLManager
F32 mMaxAnisotropy = 0.f;
S32 mMaxUniformBlockSize = 0;
S32 mMaxVaryingVectors = 0;
F32 mMinSmoothLineWidth = 1.f;
F32 mMaxSmoothLineWidth = 1.f;
LLVector2 mAliasedLineRange = LLVector2(1.f, 1.f);

// GL 4.x capabilities
bool mHasCubeMapArray = false;
Expand Down
9 changes: 1 addition & 8 deletions indra/llrender/llrender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1930,14 +1930,7 @@ void LLRender::setLineWidth(F32 width)
{
gGL.flush();

if(sGLCoreProfile)
{
width = 1.f;
}
else
{
width = llclamp(width, gGLManager.mMinSmoothLineWidth, gGLManager.mMaxSmoothLineWidth);
}
width = llclamp(width, gGLManager.mAliasedLineRange[0], gGLManager.mAliasedLineRange[1]);
if(mLineWidth != width)
{
mLineWidth = width;
Expand Down