summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r--indra/newview/llspatialpartition.cpp34
1 files changed, 13 insertions, 21 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index f3cfbd9565..2dc2810861 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1658,13 +1658,11 @@ void renderOctree(LLSpatialGroup* group)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
gGL.diffuseColor4f(1,0,0,group->mBuilt);
- gGL.flush();
- glLineWidth(5.f);
+ gGL.setLineWidth(5.f);
const LLVector4a* bounds = group->getObjectBounds();
drawBoxOutline(bounds[0], bounds[1]);
- gGL.flush();
- glLineWidth(1.f);
+ gGL.setLineWidth(1.f);
gGL.flush();
const LLVOAvatar* lastAvatar = nullptr;
@@ -1973,13 +1971,11 @@ void renderBoundingBox(LLDrawable* drawable, bool set_color = true)
LLViewerObject* vobj = drawable->getVObj();
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));
+ //gGL.setLineWidth(4.f*(sinf(gFrameTimeSeconds*2.f)*0.25f+0.75f));
stop_glerror();
drawBoxOutline(pos,size);
- gGL.flush();
- glLineWidth(1.f);
+ gGL.setLineWidth(1.f);
}
else
{
@@ -2491,12 +2487,11 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume, bool wireframe
llassert(LLGLSLShader::sCurBoundShader != 0);
LLVertexBuffer::unbind();
- glVertexPointer(3, GL_FLOAT, 16, phys_volume->mHullPoints);
gGL.diffuseColor4fv(color.mV);
-
gGL.syncMatrices();
- glDrawElements(GL_TRIANGLES, phys_volume->mNumHullIndices, GL_UNSIGNED_SHORT, phys_volume->mHullIndices);
+
+ LLVertexBuffer::drawElements(LLRender::TRIANGLES, phys_volume->mHullPoints, nullptr, phys_volume->mNumHullIndices, phys_volume->mHullIndices);
}
else
{
@@ -2888,8 +2883,7 @@ public:
if (i == 1)
{
- gGL.flush();
- glLineWidth(3.f);
+ gGL.setLineWidth(3.f);
}
gGL.begin(LLRender::TRIANGLES);
@@ -2907,8 +2901,7 @@ public:
if (i == 1)
{
- gGL.flush();
- glLineWidth(1.f);
+ gGL.setLineWidth(1.f);
}
}
}
@@ -3625,12 +3618,11 @@ bool LLSpatialPartition::isVisible(const LLVector3& v)
return true;
}
-LL_ALIGN_PREFIX(16)
-class LLOctreeIntersect : public LLOctreeTraveler<LLViewerOctreeEntry, LLPointer<LLViewerOctreeEntry>>
+class alignas(16) LLOctreeIntersect : public LLOctreeTraveler<LLViewerOctreeEntry, LLPointer<LLViewerOctreeEntry>>
{
public:
- LL_ALIGN_16(LLVector4a mStart);
- LL_ALIGN_16(LLVector4a mEnd);
+ LLVector4a mStart;
+ LLVector4a mEnd;
S32 *mFaceHit;
LLVector4a *mIntersection;
@@ -3780,7 +3772,7 @@ public:
return false;
}
-} LL_ALIGN_POSTFIX(16);
+};
LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
bool pick_transparent,