summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/highlightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/bumpV.glsl2
-rw-r--r--indra/newview/lldrawpoolalpha.cpp3
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp4
-rw-r--r--indra/newview/llselectmgr.cpp12
-rw-r--r--indra/newview/llspatialpartition.cpp19
-rw-r--r--indra/newview/llviewerdisplay.cpp12
-rw-r--r--indra/newview/pipeline.cpp2
9 files changed, 26 insertions, 36 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
index 99ddeaf0b9..b724def93d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
@@ -27,7 +27,7 @@ attribute vec3 position;
attribute vec4 diffuse_color;
attribute vec3 normal;
attribute vec2 texcoord0;
-attribute vec2 texcoord2;
+attribute vec3 binormal;
varying vec3 vary_mat0;
varying vec3 vary_mat1;
@@ -40,7 +40,7 @@ void main()
gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1);
vec3 n = normalize(gl_NormalMatrix * normal);
- vec3 b = normalize(gl_NormalMatrix * vec4(texcoord2,0,1).xyz);
+ vec3 b = normalize(gl_NormalMatrix * binormal);
vec3 t = cross(b, n);
vary_mat0 = vec3(t.x, b.x, n.x);
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
index 4c0455502f..3a48205101 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
@@ -24,10 +24,10 @@
*/
-uniform vec4 highlight_color;
+uniform vec4 color;
uniform sampler2D diffuseMap;
void main()
{
- gl_FragColor = highlight_color*texture2D(diffuseMap, gl_TexCoord[0].xy);
+ gl_FragColor = color*texture2D(diffuseMap, gl_TexCoord[0].xy);
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
index bb6f0aa5e8..7d38e07d65 100644
--- a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
@@ -25,7 +25,6 @@
attribute vec3 position;
-attribute vec4 diffuse_color;
attribute vec2 texcoord0;
attribute vec2 texcoord1;
@@ -35,5 +34,4 @@ void main()
gl_Position = gl_ModelViewProjectionMatrix*vec4(position.xyz, 1.0);
gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1);
gl_TexCoord[1] = gl_TextureMatrix[1] * vec4(texcoord1,0,1);
- gl_FrontColor = diffuse_color;
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index a3f8eb377a..1e04cd9c17 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -322,13 +322,12 @@ void LLDrawPoolAlpha::render(S32 pass)
if(shaders)
{
gHighlightProgram.bind();
- gHighlightProgram.uniform4f("highlight_color", 1,0,0,1);
}
else
{
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
- gGL.diffuseColor4f(1,0,0,1);
}
+ gGL.diffuseColor4f(1,0,0,1);
LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f);
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE) ;
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index e4de92490e..852de39781 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -269,7 +269,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
{
if (gPipeline.canUseVertexShaders())
{
- gUIProgram.bind();
+ gHighlightProgram.bind();
}
// *NOTE: even though we already bound this texture above for the
// stars register combiners, we bind again here for defensive reasons,
@@ -289,7 +289,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
if (gPipeline.canUseVertexShaders())
{
- gUIProgram.unbind();
+ gHighlightProgram.unbind();
}
}
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 568c967a9a..48cccc12ef 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -5637,7 +5637,7 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL);
if (shader)
{
- gHighlightProgram.uniform4f("highlight_color", color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], 0.4f);
+ gGL.diffuseColor4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], 0.4f);
pushWireframe(drawable);
}
else
@@ -5661,14 +5661,8 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
gGL.flush();
gGL.setSceneBlendType(LLRender::BT_ALPHA);
- if (shader)
- {
- gHighlightProgram.uniform4f("highlight_color", color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2);
- }
- else
- {
- gGL.diffuseColor4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2);
- }
+ gGL.diffuseColor4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2);
+
LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
glPolygonOffset(3.f, 3.f);
glLineWidth(3.f);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 78b2db2bde..e0c3b43110 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2944,7 +2944,7 @@ void renderMeshBaseHull(LLVOVolume* volume, U32 data_mask, LLColor4& color, LLCo
else
{
gMeshRepo.buildPhysicsMesh(*decomp);
- gGL.color3f(0,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
drawBoxOutline(center, size);
}
@@ -3078,7 +3078,6 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
{
renderMeshBaseHull(volume, data_mask, color, line_color);
}
-#if LL_WINDOWS
else
{
LLVolumeParams volume_params = volume->getVolume()->getParams();
@@ -3190,13 +3189,12 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
else
{
- gGL.color3f(1,0,1);
+ gGL.diffuseColor4f(1,0,1,1);
drawBoxOutline(center, size);
}
LLPrimitive::sVolumeManager->unrefVolume(phys_volume);
}
-#endif //LL_WINDOWS
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::BOX)
{
@@ -3210,7 +3208,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::SPHERE)
{
- LLVolumeParams volume_params;
+ /*LLVolumeParams volume_params;
volume_params.setType( LL_PCODE_PROFILE_CIRCLE_HALF, LL_PCODE_PATH_CIRCLE );
volume_params.setBeginAndEndS( 0.f, 1.f );
volume_params.setBeginAndEndT( 0.f, 1.f );
@@ -3220,7 +3218,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
gGL.diffuseColor4fv(color.mV);
pushVerts(sphere);
- LLPrimitive::sVolumeManager->unrefVolume(sphere);
+ LLPrimitive::sVolumeManager->unrefVolume(sphere);*/
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::CYLINDER)
{
@@ -3290,15 +3288,6 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
gGL.popMatrix();
-
- /*{ //analytical shape, just push visual rep.
- gGL.diffuseColor3fv(color.mV);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- pushVerts(drawable, data_mask);
- gGL.diffuseColor4fv(color.mV);
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- pushVerts(drawable, data_mask);
- }*/
}
void renderPhysicsShapes(LLSpatialGroup* group)
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 39053fe9e4..eeb33ea5d2 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -719,6 +719,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery");
gPipeline.generateWaterReflection(*LLViewerCamera::getInstance());
gPipeline.generateHighlight(*LLViewerCamera::getInstance());
+ gPipeline.renderPhysicsDisplay();
}
LLGLState::checkStates();
@@ -1454,6 +1455,11 @@ void render_ui_2d()
void render_disconnected_background()
{
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
gGL.color4f(1,1,1,1);
if (!gDisconnectedImagep && gDisconnected)
{
@@ -1523,6 +1529,12 @@ void render_disconnected_background()
glPopMatrix();
}
gGL.flush();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
+
}
void display_cleanup()
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 27672a05cb..8d5bc22e6f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4480,8 +4480,6 @@ void LLPipeline::renderDebug()
{
gUIProgram.unbind();
}
-
- gPipeline.renderPhysicsDisplay();
}
void LLPipeline::rebuildPools()