merge changes for DRTVWR-148

master
Oz Linden 2012-05-29 12:42:53 -04:00
commit 81870e09c9
84 changed files with 769 additions and 242 deletions

3
.hgtags Executable file → Normal file
View File

@ -261,12 +261,12 @@ c6175c955a19e9b9353d242889ec1779b5762522 3.2.5-release
3d75c836d178c7c7e788f256afe195f6cab764a2 3.2.7-beta1
89980333c99dbaf1787fe20784f1d8849e9b5d4f 3.2.8-start
16f8e2915f3f2e4d732fb3125daf229cb0fd1875 DRTVWR-114_3.2.8-beta1
37dd400ad721e2a89ee820ffc1e7e433c68f3ca2 3.2.9-start
16f8e2915f3f2e4d732fb3125daf229cb0fd1875 3.2.8-beta1
987425b1acf4752379b2e1eb20944b4b35d67a85 DRTVWR-115_3.2.8-beta2
987425b1acf4752379b2e1eb20944b4b35d67a85 3.2.8-beta2
51b2fd52e36aab8f670e0874e7e1472434ec4b4a DRTVWR-113_3.2.8-release
51b2fd52e36aab8f670e0874e7e1472434ec4b4a 3.2.8-release
37dd400ad721e2a89ee820ffc1e7e433c68f3ca2 3.2.9-start
e9c82fca5ae6fb8a8af29012d78fb194a29323f3 DRTVWR-117_3.2.9-beta1
e9c82fca5ae6fb8a8af29012d78fb194a29323f3 3.2.9-beta1
a01ef9bed28627f4ca543fbc1d70c79cc297a90f DRTVWR-118_3.2.9-beta2
@ -300,3 +300,4 @@ c623bbc854b6f7ee1b33a3718f76715046aa2937 viewer-release-candidate
675668bd24d3bea570814f71762a2a806f7e1b8d 3.3.2-release
675668bd24d3bea570814f71762a2a806f7e1b8d viewer-release-candidate
15e90b52dc0297921b022b90d10d797436b8a1bd viewer-release-candidate
6414ecdabc5d89515b08d1f872cf923ed3a5523a DRTVWR-148

View File

@ -774,7 +774,7 @@ void parse_args_and_init(int argc, char **argv, UpdaterAppState *app_state)
else if ((!strcmp(argv[i], "--image-dir")) && (++i < argc))
{
app_state->image_dir = argv[i];
app_state->image_dir_iter = new LLDirIterator(argv[i], "/*.jpg");
app_state->image_dir_iter = new LLDirIterator(argv[i], "*.jpg");
}
else if ((!strcmp(argv[i], "--dest")) && (++i < argc))
{

0
indra/llimage/llimagej2c.cpp Executable file → Normal file
View File

View File

@ -548,6 +548,7 @@ LLCurl::Multi::Multi(F32 idle_time_out)
mErrorCount(0),
mState(STATE_READY),
mDead(FALSE),
mValid(TRUE),
mMutexp(NULL),
mDeletionMutexp(NULL),
mEasyMutexp(NULL)
@ -583,22 +584,33 @@ LLCurl::Multi::Multi(F32 idle_time_out)
LLCurl::Multi::~Multi()
{
cleanup() ;
cleanup(true) ;
delete mDeletionMutexp ;
mDeletionMutexp = NULL ;
}
void LLCurl::Multi::cleanup()
void LLCurl::Multi::cleanup(bool deleted)
{
if(!mCurlMultiHandle)
{
return ; //nothing to clean.
}
llassert_always(deleted || !mValid) ;
LLMutexLock lock(mDeletionMutexp);
// Clean up active
for(easy_active_list_t::iterator iter = mEasyActiveList.begin();
iter != mEasyActiveList.end(); ++iter)
{
Easy* easy = *iter;
check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle()));
if(deleted)
{
easy->mResponder = NULL ; //avoid triggering mResponder.
}
delete easy;
}
mEasyActiveList.clear();
@ -610,11 +622,9 @@ void LLCurl::Multi::cleanup()
check_curl_multi_code(LLCurl::deleteMultiHandle(mCurlMultiHandle));
mCurlMultiHandle = NULL ;
delete mMutexp ;
mMutexp = NULL ;
delete mDeletionMutexp ;
mDeletionMutexp = NULL ;
delete mEasyMutexp ;
mEasyMutexp = NULL ;
@ -644,10 +654,20 @@ void LLCurl::Multi::unlock()
void LLCurl::Multi::markDead()
{
LLMutexLock lock(mDeletionMutexp) ;
{
LLMutexLock lock(mDeletionMutexp) ;
mDead = TRUE ;
LLCurl::getCurlThread()->setPriority(mHandle, LLQueuedThread::PRIORITY_URGENT) ;
if(mCurlMultiHandle != NULL)
{
mDead = TRUE ;
LLCurl::getCurlThread()->setPriority(mHandle, LLQueuedThread::PRIORITY_URGENT) ;
return;
}
}
//not valid, delete it.
delete this;
}
void LLCurl::Multi::setState(LLCurl::Multi::ePerformState state)
@ -741,10 +761,14 @@ bool LLCurl::Multi::doPerform()
setState(STATE_COMPLETED) ;
mIdleTimer.reset() ;
}
else if(mIdleTimer.getElapsedTimeF32() > mIdleTimeOut) //idle for too long, remove it.
else if(!mValid && mIdleTimer.getElapsedTimeF32() > mIdleTimeOut) //idle for too long, remove it.
{
dead = true ;
}
else if(mValid && mIdleTimer.getElapsedTimeF32() > mIdleTimeOut - 1.f) //idle for too long, mark it invalid.
{
mValid = FALSE ;
}
return dead ;
}
@ -966,15 +990,8 @@ void LLCurlThread::killMulti(LLCurl::Multi* multi)
return ;
}
if(multi->isValid())
{
multi->markDead() ;
}
else
{
deleteMulti(multi) ;
}
}
//private
bool LLCurlThread::doMultiPerform(LLCurl::Multi* multi)
@ -992,6 +1009,10 @@ void LLCurlThread::deleteMulti(LLCurl::Multi* multi)
void LLCurlThread::cleanupMulti(LLCurl::Multi* multi)
{
multi->cleanup() ;
if(multi->isDead()) //check if marked dead during cleaning up.
{
deleteMulti(multi) ;
}
}
//------------------------------------------------------------

View File

@ -304,7 +304,7 @@ public:
ePerformState getState() ;
bool isCompleted() ;
bool isValid() {return mCurlMultiHandle != NULL ;}
bool isValid() {return mCurlMultiHandle != NULL && mValid;}
bool isDead() {return mDead;}
bool waitToComplete() ;
@ -318,7 +318,7 @@ public:
private:
void easyFree(LLCurl::Easy*);
void cleanup() ;
void cleanup(bool deleted = false) ;
CURLM* mCurlMultiHandle;
@ -333,6 +333,7 @@ private:
ePerformState mState;
BOOL mDead ;
BOOL mValid ;
LLMutex* mMutexp ;
LLMutex* mDeletionMutexp ;
LLMutex* mEasyMutexp ;

0
indra/llprimitive/llprimitive.cpp Executable file → Normal file
View File

View File

@ -94,6 +94,10 @@ void APIENTRY gl_debug_callback(GLenum source,
llwarns << "Severity: " << std::hex << severity << llendl;
llwarns << "Message: " << message << llendl;
llwarns << "-----------------------" << llendl;
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
{
llerrs << "Halting on GL Error" << llendl;
}
}
#endif
@ -572,6 +576,15 @@ bool LLGLManager::initGL()
#endif
}
if (mGLVersion >= 2.1f && LLImageGL::sCompressTextures)
{ //use texture compression
glHint(GL_TEXTURE_COMPRESSION_HINT, GL_NICEST);
}
else
{ //GL version is < 3.0, always disable texture compression
LLImageGL::sCompressTextures = false;
}
// Trailing space necessary to keep "nVidia Corpor_ati_on" cards
// from being recognized as ATI.
if (mGLVendor.substr(0,4) == "ATI ")
@ -592,11 +605,8 @@ bool LLGLManager::initGL()
#endif // LL_WINDOWS
#if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS
// release 7277 is a point at which we verify that ATI OpenGL
// drivers get pretty stable with SL, ~Catalyst 8.2,
// for both Win32 and Linux.
if (mDriverVersionRelease < 7277 &&
mDriverVersionRelease != 0) // 0 == Undetectable driver version - these get to pretend to be new ATI drivers, though that decision may be revisited.
// count any pre OpenGL 3.0 implementation as an old driver
if (mGLVersion < 3.f)
{
mATIOldDriver = TRUE;
}
@ -735,6 +745,11 @@ bool LLGLManager::initGL()
}
#endif
if (mIsIntel && mGLVersion <= 3.f)
{ //never try to use framebuffer objects on older intel drivers (crashy)
mHasFramebufferObject = FALSE;
}
if (mHasFramebufferObject)
{
glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples);
@ -1897,7 +1912,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
glClientActiveTextureARB(GL_TEXTURE0_ARB);
gGL.getTexUnit(0)->activate();
if (gGLManager.mHasVertexShader)
if (gGLManager.mHasVertexShader && LLGLSLShader::sNoFixedFunction)
{ //make sure vertex attribs are all disabled
GLint count;
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS_ARB, &count);

43
indra/llrender/llimagegl.cpp Executable file → Normal file
View File

@ -56,6 +56,7 @@ BOOL LLImageGL::sGlobalUseAnisotropic = FALSE;
F32 LLImageGL::sLastFrameTime = 0.f;
BOOL LLImageGL::sAllowReadBackRaw = FALSE ;
LLImageGL* LLImageGL::sDefaultGLTexture = NULL ;
bool LLImageGL::sCompressTextures = false;
std::set<LLImageGL*> LLImageGL::sImageList;
@ -409,6 +410,8 @@ void LLImageGL::init(BOOL usemipmaps)
mDiscardLevelInAtlas = -1 ;
mTexelsInAtlas = 0 ;
mTexelsInGLTexture = 0 ;
mAllowCompression = true;
mTarget = GL_TEXTURE_2D;
mBindTarget = LLTexUnit::TT_TEXTURE;
@ -637,7 +640,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
stop_glerror();
}
LLImageGL::setManualImage(mTarget, gl_level, mFormatInternal, w, h, mFormatPrimary, GL_UNSIGNED_BYTE, (GLvoid*)data_in);
LLImageGL::setManualImage(mTarget, gl_level, mFormatInternal, w, h, mFormatPrimary, GL_UNSIGNED_BYTE, (GLvoid*)data_in, mAllowCompression);
if (gl_level == 0)
{
analyzeAlpha(data_in, w, h);
@ -679,7 +682,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
LLImageGL::setManualImage(mTarget, 0, mFormatInternal,
w, h,
mFormatPrimary, mFormatType,
data_in);
data_in, mAllowCompression);
analyzeAlpha(data_in, w, h);
stop_glerror();
@ -737,7 +740,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
stop_glerror();
}
LLImageGL::setManualImage(mTarget, m, mFormatInternal, w, h, mFormatPrimary, mFormatType, cur_mip_data);
LLImageGL::setManualImage(mTarget, m, mFormatInternal, w, h, mFormatPrimary, mFormatType, cur_mip_data, mAllowCompression);
if (m == 0)
{
analyzeAlpha(data_in, w, h);
@ -795,7 +798,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
}
LLImageGL::setManualImage(mTarget, 0, mFormatInternal, w, h,
mFormatPrimary, mFormatType, (GLvoid *)data_in);
mFormatPrimary, mFormatType, (GLvoid *)data_in, mAllowCompression);
analyzeAlpha(data_in, w, h);
updatePickMask(w, h, data_in);
@ -1042,7 +1045,7 @@ void LLImageGL::deleteTextures(S32 numTextures, U32 *textures, bool immediate)
}
// static
void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels)
void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression)
{
bool use_scratch = false;
U32* scratch = NULL;
@ -1105,6 +1108,36 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
}
}
if (LLImageGL::sCompressTextures && allow_compression)
{
switch (intformat)
{
case GL_RGB:
case GL_RGB8:
intformat = GL_COMPRESSED_RGB;
break;
case GL_RGBA:
case GL_RGBA8:
intformat = GL_COMPRESSED_RGBA;
break;
case GL_LUMINANCE:
case GL_LUMINANCE8:
intformat = GL_COMPRESSED_LUMINANCE;
break;
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE8_ALPHA8:
intformat = GL_COMPRESSED_LUMINANCE_ALPHA;
break;
case GL_ALPHA:
case GL_ALPHA8:
intformat = GL_COMPRESSED_ALPHA;
break;
default:
llwarns << "Could not compress format: " << std::hex << intformat << llendl;
break;
}
}
stop_glerror();
glTexImage2D(target, miplevel, intformat, width, height, 0, pixformat, pixtype, use_scratch ? scratch : pixels);
stop_glerror();

7
indra/llrender/llimagegl.h Executable file → Normal file
View File

@ -94,12 +94,13 @@ public:
void setSize(S32 width, S32 height, S32 ncomponents);
void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;}
void setAllowCompression(bool allow) { mAllowCompression = allow; }
// These 3 functions currently wrap glGenTextures(), glDeleteTextures(), and glTexImage2D()
// for tracking purposes and will be deprecated in the future
static void generateTextures(S32 numTextures, U32 *textures);
static void deleteTextures(S32 numTextures, U32 *textures, bool immediate = false);
static void setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels);
static void setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression = true);
BOOL createGLTexture() ;
BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, BOOL to_create = TRUE,
@ -210,6 +211,8 @@ private:
U32 mTexelsInAtlas ;
U32 mTexelsInGLTexture;
bool mAllowCompression;
protected:
LLGLenum mTarget; // Normally GL_TEXTURE2D, sometimes something else (ex. cube maps)
LLTexUnit::eTextureType mBindTarget; // Normally TT_TEXTURE, sometimes something else (ex. cube maps)
@ -245,7 +248,7 @@ public:
static BOOL sGlobalUseAnisotropic;
static LLImageGL* sDefaultGLTexture ;
static BOOL sAutomatedTest;
static bool sCompressTextures; //use GL texture compression
#if DEBUG_MISS
BOOL mMissed; // Missed on last bind?
BOOL getMissed() const { return mMissed; };

View File

@ -143,7 +143,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
{
clear_glerror();
LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL, false);
if (glGetError() != GL_NO_ERROR)
{
llwarns << "Could not allocate color buffer for render target." << llendl;
@ -223,7 +223,7 @@ bool LLRenderTarget::allocateDepth()
U32 internal_type = LLTexUnit::getInternalType(mUsage);
stop_glerror();
clear_glerror();
LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL, false);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}

View File

@ -38,6 +38,8 @@
#include "llglslshader.h"
#include "llmemory.h"
#define LL_VBO_POOLING 0
//Next Highest Power Of Two
//helper function, returns first number > v that is a power of 2, or v if v is already a power of 2
U32 nhpo2(U32 v)
@ -49,6 +51,35 @@ U32 nhpo2(U32 v)
return r;
}
//which power of 2 is i?
//assumes i is a power of 2 > 0
U32 wpo2(U32 i)
{
llassert(i > 0);
llassert(nhpo2(i) == i);
U32 r = 0;
while (i >>= 1) ++r;
return r;
}
const U32 LL_VBO_BLOCK_SIZE = 2048;
U32 vbo_block_size(U32 size)
{ //what block size will fit size?
U32 mod = size % LL_VBO_BLOCK_SIZE;
return mod == 0 ? size : size + (LL_VBO_BLOCK_SIZE-mod);
}
U32 vbo_block_index(U32 size)
{
return vbo_block_size(size)/LL_VBO_BLOCK_SIZE;
}
//============================================================================
@ -57,7 +88,11 @@ LLVBOPool LLVertexBuffer::sStreamVBOPool(GL_STREAM_DRAW_ARB, GL_ARRAY_BUFFER_ARB
LLVBOPool LLVertexBuffer::sDynamicVBOPool(GL_DYNAMIC_DRAW_ARB, GL_ARRAY_BUFFER_ARB);
LLVBOPool LLVertexBuffer::sStreamIBOPool(GL_STREAM_DRAW_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB);
LLVBOPool LLVertexBuffer::sDynamicIBOPool(GL_DYNAMIC_DRAW_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB);
U32 LLVBOPool::sBytesPooled = 0;
U32 LLVBOPool::sIndexBytesPooled = 0;
U32 LLVertexBuffer::sAllocatedIndexBytes = 0;
U32 LLVertexBuffer::sIndexCount = 0;
LLPrivateMemoryPool* LLVertexBuffer::sPrivatePoolp = NULL;
U32 LLVertexBuffer::sBindCount = 0;
@ -74,6 +109,7 @@ U32 LLVertexBuffer::sLastMask = 0;
bool LLVertexBuffer::sVBOActive = false;
bool LLVertexBuffer::sIBOActive = false;
U32 LLVertexBuffer::sAllocatedBytes = 0;
U32 LLVertexBuffer::sVertexCount = 0;
bool LLVertexBuffer::sMapped = false;
bool LLVertexBuffer::sUseStreamDraw = true;
bool LLVertexBuffer::sUseVAO = false;
@ -134,39 +170,35 @@ public:
};
//which power of 2 is i?
//assumes i is a power of 2 > 0
U32 wpo2(U32 i)
{
llassert(i > 0);
llassert(nhpo2(i) == i);
U32 r = 0;
while (i >>= 1) ++r;
return r;
}
volatile U8* LLVBOPool::allocate(U32& name, U32 size)
{
llassert(nhpo2(size) == size);
llassert(vbo_block_size(size) == size);
volatile U8* ret = NULL;
U32 i = wpo2(size);
#if LL_VBO_POOLING
U32 i = vbo_block_index(size);
if (mFreeList.size() <= i)
{
mFreeList.resize(i+1);
}
volatile U8* ret = NULL;
if (mFreeList[i].empty())
{
//make a new buffer
glGenBuffersARB(1, &name);
glBindBufferARB(mType, name);
LLVertexBuffer::sAllocatedBytes += size;
if (mType == GL_ARRAY_BUFFER_ARB)
{
LLVertexBuffer::sAllocatedBytes += size;
}
else
{
LLVertexBuffer::sAllocatedIndexBytes += size;
}
if (LLVertexBuffer::sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW_ARB)
{
@ -185,19 +217,55 @@ volatile U8* LLVBOPool::allocate(U32& name, U32 size)
name = mFreeList[i].front().mGLName;
ret = mFreeList[i].front().mClientData;
sBytesPooled -= size;
if (mType == GL_ARRAY_BUFFER_ARB)
{
sBytesPooled -= size;
}
else
{
sIndexBytesPooled -= size;
}
mFreeList[i].pop_front();
}
#else //no pooling
glGenBuffersARB(1, &name);
glBindBufferARB(mType, name);
if (mType == GL_ARRAY_BUFFER_ARB)
{
LLVertexBuffer::sAllocatedBytes += size;
}
else
{
LLVertexBuffer::sAllocatedIndexBytes += size;
}
if (LLVertexBuffer::sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW_ARB)
{
glBufferDataARB(mType, size, 0, mUsage);
ret = (U8*) ll_aligned_malloc_16(size);
}
else
{ //always use a true hint of static draw when allocating non-client-backed buffers
glBufferDataARB(mType, size, 0, GL_STATIC_DRAW_ARB);
}
glBindBufferARB(mType, 0);
#endif
return ret;
}
void LLVBOPool::release(U32 name, volatile U8* buffer, U32 size)
{
llassert(nhpo2(size) == size);
llassert(vbo_block_size(size) == size);
U32 i = wpo2(size);
#if LL_VBO_POOLING
U32 i = vbo_block_index(size);
llassert(mFreeList.size() > i);
@ -211,9 +279,29 @@ void LLVBOPool::release(U32 name, volatile U8* buffer, U32 size)
}
else
{
sBytesPooled += size;
if (mType == GL_ARRAY_BUFFER_ARB)
{
sBytesPooled += size;
}
else
{
sIndexBytesPooled += size;
}
mFreeList[i].push_back(rec);
}
#else //no pooling
glDeleteBuffersARB(1, &name);
ll_aligned_free_16((U8*) buffer);
if (mType == GL_ARRAY_BUFFER_ARB)
{
LLVertexBuffer::sAllocatedBytes -= size;
}
else
{
LLVertexBuffer::sAllocatedIndexBytes -= size;
}
#endif
}
void LLVBOPool::cleanup()
@ -237,8 +325,16 @@ void LLVBOPool::cleanup()
l.pop_front();
LLVertexBuffer::sAllocatedBytes -= size;
sBytesPooled -= size;
if (mType == GL_ARRAY_BUFFER_ARB)
{
sBytesPooled -= size;
LLVertexBuffer::sAllocatedBytes -= size;
}
else
{
sIndexBytesPooled -= size;
LLVertexBuffer::sAllocatedIndexBytes -= size;
}
}
size *= 2;
@ -898,6 +994,9 @@ LLVertexBuffer::~LLVertexBuffer()
mFence = NULL;
sVertexCount -= mNumVerts;
sIndexCount -= mNumIndices;
llassert_always(!mMappedData && !mMappedIndexData);
};
@ -929,7 +1028,7 @@ void LLVertexBuffer::waitFence() const
void LLVertexBuffer::genBuffer(U32 size)
{
mSize = nhpo2(size);
mSize = vbo_block_size(size);
if (mUsage == GL_STREAM_DRAW_ARB)
{
@ -945,7 +1044,7 @@ void LLVertexBuffer::genBuffer(U32 size)
void LLVertexBuffer::genIndices(U32 size)
{
mIndicesSize = nhpo2(size);
mIndicesSize = vbo_block_size(size);
if (mUsage == GL_STREAM_DRAW_ARB)
{
@ -1121,7 +1220,9 @@ void LLVertexBuffer::updateNumVerts(S32 nverts)
createGLBuffer(needed_size);
}
sVertexCount -= mNumVerts;
mNumVerts = nverts;
sVertexCount += mNumVerts;
}
void LLVertexBuffer::updateNumIndices(S32 nindices)
@ -1137,7 +1238,9 @@ void LLVertexBuffer::updateNumIndices(S32 nindices)
createGLIndices(needed_size);
}
sIndexCount -= mNumIndices;
mNumIndices = nindices;
sIndexCount += mNumIndices;
}
void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)

View File

@ -55,6 +55,7 @@ class LLVBOPool
{
public:
static U32 sBytesPooled;
static U32 sIndexBytesPooled;
LLVBOPool(U32 vboUsage, U32 vboType)
: mUsage(vboUsage)
@ -332,6 +333,9 @@ public:
static bool sIBOActive;
static U32 sLastMask;
static U32 sAllocatedBytes;
static U32 sAllocatedIndexBytes;
static U32 sVertexCount;
static U32 sIndexCount;
static U32 sBindCount;
static U32 sSetCount;
};

0
indra/llui/llcontainerview.cpp Executable file → Normal file
View File

View File

@ -349,7 +349,7 @@ void LLMultiFloater::setVisible(BOOL visible)
BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask)
{
if (key == 'W' && mask == (MASK_CONTROL|MASK_SHIFT))
if (key == 'W' && mask == MASK_CONTROL)
{
LLFloater* floater = getActiveFloater();
// is user closeable and is system closeable

View File

@ -86,6 +86,13 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
std::string fullpath;
S32 result;
// File masks starting with "/" will match nothing, so we consider them invalid.
if (LLStringUtil::startsWith(mask, getDirDelimiter()))
{
llwarns << "Invalid file mask: " << mask << llendl;
llassert(!"Invalid file mask");
}
LLDirIterator iter(dirname, mask);
while (iter.next(filename))
{

View File

@ -1477,7 +1477,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
}
else
{
llinfos << "Created OpenGL " << llformat("%d.%d", attribs[1], attribs[3]) << " context." << llendl;
llinfos << "Created OpenGL " << llformat("%d.%d", attribs[1], attribs[3]) <<
(LLRender::sGLCoreProfile ? " core" : " compatibility") << " context." << llendl;
done = true;
if (LLRender::sGLCoreProfile)

View File

@ -1188,9 +1188,7 @@ void *updatethreadproc(void*)
llinfos << "Clearing cache..." << llendl;
char mask[LL_MAX_PATH]; /* Flawfinder: ignore */
snprintf(mask, LL_MAX_PATH, "%s*.*", gDirUtilp->getDirDelimiter().c_str());
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""),mask);
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), "*.*");
llinfos << "Clear complete." << llendl;

0
indra/newview/CMakeLists.txt Executable file → Normal file
View File

0
indra/newview/app_settings/logcontrol.xml Executable file → Normal file
View File

46
indra/newview/app_settings/settings.xml Executable file → Normal file
View File

@ -7642,6 +7642,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>RenderCompressTextures</key>
<map>
<key>Comment</key>
<string>Enable texture compression on OpenGL 3.0 and later implementations (EXPERIMENTAL, requires restart)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RenderPerformanceTest</key>
<map>
<key>Comment</key>
@ -9134,28 +9145,19 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>RenderUseShaderLOD</key>
<map>
<key>Comment</key>
<string>Whether we want to have different shaders for LOD</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RenderUseShaderNearParticles</key>
<map>
<key>Comment</key>
<string>Whether we want to use shaders on near particles</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RenderAutoHideSurfaceAreaLimit</key>
<map>
<key>Comment</key>
<string>Maximum surface area of a set of proximal objects inworld before automatically hiding geometry to prevent system overload.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RenderVBOEnable</key>
<map>
<key>Comment</key>

View File

@ -61,6 +61,7 @@ WLSkyDetail 1 128
Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 1.0
RenderCompressTextures 1 1
RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
@ -71,6 +72,38 @@ RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
//
// Low Graphics Settings (fixed function)
//
list LowFixedFunction
RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
RenderAvatarMaxVisible 1 3
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
RenderGlowResolutionPow 1 8
RenderMaxPartCount 1 0
RenderObjectBump 1 0
RenderLocalLights 1 0
RenderReflectionDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
RenderFSAASamples 1 0
//
// Low Graphics Settings
//
@ -94,7 +127,7 @@ RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderDeferred 1 0
@ -222,6 +255,12 @@ RenderVBOEnable 1 1
list Class3
RenderVBOEnable 1 1
//
// VRAM > 512MB
//
list VRAMGT512
RenderCompressTextures 1 0
//
// No Pixel Shaders available
//
@ -302,6 +341,7 @@ RenderMaxTextureIndex 1 1
list Intel
RenderAnisotropic 1 0
RenderVBOEnable 1 0
RenderFSAASamples 1 0
list GeForce2
RenderAnisotropic 1 0

View File

@ -61,6 +61,7 @@ WLSkyDetail 1 128
Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 1.0
RenderCompressTextures 1 1
RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
@ -68,6 +69,37 @@ RenderShadowDetail 1 2
RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
//
// Low Graphics Settings (fixed function)
//
list LowFixedFunction
RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
RenderAvatarMaxVisible 1 3
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
RenderGlowResolutionPow 1 8
RenderLocalLights 1 0
RenderMaxPartCount 1 0
RenderObjectBump 1 0
RenderReflectionDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
RenderFSAASamples 1 0
//
// Low Graphics Settings
//
@ -219,6 +251,12 @@ RenderVBOEnable 1 1
list Class3
RenderVBOEnable 1 1
//
// VRAM > 512MB
//
list VRAMGT512
RenderCompressTextures 1 0
//
// No Pixel Shaders available
//
@ -291,10 +329,15 @@ RenderObjectBump 0 0
list OpenGLPre15
RenderVBOEnable 1 0
list OpenGLPre30
RenderDeferred 0 0
RenderMaxTextureIndex 1 1
list Intel
RenderAnisotropic 1 0
// Avoid some Intel crashes on Linux
RenderCubeMap 0 0
RenderFSAASamples 1 0
list GeForce2
RenderAnisotropic 1 0

View File

@ -61,6 +61,7 @@ WLSkyDetail 1 128
Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 0.5
RenderCompressTextures 1 1
RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
@ -70,6 +71,37 @@ RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
//
// Low Graphics Settings (fixed function)
//
list LowFixedFunction
RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
RenderAvatarMaxVisible 1 3
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
RenderGlowResolutionPow 1 8
RenderLocalLights 1 0
RenderMaxPartCount 1 0
RenderObjectBump 1 0
RenderReflectionDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
RenderFSAASamples 1 0
//
// Low Graphics Settings
//
@ -93,7 +125,7 @@ RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderDeferred 1 0
@ -247,6 +279,12 @@ RenderDeferred 0 0
RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
//
// VRAM > 512MB
//
list VRAMGT512
RenderCompressTextures 1 0
//
// "Default" setups for safe, low, medium, high
//
@ -286,6 +324,7 @@ RenderObjectBump 0 0
list OpenGLPre15
RenderVBOEnable 1 0
list TexUnit8orLess
RenderDeferredSSAO 0 0
@ -295,6 +334,7 @@ RenderDeferredSSAO 1 0
list Intel
RenderAnisotropic 1 0
RenderLocalLights 1 0
RenderFSAASamples 1 0
list GeForce2
RenderAnisotropic 1 0

View File

@ -61,6 +61,7 @@ WLSkyDetail 1 128
Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 1.0
RenderCompressTextures 1 1
RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 0
RenderDeferredSSAO 1 0
@ -70,6 +71,37 @@ RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
//
// Low Graphics Settings (fixed function)
//
list LowFixedFunction
RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0
RenderAvatarPhysicsLODFactor 1 0
RenderAvatarMaxVisible 1 3
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0
RenderGlowResolutionPow 1 8
RenderLocalLights 1 0
RenderMaxPartCount 1 0
RenderObjectBump 1 0
RenderReflectionDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
RenderFSAASamples 1 0
//
// Low Graphics Settings
//
@ -93,7 +125,7 @@ RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 0.5
VertexShaderEnable 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderDeferred 1 0
@ -221,6 +253,12 @@ RenderVBOEnable 1 1
list Class3
RenderVBOEnable 1 1
//
// VRAM > 512MB
//
list VRAMGT512
RenderCompressTextures 1 0
//
// No Pixel Shaders available
//
@ -299,6 +337,7 @@ RenderMaxTextureIndex 1 1
list Intel
RenderAnisotropic 1 0
RenderVBOEnable 1 0
RenderFSAASamples 1 0
list GeForce2
RenderAnisotropic 1 0

View File

@ -205,6 +205,7 @@ ATI Radeon X800 .*ATI.*Radeon ?X8.* 2 1
ATI Radeon X900 .*ATI.*Radeon ?X9.* 2 1
ATI Radeon Xpress .*ATI.*Radeon Xpress.* 0 1
ATI Rage 128 .*ATI.*Rage 128.* 0 1
ATI R300 (9700) .*R300.* 1 1
ATI R350 (9800) .*R350.* 1 1
ATI R580 (X1900) .*R580.* 3 1
ATI RC410 (Xpress 200) .*RC410.* 0 0

0
indra/newview/llagentwearables.cpp Executable file → Normal file
View File

0
indra/newview/llagentwearables.h Executable file → Normal file
View File

0
indra/newview/llappearancemgr.cpp Executable file → Normal file
View File

View File

@ -531,6 +531,7 @@ static void settings_to_globals()
LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile");
LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic");
LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures");
LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor");
LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f;
LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor");
@ -548,7 +549,7 @@ static void settings_to_globals()
gAgentPilot.setNumRuns(gSavedSettings.getS32("StatsNumRuns"));
gAgentPilot.setQuitAfterRuns(gSavedSettings.getBOOL("StatsQuitAfterRuns"));
gAgent.setHideGroupTitle(gSavedSettings.getBOOL("RenderHideGroupTitle"));
gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc");
gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates");
LLWorldMapView::sMapScale = gSavedSettings.getF32("MapScale");
@ -1016,6 +1017,15 @@ bool LLAppViewer::init()
}
}
#if LL_WINDOWS
if (gGLManager.mIsIntel &&
LLFeatureManager::getInstance()->getGPUClass() > 0 &&
gGLManager.mGLVersion <= 3.f)
{
LLNotificationsUtil::add("IntelOldDriver");
}
#endif
// save the graphics card
gDebugInfo["GraphicsCard"] = LLFeatureManager::getInstance()->getGPUString();
@ -1549,7 +1559,6 @@ bool LLAppViewer::cleanup()
if (! isError())
{
std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
logdir += gDirUtilp->getDirDelimiter();
gDirUtilp->deleteFilesInDir(logdir, "*-*-*-*-*.dmp");
}
@ -1805,8 +1814,7 @@ bool LLAppViewer::cleanup()
if (mPurgeOnExit)
{
llinfos << "Purging all cache files on exit" << llendflush;
std::string mask = gDirUtilp->getDirDelimiter() + "*.*";
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""),mask);
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), "*.*");
}
removeMarkerFile(); // Any crashes from here on we'll just have to ignore
@ -3040,8 +3048,7 @@ void LLAppViewer::cleanupSavedSettings()
void LLAppViewer::removeCacheFiles(const std::string& file_mask)
{
std::string mask = gDirUtilp->getDirDelimiter() + file_mask;
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), mask);
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), file_mask);
}
void LLAppViewer::writeSystemInfo()
@ -3900,8 +3907,7 @@ void LLAppViewer::purgeCache()
LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << LL_ENDL;
LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE);
LLVOCache::getInstance()->removeCache(LL_PATH_CACHE);
std::string mask = "*.*";
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), mask);
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), "*.*");
}
std::string LLAppViewer::getSecondLifeTitle() const

View File

@ -594,7 +594,7 @@ namespace action_give_inventory
}
S32 count = LLShareInfo::instance().mAvatarNames.size();
bool shared = false;
bool shared = count && !inventory_selected_uuids.empty();
// iterate through avatars
for(S32 i = 0; i < count; ++i)
@ -616,8 +616,10 @@ namespace action_give_inventory
LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it);
if (inv_cat)
{
LLGiveInventory::doGiveInventoryCategory(avatar_uuid, inv_cat, session_id);
shared = true;
if (!LLGiveInventory::doGiveInventoryCategory(avatar_uuid, inv_cat, session_id, "ItemsShared"))
{
shared = false;
}
break;
}
LLViewerInventoryItem* inv_item = gInventory.getItem(*it);
@ -632,8 +634,10 @@ namespace action_give_inventory
}
else
{
LLGiveInventory::doGiveInventoryItem(avatar_uuid, inv_item, session_id);
shared = true;
if (!LLGiveInventory::doGiveInventoryItem(avatar_uuid, inv_item, session_id))
{
shared = false;
}
}
}
if (noncopy_items.beginArray() != noncopy_items.endArray())
@ -643,8 +647,10 @@ namespace action_give_inventory
LLSD payload;
payload["agent_id"] = avatar_uuid;
payload["items"] = noncopy_items;
payload["success_notification"] = "ItemsShared";
LLNotificationsUtil::add("CannotCopyWarning", substitutions, payload,
&LLGiveInventory::handleCopyProtectedItem);
shared = false;
break;
}
}

View File

@ -1341,8 +1341,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
// immediately assign bump to a global smart pointer in case some local smart pointer
// accidentally releases it.
LLPointer<LLViewerTexture> bump = LLViewerTextureManager::getLocalTexture( TRUE );
if (!LLPipeline::sRenderDeferred)
{
LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
@ -1351,6 +1350,10 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
}
else
{ //convert to normal map
//disable compression on normal maps to prevent errors below
bump->getGLTexture()->setAllowCompression(false);
{
LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
bump->setExplicitFormat(GL_RGBA8, GL_ALPHA);

View File

@ -670,7 +670,14 @@ void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
switch (level)
{
case 0:
maskFeatures("Low");
if (gGLManager.mGLVersion < 3.f || gGLManager.mIsIntel)
{ //only use fixed function by default if GL version < 3.0 or this is an intel graphics chip
maskFeatures("LowFixedFunction");
}
else
{ //same as low, but with "Basic Shaders" enabled
maskFeatures("Low");
}
break;
case 1:
maskFeatures("Mid");
@ -779,6 +786,10 @@ void LLFeatureManager::applyBaseMasks()
{
maskFeatures("MapBufferRange");
}
if (gGLManager.mVRAM > 512)
{
maskFeatures("VRAMGT512");
}
// now mask by gpu string
// Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces

View File

@ -416,6 +416,9 @@ void LLFloaterBvhPreview::draw()
//-----------------------------------------------------------------------------
void LLFloaterBvhPreview::resetMotion()
{
if (!mAnimPreview)
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
BOOL paused = avatarp->areAnimationsPaused();
@ -535,6 +538,9 @@ BOOL LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
BOOL LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (!mAnimPreview)
return false;
mAnimPreview->zoom((F32)clicks * -0.2f);
mAnimPreview->requestUpdate();
@ -670,7 +676,7 @@ void LLFloaterBvhPreview::onCommitBaseAnim()
//-----------------------------------------------------------------------------
void LLFloaterBvhPreview::onCommitLoop()
{
if (!getEnabled())
if (!getEnabled() || !mAnimPreview)
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
@ -689,7 +695,7 @@ void LLFloaterBvhPreview::onCommitLoop()
//-----------------------------------------------------------------------------
void LLFloaterBvhPreview::onCommitLoopIn()
{
if (!getEnabled())
if (!getEnabled() || !mAnimPreview)
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
@ -709,7 +715,7 @@ void LLFloaterBvhPreview::onCommitLoopIn()
//-----------------------------------------------------------------------------
void LLFloaterBvhPreview::onCommitLoopOut()
{
if (!getEnabled())
if (!getEnabled() || !mAnimPreview)
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
@ -729,7 +735,7 @@ void LLFloaterBvhPreview::onCommitLoopOut()
//-----------------------------------------------------------------------------
void LLFloaterBvhPreview::onCommitName()
{
if (!getEnabled())
if (!getEnabled() || !mAnimPreview)
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
@ -770,7 +776,7 @@ void LLFloaterBvhPreview::onCommitEmote()
//-----------------------------------------------------------------------------
void LLFloaterBvhPreview::onCommitPriority()
{
if (!getEnabled())
if (!getEnabled() || !mAnimPreview)
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
@ -784,7 +790,7 @@ void LLFloaterBvhPreview::onCommitPriority()
//-----------------------------------------------------------------------------
void LLFloaterBvhPreview::onCommitEaseIn()
{
if (!getEnabled())
if (!getEnabled() || !mAnimPreview)
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
@ -799,7 +805,7 @@ void LLFloaterBvhPreview::onCommitEaseIn()
//-----------------------------------------------------------------------------
void LLFloaterBvhPreview::onCommitEaseOut()
{
if (!getEnabled())
if (!getEnabled() || !mAnimPreview)
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
@ -814,7 +820,7 @@ void LLFloaterBvhPreview::onCommitEaseOut()
//-----------------------------------------------------------------------------
bool LLFloaterBvhPreview::validateEaseIn(const LLSD& data)
{
if (!getEnabled())
if (!getEnabled() || !mAnimPreview)
return false;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
@ -834,7 +840,7 @@ bool LLFloaterBvhPreview::validateEaseIn(const LLSD& data)
//-----------------------------------------------------------------------------
bool LLFloaterBvhPreview::validateEaseOut(const LLSD& data)
{
if (!getEnabled())
if (!getEnabled() || !mAnimPreview)
return false;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();

View File

@ -37,6 +37,7 @@
#include "llspinctrl.h"
#include "llstartup.h"
#include "lltextbox.h"
#include "llcombobox.h"
#include "pipeline.h"
// Linden library includes
@ -99,6 +100,12 @@ void LLFloaterHardwareSettings::refreshEnabledState()
getChildView("vbo")->setEnabled(FALSE);
}
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderCompressTextures") ||
!gGLManager.mHasVertexBufferObject)
{
getChildView("texture compression")->setEnabled(FALSE);
}
// if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
LLSpinCtrl* gamma_ctrl = getChild<LLSpinCtrl>("gamma");
gamma_ctrl->setEnabled(!gPipeline.canUseWindLightShaders());
@ -142,6 +149,13 @@ BOOL LLFloaterHardwareSettings::postBuild()
{
childSetAction("OK", onBtnOK, this);
if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f)
{ //remove FSAA settings above "4x"
LLComboBox* combo = getChild<LLComboBox>("fsaa");
combo->remove("8x");
combo->remove("16x");
}
refresh();
center();

View File

@ -2183,14 +2183,8 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
item->dirtyFilter();
// Update the folder creation date if the folder has no creation date
bool setting_date = false;
const time_t item_creation_date = item->getCreationDate();
if ((item_creation_date > 0) && (mCreationDate == 0))
{
setCreationDate(item_creation_date);
setting_date = true;
}
// Update the folder creation date if the child is newer than our current date
setCreationDate(llmax<time_t>(mCreationDate, item->getCreationDate()));
// Handle sorting
requestArrange();
@ -2200,11 +2194,8 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
LLFolderViewFolder* parentp = getParentFolder();
while (parentp)
{
// Update the parent folder creation date
if (setting_date && (parentp->mCreationDate == 0))
{
parentp->setCreationDate(item_creation_date);
}
// Update the folder creation date if the child is newer than our current date
parentp->setCreationDate(llmax<time_t>(parentp->mCreationDate, item->getCreationDate()));
if (parentp->mSortFunction.isByDate())
{

View File

@ -220,17 +220,25 @@ bool LLGiveInventory::doGiveInventoryItem(const LLUUID& to_agent,
return res;
}
void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
const LLInventoryCategory* cat,
const LLUUID& im_session_id)
const LLUUID& im_session_id,
const std::string& notification_name)
{
if (!cat) return;
if (!cat)
{
return false;
}
llinfos << "LLGiveInventory::giveInventoryCategory() - "
<< cat->getUUID() << llendl;
if (!isAgentAvatarValid()) return;
if (!isAgentAvatarValid())
{
return false;
}
bool give_successful = true;
// Test out how many items are being given.
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
@ -253,24 +261,24 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
if (!complete)
{
LLNotificationsUtil::add("IncompleteInventory");
return;
give_successful = false;
}
count = items.count() + cats.count();
if (count > MAX_ITEMS)
{
LLNotificationsUtil::add("TooManyItems");
return;
give_successful = false;
}
else if (count == 0)
{
LLNotificationsUtil::add("NoItems");
return;
give_successful = false;
}
else
else if (give_successful)
{
if (0 == giveable.countNoCopy())
{
LLGiveInventory::commitGiveInventoryCategory(to_agent, cat, im_session_id);
give_successful = LLGiveInventory::commitGiveInventoryCategory(to_agent, cat, im_session_id);
}
else
{
@ -279,9 +287,16 @@ void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
LLSD payload;
payload["agent_id"] = to_agent;
payload["folder_id"] = cat->getUUID();
if (!notification_name.empty())
{
payload["success_notification"] = notification_name;
}
LLNotificationsUtil::add("CannotCopyCountItems", args, payload, &LLGiveInventory::handleCopyProtectedCategory);
give_successful = false;
}
}
return give_successful;
}
//////////////////////////////////////////////////////////////////////////
@ -325,6 +340,7 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLSD itmes = notification["payload"]["items"];
LLInventoryItem* item = NULL;
bool give_successful = true;
switch(option)
{
case 0: // "Yes"
@ -343,15 +359,21 @@ bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LL
else
{
LLNotificationsUtil::add("CannotGiveItem");
give_successful = false;
}
}
if (give_successful && notification["payload"]["success_notification"].isDefined())
{
LLNotificationsUtil::add(notification["payload"]["success_notification"].asString());
}
break;
default: // no, cancel, whatever, who cares, not yes.
LLNotificationsUtil::add("TransactionCancelled");
give_successful = false;
break;
}
return false;
return give_successful;
}
// static
@ -408,13 +430,14 @@ bool LLGiveInventory::handleCopyProtectedCategory(const LLSD& notification, cons
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLInventoryCategory* cat = NULL;
bool give_successful = true;
switch(option)
{
case 0: // "Yes"
cat = gInventory.getCategory(notification["payload"]["folder_id"].asUUID());
if (cat)
{
LLGiveInventory::commitGiveInventoryCategory(notification["payload"]["agent_id"].asUUID(),
give_successful = LLGiveInventory::commitGiveInventoryCategory(notification["payload"]["agent_id"].asUUID(),
cat);
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
@ -430,27 +453,37 @@ bool LLGiveInventory::handleCopyProtectedCategory(const LLSD& notification, cons
gInventory.deleteObject(items.get(i)->getUUID());
}
gInventory.notifyObservers();
if (give_successful && notification["payload"]["success_notification"].isDefined())
{
LLNotificationsUtil::add(notification["payload"]["success_notification"].asString());
}
}
else
{
LLNotificationsUtil::add("CannotGiveCategory");
give_successful = false;
}
break;
default: // no, cancel, whatever, who cares, not yes.
LLNotificationsUtil::add("TransactionCancelled");
give_successful = false;
break;
}
return false;
return give_successful;
}
// static
void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
const LLInventoryCategory* cat,
const LLUUID& im_session_id)
{
if (!cat) return;
if (!cat)
{
return false;
}
llinfos << "LLGiveInventory::commitGiveInventoryCategory() - "
<< cat->getUUID() << llendl;
@ -467,6 +500,7 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
LLInventoryModel::EXCLUDE_TRASH,
giveable);
bool give_successful = true;
// MAX ITEMS is based on (sizeof(uuid)+2) * count must be <
// MTUBYTES or 18 * count < 1200 => count < 1200/18 =>
// 66. I've cut it down a bit from there to give some pad.
@ -474,12 +508,12 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
if (count > MAX_ITEMS)
{
LLNotificationsUtil::add("TooManyItems");
return;
give_successful = false;
}
else if (count == 0)
{
LLNotificationsUtil::add("NoItems");
return;
give_successful = false;
}
else
{
@ -545,6 +579,8 @@ void LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
logInventoryOffer(to_agent, im_session_id);
}
return give_successful;
}
// EOF

View File

@ -62,9 +62,10 @@ public:
/**
* Gives passed inventory category to specified avatar in specified session.
*/
static void doGiveInventoryCategory(const LLUUID& to_agent,
static bool doGiveInventoryCategory(const LLUUID& to_agent,
const LLInventoryCategory* item,
const LLUUID &session_id = LLUUID::null);
const LLUUID &session_id = LLUUID::null,
const std::string& notification = std::string());
// give inventory item functionality
static bool handleCopyProtectedItem(const LLSD& notification, const LLSD& response);
@ -85,7 +86,7 @@ private:
// give inventory category functionality
static bool handleCopyProtectedCategory(const LLSD& notification, const LLSD& response);
static void commitGiveInventoryCategory(const LLUUID& to_agent,
static bool commitGiveInventoryCategory(const LLUUID& to_agent,
const LLInventoryCategory* cat,
const LLUUID &im_session_id = LLUUID::null);

View File

@ -119,6 +119,7 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
void LLIMFloaterContainer::onCloseFloater(LLUUID& id)
{
mSessions.erase(id);
setFocus(TRUE);
}
void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data)

View File

@ -3237,7 +3237,6 @@ public:
//just like a normal IM
//this is just replicated code from process_improved_im
//and should really go in it's own function -jwolk
LLChat chat;
std::string message = message_params["message"].asString();
std::string name = message_params["from_name"].asString();
@ -3255,14 +3254,7 @@ public:
name,
LLMute::flagTextChat);
BOOL is_linden = LLMuteList::getInstance()->isLinden(name);
std::string separator_string(": ");
chat.mMuted = is_muted && !is_linden;
chat.mFromID = from_id;
chat.mFromName = name;
if (!is_linden && is_busy)
if (is_busy || is_muted)
{
return;
}

View File

@ -111,6 +111,7 @@ private:
private:
LLUUID mObjectID;
LLUUID mPreviousObjectID;
S32 mObjectFace;
viewer_media_t mMediaImpl;
LLMediaEntry* mMediaEntry;
@ -249,6 +250,7 @@ void LLInspectObject::onClose(bool app_quitting)
{
// Release selection to deselect
mObjectSelection = NULL;
mPreviousObjectID = mObjectID;
getChild<LLMenuButton>("gear_btn")->hideMenu();
}
@ -266,6 +268,13 @@ void LLInspectObject::update()
LLSelectNode* nodep = selection->getFirstRootNode();
if (!nodep) return;
// If we don't have fresh object info yet and it's the object we inspected last time,
// keep showing the previously retrieved data until we get the update.
if (!nodep->mValid && nodep->getObject()->getID() == mPreviousObjectID)
{
return;
}
updateButtons(nodep);
updateName(nodep);
updateDescription(nodep);

View File

@ -654,7 +654,7 @@ void LLInventoryFilter::setHoursAgo(U32 hours)
bool are_date_limits_valid = mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max();
bool is_increasing = hours > mFilterOps.mHoursAgo;
bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo;
bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo && !isSinceLogoff();
// *NOTE: need to cache last filter time, in case filter goes stale
BOOL less_restrictive = (are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo)) || !hours);

0
indra/newview/llinventorymodel.cpp Executable file → Normal file
View File

View File

@ -1620,7 +1620,7 @@ void LLMeshUploadThread::doWholeModelUpload()
mCurlRequest->process();
//sleep for 10ms to prevent eating a whole core
apr_sleep(10000);
} while (mCurlRequest->getQueued() > 0);
} while (!LLAppViewer::isQuitting() && mCurlRequest->getQueued() > 0);
}
delete mCurlRequest;

View File

@ -267,7 +267,6 @@ LLNavigationBar::LLNavigationBar()
mBtnForward(NULL),
mBtnHome(NULL),
mCmbLocation(NULL),
mPurgeTPHistoryItems(false),
mSaveToLocationHistory(false)
{
buildFromFile( "panel_navigation_bar.xml");
@ -338,12 +337,6 @@ void LLNavigationBar::setVisible(BOOL visible)
void LLNavigationBar::draw()
{
if(mPurgeTPHistoryItems)
{
LLTeleportHistory::getInstance()->purgeItems();
mPurgeTPHistoryItems = false;
}
if (isBackgroundVisible())
{
static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0);
@ -687,7 +680,7 @@ void LLNavigationBar::clearHistoryCache()
LLLocationHistory* lh = LLLocationHistory::getInstance();
lh->removeItems();
lh->save();
mPurgeTPHistoryItems= true;
LLTeleportHistory::getInstance()->purgeItems();
}
int LLNavigationBar::getDefNavBarHeight()

View File

@ -145,7 +145,6 @@ private:
boost::signals2::connection mTeleportFailedConnection;
boost::signals2::connection mTeleportFinishConnection;
boost::signals2::connection mHistoryMenuConnection;
bool mPurgeTPHistoryItems;
// if true, save location to location history when teleport finishes
bool mSaveToLocationHistory;
};

View File

@ -105,15 +105,17 @@ BOOL LLNearbyChatBar::postBuild()
mNearbyChat = getChildView("nearby_chat");
LLUICtrl* show_btn = getChild<LLUICtrl>("show_nearby_chat");
gSavedSettings.declareBOOL("nearbychat_history_visibility", mNearbyChat->getVisible(), "Visibility state of nearby chat history", TRUE);
BOOL show_nearby_chat = gSavedSettings.getBOOL("nearbychat_history_visibility");
LLButton* show_btn = getChild<LLButton>("show_nearby_chat");
show_btn->setCommitCallback(boost::bind(&LLNearbyChatBar::onToggleNearbyChatPanel, this));
show_btn->setToggleState(show_nearby_chat);
mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator");
mOutputMonitor->setVisible(FALSE);
gSavedSettings.declareBOOL("nearbychat_history_visibility", mNearbyChat->getVisible(), "Visibility state of nearby chat history", TRUE);
mNearbyChat->setVisible(gSavedSettings.getBOOL("nearbychat_history_visibility"));
showNearbyChatPanel(show_nearby_chat);
// Register for font change notifications
LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1));
@ -394,26 +396,23 @@ void LLNearbyChatBar::sendChat( EChatType type )
}
}
void LLNearbyChatBar::onToggleNearbyChatPanel()
void LLNearbyChatBar::showNearbyChatPanel(bool show)
{
LLView* nearby_chat = getChildView("nearby_chat");
if (nearby_chat->getVisible())
if (!show)
{
if (!isMinimized())
if (mNearbyChat->getVisible() && !isMinimized())
{
mExpandedHeight = getRect().getHeight();
}
setResizeLimits(getMinWidth(), COLLAPSED_HEIGHT);
nearby_chat->setVisible(FALSE);
mNearbyChat->setVisible(FALSE);
reshape(getRect().getWidth(), COLLAPSED_HEIGHT);
enableResizeCtrls(true, true, false);
storeRectControl();
}
else
{
nearby_chat->setVisible(TRUE);
mNearbyChat->setVisible(TRUE);
setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT);
reshape(getRect().getWidth(), mExpandedHeight);
enableResizeCtrls(true);
@ -423,6 +422,11 @@ void LLNearbyChatBar::onToggleNearbyChatPanel()
gSavedSettings.setBOOL("nearbychat_history_visibility", mNearbyChat->getVisible());
}
void LLNearbyChatBar::onToggleNearbyChatPanel()
{
showNearbyChatPanel(!mNearbyChat->getVisible());
}
void LLNearbyChatBar::setMinimized(BOOL b)
{
LLNearbyChat* nearby_chat = getChild<LLNearbyChat>("nearby_chat");

View File

@ -39,6 +39,8 @@ class LLNearbyChatBarListener;
class LLNearbyChatBar : public LLFloater
{
LOG_CLASS(LLNearbyChatBar);
public:
// constructor for inline chat-bars (e.g. hosted in chat history window)
LLNearbyChatBar(const LLSD& key);
@ -78,6 +80,7 @@ protected:
/* virtual */ bool applyRectControl();
void showNearbyChatPanel(bool show);
void onToggleNearbyChatPanel();
static LLWString stripChannelNumber(const LLWString &mesg, S32* channel);

View File

@ -40,6 +40,7 @@
#include "llagent.h"
#include "llbutton.h"
#include "llcallbacklist.h"
#include "llfocusmgr.h"
#include "llnotifications.h"
#include "llprogressbar.h"
@ -72,6 +73,8 @@ LLProgressView::LLProgressView()
mStartupComplete(false)
{
mUpdateEvents.listen("self", boost::bind(&LLProgressView::handleUpdate, this, _1));
mFadeToWorldTimer.stop();
mFadeFromLoginTimer.stop();
}
BOOL LLProgressView::postBuild()
@ -87,8 +90,6 @@ BOOL LLProgressView::postBuild()
mCancelBtn = getChild<LLButton>("cancel_btn");
mCancelBtn->setClickedCallback( LLProgressView::onCancelButtonClicked, NULL );
mFadeToWorldTimer.stop();
mFadeFromLoginTimer.stop();
getChild<LLTextBox>("title_text")->setText(LLStringExplicit(LLAppViewer::instance()->getSecondLifeTitle()));
@ -106,6 +107,9 @@ BOOL LLProgressView::postBuild()
LLProgressView::~LLProgressView()
{
// Just in case something went wrong, make sure we deregister our idle callback.
gIdleCallbacks.deleteFunction(onIdle, this);
gFocusMgr.releaseFocusIfNeeded( this );
sInstance = NULL;
@ -154,6 +158,7 @@ void LLProgressView::revealIntroPanel()
}
mFadeFromLoginTimer.start();
gIdleCallbacks.addFunction(onIdle, this);
}
void LLProgressView::setStartupComplete()
@ -236,13 +241,6 @@ void LLProgressView::draw()
}
LLPanel::draw();
if (mFadeFromLoginTimer.getElapsedTimeF32() > FADE_TO_WORLD_TIME )
{
mFadeFromLoginTimer.stop();
LLPanelLogin::closePanel();
}
return;
}
@ -424,3 +422,21 @@ void LLProgressView::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent even
}
}
}
// static
void LLProgressView::onIdle(void* user_data)
{
LLProgressView* self = (LLProgressView*) user_data;
// Close login panel on mFadeToWorldTimer expiration.
if (self->mFadeFromLoginTimer.getStarted() &&
self->mFadeFromLoginTimer.getElapsedTimeF32() > FADE_TO_WORLD_TIME)
{
self->mFadeFromLoginTimer.stop();
LLPanelLogin::closePanel();
// Nothing to do anymore.
gIdleCallbacks.deleteFunction(onIdle, user_data);
}
}

View File

@ -41,6 +41,8 @@ class LLProgressView :
public LLViewerMediaObserver
{
LOG_CLASS(LLProgressView);
public:
LLProgressView();
virtual ~LLProgressView();
@ -74,10 +76,6 @@ public:
static void onClickMessage(void*);
bool onAlertModal(const LLSD& sd);
// note - this is not just hiding the intro panel - it also hides the parent panel
// and is used when the intro is finished and we want to show the world
void removeIntroPanel();
protected:
LLProgressBar* mProgressBar;
LLMediaCtrl* mMediaCtrl;
@ -96,6 +94,7 @@ protected:
LLEventStream mUpdateEvents;
bool handleUpdate(const LLSD& event_data);
static void onIdle(void* user_data);
};
#endif // LL_LLPROGRESSVIEW_H

View File

@ -3051,11 +3051,11 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response,
// TODO: Make sure you have delete permissions on all of them.
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
// attempt to derez into the trash.
LLDeRezInfo* info = new LLDeRezInfo(DRD_TRASH, trash_id);
LLDeRezInfo info(DRD_TRASH, trash_id);
LLSelectMgr::getInstance()->sendListToRegions("DeRezObject",
packDeRezHeader,
packObjectLocalID,
(void*)info,
(void*) &info,
SEND_ONLY_ROOTS);
// VEFFECT: Delete Object - one effect for all deletes
if (LLSelectMgr::getInstance()->mSelectedObjects->mSelectType != SELECT_TYPE_HUD)
@ -3745,13 +3745,15 @@ void LLSelectMgr::deselectAllIfTooFar()
void LLSelectMgr::selectionSetObjectName(const std::string& name)
{
std::string name_copy(name);
// we only work correctly if 1 object is selected.
if(mSelectedObjects->getRootObjectCount() == 1)
{
sendListToRegions("ObjectName",
packAgentAndSessionID,
packObjectName,
(void*)(new std::string(name)),
(void*)(&name_copy),
SEND_ONLY_ROOTS);
}
else if(mSelectedObjects->getObjectCount() == 1)
@ -3759,20 +3761,22 @@ void LLSelectMgr::selectionSetObjectName(const std::string& name)
sendListToRegions("ObjectName",
packAgentAndSessionID,
packObjectName,
(void*)(new std::string(name)),
(void*)(&name_copy),
SEND_INDIVIDUALS);
}
}
void LLSelectMgr::selectionSetObjectDescription(const std::string& desc)
{
std::string desc_copy(desc);
// we only work correctly if 1 object is selected.
if(mSelectedObjects->getRootObjectCount() == 1)
{
sendListToRegions("ObjectDescription",
packAgentAndSessionID,
packObjectDescription,
(void*)(new std::string(desc)),
(void*)(&desc_copy),
SEND_ONLY_ROOTS);
}
else if(mSelectedObjects->getObjectCount() == 1)
@ -3780,7 +3784,7 @@ void LLSelectMgr::selectionSetObjectDescription(const std::string& desc)
sendListToRegions("ObjectDescription",
packAgentAndSessionID,
packObjectDescription,
(void*)(new std::string(desc)),
(void*)(&desc_copy),
SEND_INDIVIDUALS);
}
}
@ -4298,15 +4302,14 @@ void LLSelectMgr::packObjectName(LLSelectNode* node, void* user_data)
gMessageSystem->addU32Fast(_PREHASH_LocalID, node->getObject()->getLocalID());
gMessageSystem->addStringFast(_PREHASH_Name, *name);
}
delete name;
}
// static
void LLSelectMgr::packObjectDescription(LLSelectNode* node, void* user_data)
{
const std::string* desc = (const std::string*)user_data;
if(!desc->empty())
{
if(desc)
{ // Empty (non-null, but zero length) descriptions are OK
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
gMessageSystem->addU32Fast(_PREHASH_LocalID, node->getObject()->getLocalID());
gMessageSystem->addStringFast(_PREHASH_Description, *desc);

View File

@ -94,7 +94,7 @@ BOOL LLSidepanelTaskInfo::postBuild()
mPayBtn = getChild<LLButton>("pay_btn");
mPayBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onPayButtonClicked, this));
mBuyBtn = getChild<LLButton>("buy_btn");
mBuyBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onBuyButtonClicked, this));
mBuyBtn->setClickedCallback(boost::bind(&handle_buy));
mDetailsBtn = getChild<LLButton>("details_btn");
mDetailsBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onDetailsButtonClicked, this));
@ -1114,8 +1114,6 @@ void LLSidepanelTaskInfo::doClickAction(U8 click_action)
// Set click action back to its old value
U8 click_action = 0;
LLSelectMgr::getInstance()->selectionGetClickAction(&click_action);
// box->setCurrentByIndex((S32)click_action);
return;
}
}

View File

@ -1186,6 +1186,7 @@ void LLSpatialGroup::clearOcclusionState(U32 state, S32 mode)
//======================================
LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
mObjectBoxSize(1.f),
mState(0),
mGeometryBytes(0),
mSurfaceArea(0.f),

View File

@ -378,6 +378,8 @@ public:
LLVector4a mObjectBounds[2]; // bounding box (center, size) of objects in this node
LLVector4a mViewAngle;
LLVector4a mLastUpdateViewAngle;
F32 mObjectBoxSize; //cached mObjectBounds[1].getLength3()
private:
U32 mCurUpdatingTime ;

0
indra/newview/llstartup.cpp Executable file → Normal file
View File

0
indra/newview/llstartup.h Executable file → Normal file
View File

0
indra/newview/lltexturefetch.cpp Executable file → Normal file
View File

0
indra/newview/lltextureview.cpp Executable file → Normal file
View File

0
indra/newview/llviewerassetstats.cpp Executable file → Normal file
View File

0
indra/newview/llviewerassetstats.h Executable file → Normal file
View File

0
indra/newview/llviewerinventory.cpp Executable file → Normal file
View File

0
indra/newview/llviewerjointmesh.cpp Executable file → Normal file
View File

0
indra/newview/llviewerjointmesh.h Executable file → Normal file
View File

View File

@ -93,6 +93,7 @@
#include "lltoolpie.h"
#include "lltoolselectland.h"
#include "lltrans.h"
#include "llviewerdisplay.h" //for gWindowResized
#include "llviewergenericmessage.h"
#include "llviewerhelp.h"
#include "llviewermenufile.h" // init_menu_file()
@ -205,7 +206,7 @@ BOOL enable_take();
void handle_take();
void handle_object_show_inspector();
void handle_avatar_show_inspector();
bool confirm_take(const LLSD& notification, const LLSD& response);
bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle);
void handle_buy_object(LLSaleInfo sale_info);
void handle_buy_contents(LLSaleInfo sale_info);
@ -1173,6 +1174,7 @@ class LLAdvancedToggleWireframe : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
gUseWireframe = !(gUseWireframe);
gWindowResized = TRUE;
LLPipeline::updateRenderDeferred();
gPipeline.resetVertexBuffers();
return true;
@ -4511,7 +4513,10 @@ void handle_take()
LLNotification::Params params("ConfirmObjectTakeLock");
params.payload(payload);
params.functor.function(confirm_take);
// MAINT-290
// Reason: Showing the confirmation dialog resets object selection, thus there is nothing to derez.
// Fix: pass selection to the confirm_take, so that selection doesn't "die" after confirmation dialog is opened
params.functor.function(boost::bind(confirm_take, _1, _2, LLSelectMgr::instance().getSelection()));
if(locked_but_takeable_object ||
!you_own_everything)
@ -4564,7 +4569,7 @@ void handle_avatar_show_inspector()
bool confirm_take(const LLSD& notification, const LLSD& response)
bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if(enable_take() && (option == 0))

View File

@ -2706,7 +2706,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_SESSION_SEND:
{
if (!is_linden && is_busy)
if (is_busy)
{
return;
}

0
indra/newview/llviewerstats.cpp Executable file → Normal file
View File

0
indra/newview/llviewerstats.h Executable file → Normal file
View File

View File

@ -3343,10 +3343,14 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL
sMediaMap.insert(std::make_pair(id, this));
mGLTexturep = gl_image ;
if(mGLTexturep.isNull())
{
generateGLTexture() ;
}
mGLTexturep->setAllowCompression(false);
mGLTexturep->setNeedsAlphaAndPickMask(FALSE) ;
mIsPlaying = FALSE ;

View File

@ -264,6 +264,9 @@ protected:
void reorganizeVolumeList() ;
void setTexelsPerImage();
private:
friend class LLBumpImageList;
friend class LLUIImageList;
//note: do not make this function public.
/*virtual*/ LLImageGL* getGLTexture() const ;
virtual void switchToCachedImage();

View File

@ -1456,6 +1456,9 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
imagep->setAddressMode(LLTexUnit::TAM_CLAMP);
//don't compress UI images
imagep->getGLTexture()->setAllowCompression(false);
//all UI images are non-deletable
imagep->setNoDelete();

View File

@ -534,7 +534,10 @@ public:
}
addText(xpos, ypos, llformat("%d MB Vertex Data (%d MB Pooled)", LLVertexBuffer::sAllocatedBytes/(1024*1024), LLVBOPool::sBytesPooled/(1024*1024)));
addText(xpos, ypos, llformat("%d MB Index Data (%d MB Pooled, %d KIndices)", LLVertexBuffer::sAllocatedIndexBytes/(1024*1024), LLVBOPool::sIndexBytesPooled/(1024*1024), LLVertexBuffer::sIndexCount/1024));
ypos += y_inc;
addText(xpos, ypos, llformat("%d MB Vertex Data (%d MB Pooled, %d KVerts)", LLVertexBuffer::sAllocatedBytes/(1024*1024), LLVBOPool::sBytesPooled/(1024*1024), LLVertexBuffer::sVertexCount/1024));
ypos += y_inc;
addText(xpos, ypos, llformat("%d Vertex Buffers", LLVertexBuffer::sGLCount));
@ -742,40 +745,41 @@ public:
if (gSavedSettings.getBOOL("DebugShowTextureInfo"))
{
LLViewerObject* objectp = NULL ;
//objectp = = gAgentCamera.getFocusObject();
LLSelectNode* nodep = LLSelectMgr::instance().getHoverNode();
if (nodep)
{
objectp = nodep->getObject();
objectp = nodep->getObject();
}
if (objectp && !objectp->isDead())
{
S32 num_faces = objectp->mDrawable->getNumFaces() ;
std::set<LLViewerFetchedTexture*> tex_list;
for(S32 i = 0 ; i < num_faces; i++)
{
LLFace* facep = objectp->mDrawable->getFace(i) ;
if(facep)
{
//addText(xpos, ypos, llformat("ts_min: %.3f ts_max: %.3f tt_min: %.3f tt_max: %.3f", facep->mTexExtents[0].mV[0], facep->mTexExtents[1].mV[0],
// facep->mTexExtents[0].mV[1], facep->mTexExtents[1].mV[1]));
//ypos += y_inc;
addText(xpos, ypos, llformat("v_size: %.3f: p_size: %.3f", facep->getVirtualSize(), facep->getPixelArea()));
ypos += y_inc;
//const LLTextureEntry *tep = facep->getTextureEntry();
//if(tep)
//{
// addText(xpos, ypos, llformat("scale_s: %.3f: scale_t: %.3f", tep->mScaleS, tep->mScaleT)) ;
// ypos += y_inc;
//}
LLViewerTexture* tex = facep->getTexture() ;
{
LLViewerFetchedTexture* tex = dynamic_cast<LLViewerFetchedTexture*>(facep->getTexture()) ;
if(tex)
{
addText(xpos, ypos, llformat("ID: %s v_size: %.3f", tex->getID().asString().c_str(), tex->getMaxVirtualSize()));
if(tex_list.find(tex) != tex_list.end())
{
continue ; //already displayed.
}
tex_list.insert(tex);
std::string uuid_str;
tex->getID().toString(uuid_str);
uuid_str = uuid_str.substr(0,7);
addText(xpos, ypos, llformat("ID: %s v_size: %.3f", uuid_str.c_str(), tex->getMaxVirtualSize()));
ypos += y_inc;
addText(xpos, ypos, llformat("discard level: %d desired level: %d Missing: %s", tex->getDiscardLevel(),
tex->getDesiredDiscardLevel(), tex->isMissingAsset() ? "Y" : "N"));
ypos += y_inc;
}
}

0
indra/newview/llvoavatar.cpp Executable file → Normal file
View File

0
indra/newview/llvoavatar.h Executable file → Normal file
View File

0
indra/newview/llvoavatarself.cpp Executable file → Normal file
View File

0
indra/newview/llvoavatarself.h Executable file → Normal file
View File

View File

@ -4123,6 +4123,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
group->mGeometryBytes = 0;
group->mSurfaceArea = 0;
//cache object box size since it might be used for determining visibility
group->mObjectBoxSize = group->mObjectBounds[1].getLength3().getF32();
group->clearDrawMap();
mFaceList.clear();

View File

@ -839,7 +839,6 @@ void LLWorld::updateWaterObjects()
// Now, get a list of the holes
S32 x, y;
F32 water_height = gAgent.getRegion()->getWaterHeight() + 256.f;
for (x = min_x; x <= max_x; x += rwidth)
{
for (y = min_y; y <= max_y; y += rwidth)
@ -851,7 +850,7 @@ void LLWorld::updateWaterObjects()
waterp->setUseTexture(FALSE);
waterp->setPositionGlobal(LLVector3d(x + rwidth/2,
y + rwidth/2,
water_height));
256.f+DEFAULT_WATER_HEIGHT));
waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, 512.f));
gPipeline.createObject(waterp);
mHoleWaterObjects.push_back(waterp);
@ -908,7 +907,7 @@ void LLWorld::updateWaterObjects()
}
waterp->setRegion(gAgent.getRegion());
LLVector3d water_pos(water_center_x, water_center_y, water_height) ;
LLVector3d water_pos(water_center_x, water_center_y, 256.f+DEFAULT_WATER_HEIGHT) ;
LLVector3 water_scale((F32) dim[0], (F32) dim[1], 512.f);
//stretch out to horizon

View File

@ -187,6 +187,7 @@ F32 LLPipeline::RenderShadowFOVCutoff;
BOOL LLPipeline::CameraOffset;
F32 LLPipeline::CameraMaxCoF;
F32 LLPipeline::CameraDoFResScale;
F32 LLPipeline::RenderAutoHideSurfaceAreaLimit;
const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
@ -592,6 +593,7 @@ void LLPipeline::init()
gSavedSettings.getControl("CameraOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
gSavedSettings.getControl("CameraMaxCoF")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
gSavedSettings.getControl("CameraDoFResScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
}
LLPipeline::~LLPipeline()
@ -1017,6 +1019,7 @@ void LLPipeline::refreshCachedSettings()
CameraOffset = gSavedSettings.getBOOL("CameraOffset");
CameraMaxCoF = gSavedSettings.getF32("CameraMaxCoF");
CameraDoFResScale = gSavedSettings.getF32("CameraDoFResScale");
RenderAutoHideSurfaceAreaLimit = gSavedSettings.getF32("RenderAutoHideSurfaceAreaLimit");
updateRenderDeferred();
}
@ -1138,7 +1141,7 @@ void LLPipeline::createGLBuffers()
LLImageGL::generateTextures(1, &mNoiseMap);
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap);
LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise);
LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise, false);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
@ -1153,7 +1156,7 @@ void LLPipeline::createGLBuffers()
LLImageGL::generateTextures(1, &mTrueNoiseMap);
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mTrueNoiseMap);
LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise);
LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise, false);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
@ -1209,7 +1212,7 @@ void LLPipeline::createLUTBuffers()
LLImageGL::generateTextures(1, &mLightFunc);
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);
LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_R8, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls);
LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_R8, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);
@ -3367,7 +3370,9 @@ void LLPipeline::postSort(LLCamera& camera)
{
LLSpatialGroup* group = *i;
if (sUseOcclusion &&
group->isOcclusionState(LLSpatialGroup::OCCLUDED))
group->isOcclusionState(LLSpatialGroup::OCCLUDED) ||
(RenderAutoHideSurfaceAreaLimit > 0.f &&
group->mSurfaceArea > RenderAutoHideSurfaceAreaLimit*llmax(group->mObjectBoxSize, 10.f)))
{
continue;
}

View File

@ -852,6 +852,7 @@ public:
static BOOL CameraOffset;
static F32 CameraMaxCoF;
static F32 CameraDoFResScale;
static F32 RenderAutoHideSurfaceAreaLimit;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);

View File

@ -132,6 +132,28 @@
name="vbo"
tool_tip="Enabling this on modern hardware gives a performance gain. However, older hardware often has poor implementations of VBOs and you may get crashes when this is enabled."
width="315" />
<text
type="string"
length="1"
follows="left|top"
height="16"
layout="topleft"
left="10"
name="tc label"
top_pad="10"
width="188">
Enable S3TC:
</text>
<check_box
control_name="RenderCompressTextures"
height="16"
initial_value="true"
label="Enable Texture Compression (requires restart)"
layout="topleft"
left_pad="10"
name="texture compression"
tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality."
width="315" />
<slider
control_name="TextureMemory"
decimal_digits="0"

View File

@ -155,6 +155,7 @@
name="object_name"
top_delta="0"
translate="false"
parse_urls="false"
use_ellipses="true"
width="185">
Consetetur Sadipscing

View File

@ -1243,6 +1243,25 @@ Visit [_URL] for more information?
<tag>fail</tag>
</notification>
<notification
icon="alertmodal.tga"
name="IntelOldDriver"
type="alertmodal">
There is likely a newer driver for your graphics chip. Updating graphics drivers can substantially improve performance.
Visit [_URL] to check for driver updates?
<tag>confirm</tag>
<url option="0" name="url">
http://www.intel.com/p/en_US/support/detect/graphics
</url>
<usetemplate
ignoretext="My graphics driver is out of date"
name="okcancelignore"
notext="No"
yestext="Yes"/>
<tag>fail</tag>
</notification>
<notification
icon="alertmodal.tga"
name="UnknownGPU"

View File

@ -267,19 +267,19 @@
<combo_box.item
label="Touch (default)"
name="Touch/grab(default)"
value="Touch/grab (default)" />
value="Touch" />
<combo_box.item
label="Sit on object"
name="Sitonobject"
value="Sit on object" />
value="Sit" />
<combo_box.item
label="Buy object"
name="Buyobject"
value="Buy object" />
value="Buy" />
<combo_box.item
label="Pay object"
name="Payobject"
value="Pay object" />
value="Pay" />
<combo_box.item
label="Open"
name="Open"

View File

@ -2892,6 +2892,18 @@ M キーを押して変更します。
次の住人と共有:
[RESIDENTS]
<usetemplate name="okcancelbuttons" notext="取り消し" yestext="Ok"/>
</notification>
<notification name="ShareFolderConfirmation">
フォルダは一度に 1 つしか共有できません。
次のアイテムを共有しますか?
&lt;nolink&gt;[ITEMS]&lt;/nolink&gt;
次の住人と共有:
[RESIDENTS]
<usetemplate name="okcancelbuttons" notext="取り消し" yestext="Ok"/>
</notification>

0
indra/newview/tests/llviewerassetstats_test.cpp Executable file → Normal file
View File