summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lldrawpoolbump.cpp2
-rw-r--r--indra/newview/llface.cpp21
-rw-r--r--indra/newview/llviewercontrol.cpp7
3 files changed, 12 insertions, 18 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index b7092f32a2..711034a972 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -82,7 +82,7 @@ static S32 bump_channel = -1;
// static
void LLStandardBumpmap::init()
{
- // do nothing
+ LLStandardBumpmap::restoreGL();
}
// static
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 26554997c0..7a0aa9244d 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1019,7 +1019,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
bool rebuild_weights = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_WEIGHT4);
const LLTextureEntry *tep = mVObjp->getTE(f);
- U8 bump_code = tep ? tep->getBumpmap() : 0;
+ const U8 bump_code = tep ? tep->getBumpmap() : 0;
if (rebuild_pos)
{
@@ -1161,7 +1161,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
}
- // INDICES
+ // INDICES
if (full_rebuild)
{
mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex);
@@ -1185,9 +1185,9 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
//bump setup
- LLVector4a binormal_dir( -sin_ang, cos_ang, 0 );
- LLVector4a bump_s_primary_light_ray;
- LLVector4a bump_t_primary_light_ray;
+ LLVector4a binormal_dir( -sin_ang, cos_ang, 0.f );
+ LLVector4a bump_s_primary_light_ray(0.f, 0.f, 0.f);
+ LLVector4a bump_t_primary_light_ray(0.f, 0.f, 0.f);
LLQuaternion bump_quat;
if (mDrawablep->isActive())
@@ -1239,7 +1239,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LLVector3 moon_ray = gSky.getMoonDirection();
LLVector3& primary_light_ray = (sun_ray.mV[VZ] > 0) ? sun_ray : moon_ray;
- bump_s_primary_light_ray;
bump_s_primary_light_ray.load3((offset_multiple * s_scale * primary_light_ray).mV);
bump_t_primary_light_ray.load3((offset_multiple * t_scale * primary_light_ray).mV);
}
@@ -1251,15 +1250,11 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
LLMatrix4a mat_normal;
-
- if (rebuild_normal || rebuild_binormal || rebuild_tcoord)
- {
- mat_normal.loadu(mat_norm_in);
- }
+ mat_normal.loadu(mat_norm_in);
//if it's not fullbright and has no normals, bake sunlight based on face normal
- bool bake_sunlight = !getTextureEntry()->getFullbright() &&
- !mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_NORMAL);
+ //bool bake_sunlight = !getTextureEntry()->getFullbright() &&
+ // !mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_NORMAL);
if (rebuild_tcoord)
{
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 481c96dae3..623950853e 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -119,10 +119,9 @@ static bool handleTerrainDetailChanged(const LLSD& newvalue)
static bool handleSetShaderChanged(const LLSD& newvalue)
{
- // changing shader level may invalidate existing cached bump maps, as the shader type determines the format of the bump map it expects - clear the bump cache
- gBumpImageList.clear();
- LLStandardBumpmap::clear();
- LLStandardBumpmap::addstandard();
+ // changing shader level may invalidate existing cached bump maps, as the shader type determines the format of the bump map it expects - clear and repopulate the bump cache
+ gBumpImageList.destroyGL();
+ gBumpImageList.restoreGL();
LLViewerShaderMgr::instance()->setShaders();
return true;