From ac94268e5e59deac3863b421db6119402f58203a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 18 Oct 2020 01:11:13 +0200 Subject: [PATCH] Fix OpenGL core profile issue with glLineWidth by Rye Mutt --- indra/llrender/llrender.cpp | 22 ++++++++++++++++++++- indra/llrender/llrender.h | 3 +++ indra/llrender/llrender2dutils.cpp | 8 +++++--- indra/newview/lldrawpoolavatar.cpp | 2 +- indra/newview/llface.cpp | 2 +- indra/newview/llfasttimerview.cpp | 12 ++++++++---- indra/newview/llglsandbox.cpp | 22 +++++++++++++-------- indra/newview/llmodelpreview.cpp | 16 +++++++-------- indra/newview/llselectmgr.cpp | 2 +- indra/newview/llsnapshotlivepreview.cpp | 4 ++-- indra/newview/llspatialpartition.cpp | 26 ++++++++++++------------- indra/newview/llviewerwindow.cpp | 8 ++++---- indra/newview/llvoavatar.cpp | 2 +- indra/newview/pipeline.cpp | 16 +++++++-------- 14 files changed, 90 insertions(+), 55 deletions(-) diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 3827224dbb..0c3c86e74b 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1096,7 +1096,8 @@ LLRender::LLRender() //mQuadCycle(0), // Remove QUADS rendering mode mMode(LLRender::TRIANGLES), mCurrTextureUnitIndex(0), - mMaxAnisotropy(0.f) + mMaxAnisotropy(0.f), + mLineWidth(1.f) // Line width OGL core profile fix by Rye Mutt { mTexUnits.reserve(LL_NUM_TEXTURE_LAYERS); for (U32 i = 0; i < LL_NUM_TEXTURE_LAYERS; i++) @@ -1888,6 +1889,25 @@ void LLRender::setAmbientLightColor(const LLColor4& color) } } +// Line width OGL core profile fix by Rye Mutt +void LLRender::setLineWidth(F32 line_width) +{ + if (LLRender::sGLCoreProfile) + { + line_width = 1.f; + } + if (mLineWidth != line_width || mDirty) + { + if (mMode == LLRender::LINES || mMode == LLRender::LINE_STRIP) + { + flush(); + } + mLineWidth = line_width; + glLineWidth(line_width); + } +} +// + bool LLRender::verifyTexUnitActive(U32 unitToVerify) { if (mCurrTextureUnitIndex == unitToVerify) diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index f7dca80135..c2b180459b 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -456,6 +456,8 @@ public: LLLightState* getLight(U32 index); void setAmbientLightColor(const LLColor4& color); + void setLineWidth(F32 line_width); // Line width OGL core profile fix by Rye Mutt + LLTexUnit* getTexUnit(U32 index); U32 getCurrentTexUnitIndex(void) const { return mCurrTextureUnitIndex; } @@ -499,6 +501,7 @@ private: bool mCurrColorMask[4]; eCompareFunc mCurrAlphaFunc; F32 mCurrAlphaFuncVal; + F32 mLineWidth; // Line width OGL core profile fix by Rye Mutt LLPointer mBuffer; LLStrider mVerticesp; diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index bbdad1201e..c9e205723e 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -972,7 +972,7 @@ void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LL gGL.color4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], color.mV[VALPHA]); gGL.flush(); - glLineWidth(2.5f); + gGL.setLineWidth(2.5f); // Line width OGL core profile fix by Rye Mutt if (!LLGLSLShader::sNoFixedFunction) { @@ -2072,8 +2072,10 @@ void LLRender2D::setScaleFactor(const LLVector2 &scale_factor) void LLRender2D::setLineWidth(F32 width) { - gGL.flush(); - glLineWidth(width * lerp(mGLScaleFactor.mV[VX], mGLScaleFactor.mV[VY], 0.5f)); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth(width * lerp(mGLScaleFactor.mV[VX], mGLScaleFactor.mV[VY], 0.5f)); + gGL.setLineWidth(width * lerp(mGLScaleFactor.mV[VX], mGLScaleFactor.mV[VY], 0.5f)); } LLPointer LLRender2D::getUIImageByID(const LLUUID& image_id, S32 priority) diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 82cce6fe8b..77c2fedfa9 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1518,7 +1518,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) LLColor4 avatar_color = LLNetMap::getAvatarColor(avatarp->getID()); gGL.diffuseColor4f(avatar_color.mV[VRED], avatar_color.mV[VGREEN], avatar_color.mV[VBLUE], avatar_color.mV[VALPHA]); - glLineWidth(2.0f); + gGL.setLineWidth(2.0f); LLQuaternion rot = avatarp->getRotationRegion(); LLVector3 pos = avatarp->getPositionAgent(); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 8a16b8e766..6576ab783a 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -716,7 +716,7 @@ void LLFace::renderOneWireframe(const LLColor4 &color, F32 fogCfx, bool wirefram LLGLEnable offset(GL_POLYGON_OFFSET_LINE); glPolygonOffset(3.f, 3.f); - glLineWidth(5.f); + gGL.setLineWidth(5.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); renderFace(mDrawablep, this); } diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 1a36962343..31c26e29ac 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -1095,8 +1095,10 @@ void LLFastTimerView::drawLineGraph() //fatten highlighted timer if (mHoverID == idp) { - gGL.flush(); - glLineWidth(3); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth(3); + gGL.setLineWidth(3.f); } llassert(idp->getIndex() < sTimerColors.size()); @@ -1155,8 +1157,10 @@ void LLFastTimerView::drawLineGraph() if (mHoverID == idp) { - gGL.flush(); - glLineWidth(1); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth(1); + gGL.setLineWidth(1.f); } if (idp->getTreeNode().mCollapsed) diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 9d4568dcf1..5f0358b41a 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -950,8 +950,10 @@ void LLViewerObjectList::renderObjectBeacons() S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - gGL.flush(); - glLineWidth( (F32)line_width ); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth( (F32)line_width ); + gGL.setLineWidth((F32)line_width); last_line_width = line_width; } @@ -980,8 +982,10 @@ void LLViewerObjectList::renderObjectBeacons() S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - gGL.flush(); - glLineWidth( (F32)line_width ); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth( (F32)line_width ); + gGL.setLineWidth((F32)line_width); last_line_width = line_width; } @@ -994,8 +998,10 @@ void LLViewerObjectList::renderObjectBeacons() gGL.end(); } - gGL.flush(); - glLineWidth(1.f); + // Line width OGL core profile fix by Rye Mutt + //gGL.flush(); + //glLineWidth(1.f); + gGL.setLineWidth(1.f); for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { @@ -1033,7 +1039,7 @@ void LLSky::renderSunMoonBeacons(const LLVector3& pos_agent, const LLVector3& di { pos_end.mV[i] = pos_agent.mV[i] + (50 * direction.mV[i]); } - glLineWidth(LLPipeline::DebugBeaconLineWidth); + gGL.setLineWidth(LLPipeline::DebugBeaconLineWidth); // Line width OGL core profile fix by Rye Mutt gGL.begin(LLRender::LINES); color.mV[3] *= 0.5f; gGL.color4fv(color.mV); @@ -1044,7 +1050,7 @@ void LLSky::renderSunMoonBeacons(const LLVector3& pos_agent, const LLVector3& di gGL.end(); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 04f5f3c6c9..351381640f 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -3306,11 +3306,11 @@ BOOL LLModelPreview::render() gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV); if (edges) { - glLineWidth(PREVIEW_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_EDGE_WIDTH); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } } gGL.popMatrix(); @@ -3423,12 +3423,12 @@ BOOL LLModelPreview::render() buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); gGL.diffuseColor4fv(PREVIEW_PSYH_EDGE_COL.mV); - glLineWidth(PREVIEW_PSYH_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_PSYH_EDGE_WIDTH); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } } } @@ -3438,7 +3438,7 @@ BOOL LLModelPreview::render() // only do this if mDegenerate was set in the preceding mesh checks [Check this if the ordering ever breaks] if (mHasDegenerate) { - glLineWidth(PREVIEW_DEG_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_DEG_EDGE_WIDTH); // Line width OGL core profile fix by Rye Mutt glPointSize(PREVIEW_DEG_POINT_SIZE); gPipeline.enableLightsFullbright(); //show degenerate triangles @@ -3510,7 +3510,7 @@ BOOL LLModelPreview::render() gGL.popMatrix(); } - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPointSize(1.f); gPipeline.enableLightsPreview(); gGL.setSceneBlendType(LLRender::BT_ALPHA); @@ -3671,11 +3671,11 @@ BOOL LLModelPreview::render() if (edges) { gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV); - glLineWidth(PREVIEW_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_EDGE_WIDTH); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } } } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index eab23eeae9..f95ce290ee 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6235,7 +6235,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) gGL.popMatrix(); gGL.popMatrix(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); if (shader) diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index eb46895b10..8ccc93d8c6 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -243,11 +243,11 @@ void LLSnapshotLivePreview::drawPreviewRect(S32 offset_x, S32 offset_y) { F32 line_width ; glGetFloatv(GL_LINE_WIDTH, &line_width) ; - glLineWidth(2.0f * line_width) ; + gGL.setLineWidth(2.0f * line_width) ; // Line width OGL core profile fix by Rye Mutt LLColor4 color(0.0f, 0.0f, 0.0f, 1.0f) ; gl_rect_2d( mPreviewRect.mLeft + offset_x, mPreviewRect.mTop + offset_y, mPreviewRect.mRight + offset_x, mPreviewRect.mBottom + offset_y, color, FALSE ) ; - glLineWidth(line_width) ; + gGL.setLineWidth(line_width) ; // Line width OGL core profile fix by Rye Mutt //draw four alpha rectangles to cover areas outside of the snapshot image if(!mKeepAspectRatio) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 4112de4377..6c1d2561b6 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1738,12 +1738,12 @@ void renderOctree(LLSpatialGroup* group) gGL.diffuseColor4f(1,0,0,group->mBuilt); gGL.flush(); - glLineWidth(5.f); + gGL.setLineWidth(5.f); // Line width OGL core profile fix by Rye Mutt const LLVector4a* bounds = group->getObjectBounds(); drawBoxOutline(bounds[0], bounds[1]); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt gGL.flush(); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { @@ -1880,10 +1880,10 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera) pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX, false); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - glLineWidth(4.f); + gGL.setLineWidth(4.f); // Line width OGL core profile fix by Rye Mutt gGL.diffuseColor4f(0.f, 0.5f, 0.f, 1.f); pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX, false); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); bool selected = false; @@ -2257,12 +2257,12 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) if (vobj && vobj->onActiveList()) { gGL.flush(); - glLineWidth(llmax(4.f*sinf(gFrameTimeSeconds*2.f)+1.f, 1.f)); - //glLineWidth(4.f*(sinf(gFrameTimeSeconds*2.f)*0.25f+0.75f)); + gGL.setLineWidth(llmax(4.f*sinf(gFrameTimeSeconds*2.f)+1.f, 1.f)); // Line width OGL core profile fix by Rye Mutt + //gGL.setLineWidth(4.f*(sinf(gFrameTimeSeconds*2.f)*0.25f+0.75f)); // Line width OGL core profile fix by Rye Mutt stop_glerror(); drawBoxOutline(pos,size); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } else { @@ -2462,10 +2462,10 @@ void render_hull(LLModel::PhysicsMesh& mesh, const LLColor4& color, const LLColo LLGLEnable offset(GL_POLYGON_OFFSET_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonOffset(3.f, 3.f); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt gGL.diffuseColor4fv(line_color.mV); LLVertexBuffer::drawArrays(LLRender::TRIANGLES, mesh.mPositions, mesh.mNormals); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } @@ -3237,7 +3237,7 @@ public: if (i == 1) { gGL.flush(); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt } gGL.begin(LLRender::TRIANGLES); @@ -3256,7 +3256,7 @@ public: if (i == 1) { gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } } } @@ -3860,11 +3860,11 @@ void LLSpatialPartition::renderPhysicsShapes() gGL.flush(); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt LLOctreeRenderPhysicsShapes render_physics(camera); render_physics.traverse(mOctree); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } void LLSpatialPartition::renderDebug() diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 18a2237f20..17b900be48 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4369,7 +4369,7 @@ void renderMeshPhysicsTriangles(const LLColor4& color, const LLColor4& line_colo LLGLEnable offset(GL_POLYGON_OFFSET_FILL); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glPolygonOffset(offset_factor, offset_units); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals); } { @@ -4377,7 +4377,7 @@ void renderMeshPhysicsTriangles(const LLColor4& color, const LLColor4& line_colo LLGLEnable offset(GL_POLYGON_OFFSET_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonOffset(offset_factor, offset_units); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals); } } @@ -4405,12 +4405,12 @@ void renderMeshPhysicsTriangles(const LLColor4& color, const LLColor4& line_colo LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); gGL.diffuseColor4fv(line_color.mV); - glLineWidth(3.f); + gGL.setLineWidth(3.f); // Line width OGL core profile fix by Rye Mutt LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals); } } - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); gGL.popMatrix(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d3547eb17c..8e9704d350 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5749,7 +5749,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) gGL.begin(LLRender::LINES); gGL.color4f(1.f,1.f,1.f,1.f); F32 thickness = llmax(F32(5.0f-5.0f*(gFrameTimeSeconds-mLastImpostorUpdateFrameTime)),1.0f); - glLineWidth(thickness); + gGL.setLineWidth(thickness); // Line width OGL core profile fix by Rye Mutt gGL.vertex3fv((pos+left-up).mV); gGL.vertex3fv((pos-left-up).mV); gGL.vertex3fv((pos-left-up).mV); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6d2a26ec01..97201b39b1 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -5122,7 +5122,7 @@ void LLPipeline::renderDebug() if ( pathfindingConsole->isRenderNavMesh() ) { gGL.flush(); - glLineWidth(2.0f); + gGL.setLineWidth(2.0f); // Line width OGL core profile fix by Rye Mutt LLGLEnable cull(GL_CULL_FACE); LLGLDisable blend(GL_BLEND); @@ -5153,7 +5153,7 @@ void LLPipeline::renderDebug() gGL.flush(); glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); - glLineWidth(1.0f); + gGL.setLineWidth(1.0f); // Line width OGL core profile fix by Rye Mutt gGL.flush(); } //User designated path @@ -5290,11 +5290,11 @@ void LLPipeline::renderDebug() gPathfindingProgram.uniform1f(sTint, 1.f); gPathfindingProgram.uniform1f(sAlphaScale, 1.f); - glLineWidth(gSavedSettings.getF32("PathfindingLineWidth")); + gGL.setLineWidth(gSavedSettings.getF32("PathfindingLineWidth")); // Line width OGL core profile fix by Rye Mutt LLGLDisable blendOut(GL_BLEND); llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] ); gGL.flush(); - glLineWidth(1.f); + gGL.setLineWidth(1.f); // Line width OGL core profile fix by Rye Mutt } glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); @@ -5317,7 +5317,7 @@ void LLPipeline::renderDebug() LLGLEnable blend(GL_BLEND); LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER); gGL.flush(); - glLineWidth(2.0f); + gGL.setLineWidth(2.0f); // Line width OGL core profile fix by Rye Mutt LLGLEnable cull(GL_CULL_FACE); gPathfindingProgram.uniform1f(sTint, gSavedSettings.getF32("PathfindingXRayTint")); @@ -5351,7 +5351,7 @@ void LLPipeline::renderDebug() } gGL.flush(); - glLineWidth(1.0f); + gGL.setLineWidth(1.0f); // Line width OGL core profile fix by Rye Mutt } glPolygonOffset(0.f, 0.f); @@ -5616,7 +5616,7 @@ void LLPipeline::renderDebug() } /*gGL.flush(); - glLineWidth(16-i*2); + gGL.setLineWidth(16-i*2); // Line width OGL core profile fix by Rye Mutt for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -5634,7 +5634,7 @@ void LLPipeline::renderDebug() } } gGL.flush(); - glLineWidth(1.f);*/ + gGL.setLineWidth(1.f);*/ // Line width OGL core profile fix by Rye Mutt } }