meow-7.2.2
Brad Payne (Vir Linden) 2013-01-10 13:24:18 -05:00
commit 003e632680
10 changed files with 644 additions and 569 deletions

View File

@ -1290,9 +1290,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>8180c6f8d96a76c0c4b7746eb9e98964</string>
<string>17bcc2481fe362e297376d9c46888de8</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/268052/arch/Linux/installer/llappearanceutility_source-0.1-linux-20121212.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/268501/arch/Linux/installer/llappearanceutility_source-0.1-linux-20121220.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>

View File

@ -118,10 +118,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (INSTALL_PROPRIETARY)
# Only turn on headless if we can find osmesa libraries.
include(FindPkgConfig)
pkg_check_modules(OSMESA osmesa)
if (OSMESA_FOUND)
set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
endif (OSMESA_FOUND)
#pkg_check_modules(OSMESA osmesa)
#if (OSMESA_FOUND)
# set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
#endif (OSMESA_FOUND)
endif (INSTALL_PROPRIETARY)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")

View File

@ -150,6 +150,10 @@ BOOL LLTexLayerSetBuffer::renderTexLayerSet()
gAlphaMaskProgram.bind();
gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
else
{
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.00f);
}
LLVertexBuffer::unbind();
@ -1132,7 +1136,8 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
}
}//*/
renderMorphMasks(x, y, width, height, net_color);
const bool force_render = true;
renderMorphMasks(x, y, width, height, net_color, force_render);
alpha_mask_specified = TRUE;
gGL.flush();
gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ONE_MINUS_DEST_ALPHA);
@ -1381,8 +1386,13 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
}
static LLFastTimer::DeclareTimer FTM_RENDER_MORPH_MASKS("renderMorphMasks");
BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color)
void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, bool force_render)
{
if (!force_render && !hasMorph())
{
lldebugs << "skipping renderMorphMasks for " << getUUID() << llendl;
return;
}
LLFastTimer t(FTM_RENDER_MORPH_MASKS);
BOOL success = TRUE;
@ -1419,6 +1429,11 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
LLTexLayerParamAlpha* param = *iter;
success &= param->render( x, y, width, height );
if (!success && !force_render)
{
lldebugs << "Failed to render param " << param->getID() << " ; skipping morph mask." << llendl;
return;
}
}
// Approximates a min() function
@ -1444,25 +1459,29 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
}
if( !getInfo()->mStaticImageFileName.empty() )
if( !getInfo()->mStaticImageFileName.empty() && getInfo()->mStaticImageIsMask )
{
LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask);
if( tex )
{
if( (tex->getComponents() == 4) ||
( (tex->getComponents() == 1) && getInfo()->mStaticImageIsMask ) )
if( (tex->getComponents() == 4) || (tex->getComponents() == 1) )
{
LLGLSNoAlphaTest gls_no_alpha_test;
gGL.getTexUnit(0)->bind(tex, TRUE);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
else
{
llwarns << "Skipping rendering of " << getInfo()->mStaticImageFileName
<< "; expected 1 or 4 components." << llendl;
}
}
}
// Draw a rectangle with the layer color to multiply the alpha by that color's alpha.
// Note: we're still using gGL.blendFunc( GL_DST_ALPHA, GL_ZERO );
if (layer_color.mV[VW] != 1.f)
if ( !is_approx_equal(layer_color.mV[VW], 1.f) )
{
LLGLDisable no_alpha(GL_ALPHA_TEST);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@ -1515,8 +1534,6 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
mMorphMasksValid = TRUE;
getTexLayerSet()->applyMorphMask(alpha_data, width, height, 1);
}
return success;
}
static LLFastTimer::DeclareTimer FTM_ADD_ALPHA_MASK("addAlphaMask");
@ -1531,7 +1548,8 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32
findNetColor( &net_color );
// TODO: eliminate need for layer morph mask valid flag
invalidateMorphMasks();
renderMorphMasks(originX, originY, width, height, net_color);
const bool force_render = false;
renderMorphMasks(originX, originY, width, height, net_color, force_render);
alphaData = getAlphaData();
}
if (alphaData)
@ -1540,7 +1558,7 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32
{
U8 curAlpha = data[i];
U16 resultAlpha = curAlpha;
resultAlpha *= (alphaData[i] + 1);
resultAlpha *= ( ((U16)alphaData[i]) + 1);
resultAlpha = resultAlpha >> 8;
data[i] = (U8)resultAlpha;
}
@ -1915,9 +1933,15 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
{
if( (image_raw->getComponents() == 1) && is_mask )
{
// Note: these are static, unchanging images so it's ok to assume
// that once an image is a mask it's always a mask.
tex->setExplicitFormat( GL_ALPHA8, GL_ALPHA );
// Convert grayscale alpha masks from single channel into RGBA.
// Fill RGB with black to allow fixed function gl calls
// to match shader implementation.
LLPointer<LLImageRaw> alpha_image_raw = image_raw;
image_raw = new LLImageRaw(image_raw->getWidth(),
image_raw->getHeight(),
4);
image_raw->copyUnscaledAlphaMask(alpha_image_raw, LLColor4U::black);
}
tex->createGLTexture(0, image_raw, 0, TRUE, LLGLTexture::LOCAL);

View File

@ -160,7 +160,7 @@ public:
BOOL findNetColor(LLColor4* color) const;
/*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
/*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height);
BOOL renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color);
void renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, bool force_render);
void addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height);
/*virtual*/ BOOL isInvisibleAlphaMask() const;

View File

@ -673,6 +673,29 @@ void LLImageRaw::compositeUnscaled4onto3( LLImageRaw* src )
}
}
void LLImageRaw::copyUnscaledAlphaMask( LLImageRaw* src, const LLColor4U& fill)
{
LLImageRaw* dst = this; // Just for clarity.
llassert( 1 == src->getComponents() );
llassert( 4 == dst->getComponents() );
llassert( (src->getWidth() == dst->getWidth()) && (src->getHeight() == dst->getHeight()) );
S32 pixels = getWidth() * getHeight();
U8* src_data = src->getData();
U8* dst_data = dst->getData();
for ( S32 i = 0; i < pixels; i++ )
{
dst_data[0] = fill.mV[0];
dst_data[1] = fill.mV[1];
dst_data[2] = fill.mV[2];
dst_data[3] = src_data[0];
src_data += 1;
dst_data += 4;
}
}
// Fill the buffer with a constant color
void LLImageRaw::fill( const LLColor4U& color )
{

View File

@ -230,6 +230,11 @@ public:
// Src and dst are same size. Src has 3 components. Dst has 4 components.
void copyUnscaled3onto4( LLImageRaw* src );
// Src and dst are same size. Src has 1 component. Dst has 4 components.
// Alpha component is set to source alpha mask component.
// RGB components are set to fill color.
void copyUnscaledAlphaMask( LLImageRaw* src, const LLColor4U& fill);
// Src and dst can be any size. Src and dst have same number of components.
void copyScaled( LLImageRaw* src );

View File

@ -14170,5 +14170,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>DisablePrecacheDelayAfterTeleporting</key>
<map>
<key>Comment</key>
<string>Disables the artificial delay in the viewer that precaches some incoming assets</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
</llsd>

View File

@ -882,9 +882,12 @@ void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, BOOL disable_c
//static
void LLPanelEditWearable::onBackButtonClicked(void* userdata)
{
LLPanelEditWearable *panel = (LLPanelEditWearable*) userdata;
panel->saveChanges(true);
{
LLPanelEditWearable *panel = (LLPanelEditWearable*) userdata;
if ( panel->isDirty() )
{
LLAppearanceMgr::instance().setOutfitDirty( true );
}
}
//static

File diff suppressed because it is too large Load Diff

View File

@ -417,14 +417,21 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gAgent.setTeleportMessage(
LLAgent::sTeleportProgressMessages["arriving"]);
gTextureList.mForceResetTextureStats = TRUE;
gAgentCamera.resetView(TRUE, TRUE);
gAgentCamera.resetView(TRUE, TRUE);
if ( gSavedSettings.getBOOL("DisablePrecacheDelayAfterTeleporting") )
{
gViewerWindow->setShowProgress(FALSE);
gTeleportDisplay = FALSE;
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
}
break;
case LLAgent::TELEPORT_ARRIVING:
// Make the user wait while content "pre-caches"
{
F32 arrival_fraction = (gTeleportArrivalTimer.getElapsedTimeF32() / TELEPORT_ARRIVAL_DELAY);
if( arrival_fraction > 1.f )
{
arrival_fraction = 1.f;