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.cpp35
1 files changed, 26 insertions, 9 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index f3cfbd9565..a147cb4657 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1655,16 +1655,18 @@ void renderOctree(LLSpatialGroup* group)
{
LLGLDepthTest gl_depth(false, false);
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+#endif
gGL.diffuseColor4f(1,0,0,group->mBuilt);
gGL.flush();
- glLineWidth(5.f);
+ //glLineWidth(5.f);
const LLVector4a* bounds = group->getObjectBounds();
drawBoxOutline(bounds[0], bounds[1]);
- gGL.flush();
- glLineWidth(1.f);
+ //gGL.flush();
+ //glLineWidth(1.f);
gGL.flush();
const LLVOAvatar* lastAvatar = nullptr;
@@ -1752,7 +1754,9 @@ void renderOctree(LLSpatialGroup* group)
gGL.popMatrix();
}
}
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+#endif
gDebugProgram.bind(); // make sure non-rigged variant is bound
gGL.diffuseColor4f(1,1,1,1);
}
@@ -1974,12 +1978,11 @@ 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));
- stop_glerror();
+ //glLineWidth(llmax(4.f*sinf(gFrameTimeSeconds*2.f)+1.f, 1.f));
+ stop_glerror();
drawBoxOutline(pos,size);
gGL.flush();
- glLineWidth(1.f);
+ //glLineWidth(1.f);
}
else
{
@@ -2491,7 +2494,9 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume, bool wireframe
llassert(LLGLSLShader::sCurBoundShader != 0);
LLVertexBuffer::unbind();
+#if GL_VERSION_1_1
glVertexPointer(3, GL_FLOAT, 16, phys_volume->mHullPoints);
+#endif
gGL.diffuseColor4fv(color.mV);
@@ -2672,7 +2677,9 @@ void renderTextureAnim(LLDrawInfo* params)
void renderBatchSize(LLDrawInfo* params)
{
+#if GL_VERSION_1_1
LLGLEnable offset(GL_POLYGON_OFFSET_FILL);
+#endif
glPolygonOffset(-1.f, 1.f);
LLGLSLShader* old_shader = LLGLSLShader::sCurBoundShaderPtr;
bool bind = false;
@@ -2889,7 +2896,7 @@ public:
if (i == 1)
{
gGL.flush();
- glLineWidth(3.f);
+ //glLineWidth(3.f);
}
gGL.begin(LLRender::TRIANGLES);
@@ -2908,7 +2915,7 @@ public:
if (i == 1)
{
gGL.flush();
- glLineWidth(1.f);
+ //glLineWidth(1.f);
}
}
}
@@ -2978,7 +2985,9 @@ void renderRaycast(LLDrawable* drawablep)
dir.setSub(end, start);
gGL.flush();
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+#endif
{
//render face positions
@@ -2997,7 +3006,9 @@ void renderRaycast(LLDrawable* drawablep)
}
gGL.popMatrix();
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+#endif
}
}
}
@@ -3585,16 +3596,22 @@ void LLSpatialPartition::renderDebug()
LLGLEnable blend(GL_BLEND);
LLGLDepthTest depth_under(GL_TRUE, GL_FALSE, GL_GREATER);
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+#endif
gGL.diffuseColor4f(0.5f, 0.0f, 0, 0.25f);
+#if GL_VERSION_1_1
LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
+#endif
glPolygonOffset(-1.f, -1.f);
LLOctreeRenderXRay xray(camera);
xray.traverse(mOctree);
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+#endif
}
}
gDebugProgram.unbind();