summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp48
1 files changed, 45 insertions, 3 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 9266c84540..d1f8bf9d14 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -920,7 +920,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY)
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
}
}
@@ -937,7 +937,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY)
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
}
}
@@ -3729,10 +3729,12 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera, bool do_occlusion)
llassert(!sRenderingHUDs);
+#if GL_VERSION_1_1
if (gUseWireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
}
+#endif
if (&camera == LLViewerCamera::getInstance())
{ // a bit hacky, this is the start of the main render frame, figure out delta between last modelview matrix and
@@ -3857,10 +3859,12 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera, bool do_occlusion)
} // Tracy ZoneScoped
+#if GL_VERSION_1_1
if (gUseWireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
+#endif
}
void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
@@ -3868,10 +3872,12 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LL_PROFILE_GPU_ZONE("renderGeomPostDeferred");
+#if GL_VERSION_1_1
if (gUseWireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
}
+#endif
U32 cur_type = 0;
@@ -3956,10 +3962,12 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
renderDebug();
}
+#if GL_VERSION_1_1
if (gUseWireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
+#endif
}
void LLPipeline::renderGeomShadow(LLCamera& camera)
@@ -4052,7 +4060,9 @@ void LLPipeline::renderPhysicsDisplay()
gGL.flush();
gDebugProgram.bind();
+#if GL_VERSION_1_1
LLGLEnable(GL_POLYGON_OFFSET_LINE);
+#endif
glPolygonOffset(3.f, 3.f);
glLineWidth(3.f);
LLGLEnable blend(GL_BLEND);
@@ -4068,10 +4078,12 @@ void LLPipeline::renderPhysicsDisplay()
bool wireframe = (pass == 2);
+#if GL_VERSION_1_1
if (wireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
}
+#endif
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -4091,10 +4103,12 @@ void LLPipeline::renderPhysicsDisplay()
}
gGL.flush();
+#if GL_VERSION_1_1
if (wireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
+#endif
}
glLineWidth(1.f);
gDebugProgram.unbind();
@@ -4174,7 +4188,9 @@ void LLPipeline::renderDebug()
glClearColor(clearColor.mV[0],clearColor.mV[1],clearColor.mV[2],0);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // no stencil -- deprecated | GL_STENCIL_BUFFER_BIT);
gGL.setColorMask(true, false);
+#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+#endif
}
//NavMesh
@@ -4204,7 +4220,9 @@ void LLPipeline::renderDebug()
gPathfindingProgram.bind();
gGL.flush();
+#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+#endif
glLineWidth(1.0f);
gGL.flush();
}
@@ -4261,7 +4279,9 @@ void LLPipeline::renderDebug()
LLGLDisable cull(i >= 2 ? GL_CULL_FACE : 0);
gGL.flush();
+#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+#endif
//get rid of some z-fighting
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
@@ -4286,9 +4306,11 @@ void LLPipeline::renderDebug()
gGL.flush();
}
+#if GL_VERSION_1_1
LLGLEnable lineOffset(GL_POLYGON_OFFSET_LINE);
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
+#endif
F32 offset = gSavedSettings.getF32("PathfindingLineOffset");
if (pathfindingConsole->isRenderXRay())
@@ -4307,10 +4329,14 @@ void LLPipeline::renderDebug()
}
else
{
+#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+#endif
gPathfindingProgram.uniform1f(sAmbiance, ambiance);
llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] );
+#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+#endif
}
}
@@ -4327,7 +4353,9 @@ void LLPipeline::renderDebug()
glLineWidth(1.f);
}
+#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+#endif
}
}
}
@@ -4338,7 +4366,9 @@ void LLPipeline::renderDebug()
{ //render navmesh xray
F32 ambiance = gSavedSettings.getF32("PathfindingAmbiance");
+#if GL_VERSION_1_1
LLGLEnable lineOffset(GL_POLYGON_OFFSET_LINE);
+#endif
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
F32 offset = gSavedSettings.getF32("PathfindingLineOffset");
@@ -4355,10 +4385,14 @@ void LLPipeline::renderDebug()
if (gSavedSettings.getBOOL("PathfindingXRayWireframe"))
{ //draw hidden wireframe as darker and less opaque
+#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
+#endif
gPathfindingProgram.uniform1f(sAmbiance, 1.f);
llPathingLibInstance->renderNavMesh();
+#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+#endif
}
else
{
@@ -4398,7 +4432,9 @@ void LLPipeline::renderDebug()
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep, true);
+#if GL_VERSION_1_1
glPointSize(8.f);
+#endif
LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
gGL.begin(LLRender::POINTS);
@@ -4423,7 +4459,9 @@ void LLPipeline::renderDebug()
}
gGL.end();
gGL.flush();
+#if GL_VERSION_1_1
glPointSize(1.f);
+#endif
}
// Debug stuff.
@@ -4606,7 +4644,9 @@ void LLPipeline::renderDebug()
{
//render visible point cloud
gGL.flush();
+#if GL_VERSION_1_1
glPointSize(8.f);
+#endif
gGL.begin(LLRender::POINTS);
F32* c = col+i*4;
@@ -4620,7 +4660,9 @@ void LLPipeline::renderDebug()
gGL.end();
gGL.flush();
+#if GL_VERSION_1_1
glPointSize(1.f);
+#endif
LLVector3* ext = mShadowExtents[i];
LLVector3 pos = (ext[0]+ext[1])*0.5f;
@@ -6631,7 +6673,7 @@ void apply_cube_face_rotation(U32 face)
void validate_framebuffer_object()
{
GLenum status;
- status = glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT);
+ status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
switch(status)
{
case GL_FRAMEBUFFER_COMPLETE: