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 f5f2ba52bf..c5a99eb4b1 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -919,7 +919,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);
}
}
@@ -936,7 +936,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);
}
}
@@ -3727,10 +3727,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
@@ -3852,10 +3854,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)
@@ -3863,10 +3867,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;
@@ -3977,10 +3983,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)
@@ -4073,7 +4081,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);
@@ -4089,10 +4099,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)
@@ -4112,10 +4124,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();
@@ -4195,7 +4209,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
@@ -4225,7 +4241,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();
}
@@ -4282,7 +4300,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);
@@ -4307,9 +4327,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())
@@ -4328,10 +4350,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
}
}
@@ -4348,7 +4374,9 @@ void LLPipeline::renderDebug()
glLineWidth(1.f);
}
+#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+#endif
}
}
}
@@ -4359,7 +4387,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");
@@ -4376,10 +4406,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
{
@@ -4419,7 +4453,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);
@@ -4444,7 +4480,9 @@ void LLPipeline::renderDebug()
}
gGL.end();
gGL.flush();
+#if GL_VERSION_1_1
glPointSize(1.f);
+#endif
}
// Debug stuff.
@@ -4627,7 +4665,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;
@@ -4641,7 +4681,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;
@@ -6652,7 +6694,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: