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.cpp46
1 files changed, 28 insertions, 18 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index fc66e9283e..262da507be 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -122,16 +122,27 @@
#include "SMAAAreaTex.h"
#include "SMAASearchTex.h"
#include "llerror.h"
-#ifndef LL_WINDOWS
-#define A_GCC 1
+
+#if LL_CLANG
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#pragma clang diagnostic ignored "-Wunused-variable"
+#elif LL_GNUC
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
-#if LL_LINUX
#pragma GCC diagnostic ignored "-Wrestrict"
#endif
+#ifndef LL_WINDOWS
+#define A_GCC 1
#endif
#define A_CPU 1
#include "app_settings/shaders/class1/deferred/CASF.glsl" // This is also C++
+#if LL_CLANG
+#pragma clang diagnostic pop
+#elif LL_GNUC
+#pragma GCC diagnostic pop
+#endif
extern bool gSnapshot;
bool gShiftFrame = false;
@@ -1006,7 +1017,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);
}
}
@@ -1023,7 +1034,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);
}
}
@@ -4342,7 +4353,7 @@ void LLPipeline::renderPhysicsDisplay()
LLGLEnable polygon_offset_line(GL_POLYGON_OFFSET_LINE);
glPolygonOffset(3.f, 3.f);
- glLineWidth(3.f);
+ gGL.setLineWidth(3.f);
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
@@ -4384,7 +4395,7 @@ void LLPipeline::renderPhysicsDisplay()
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
}
- glLineWidth(1.f);
+ gGL.setLineWidth(1.f);
gDebugProgram.unbind();
}
@@ -4468,8 +4479,7 @@ void LLPipeline::renderDebug()
//NavMesh
if ( pathfindingConsole->isRenderNavMesh() )
{
- gGL.flush();
- glLineWidth(2.0f);
+ gGL.setLineWidth(2.0f);
LLGLEnable cull(GL_CULL_FACE);
LLGLDisable blend(GL_BLEND);
@@ -4493,7 +4503,7 @@ void LLPipeline::renderDebug()
gGL.flush();
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
- glLineWidth(1.0f);
+ gGL.setLineWidth(1.0f);
gGL.flush();
}
//User designated path
@@ -4608,11 +4618,11 @@ void LLPipeline::renderDebug()
gPathfindingProgram.uniform1f(sTint, 1.f);
gPathfindingProgram.uniform1f(sAlphaScale, 1.f);
- glLineWidth(gSavedSettings.getF32("PathfindingLineWidth"));
+ gGL.setLineWidth(gSavedSettings.getF32("PathfindingLineWidth"));
LLGLDisable blendOut(GL_BLEND);
llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] );
gGL.flush();
- glLineWidth(1.f);
+ gGL.setLineWidth(1.f);
}
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
@@ -4635,7 +4645,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);
LLGLEnable cull(GL_CULL_FACE);
gPathfindingProgram.uniform1f(sTint, gSavedSettings.getF32("PathfindingXRayTint"));
@@ -4662,7 +4672,7 @@ void LLPipeline::renderDebug()
gPathfindingProgram.bind();
gGL.flush();
- glLineWidth(1.0f);
+ gGL.setLineWidth(1.0f);
}
glPolygonOffset(0.f, 0.f);
@@ -4955,7 +4965,7 @@ void LLPipeline::renderDebug()
}
/*gGL.flush();
- glLineWidth(16-i*2);
+ gGL.setLineWidth(16-i*2);
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
@@ -4973,7 +4983,7 @@ void LLPipeline::renderDebug()
}
}
gGL.flush();
- glLineWidth(1.f);*/
+ gGL.setLineWidth(1.f);*/
}
}
@@ -6989,7 +6999,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:
@@ -9403,7 +9413,7 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
void LLPipeline::unbindReflectionProbes(LLGLSLShader& shader)
{
- S32 channel = shader.disableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP);
+ S32 channel = shader.disableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
if (channel > -1 && mReflectionMapManager.mTexture.notNull())
{
mReflectionMapManager.mTexture->unbind();