diff options
| author | Graham Linden <graham@lindenlab.com> | 2013-10-16 15:02:29 -0700 | 
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2013-10-16 15:02:29 -0700 | 
| commit | a19f4ae2b31b6bdea1e2f0b6e7f9c420a93596df (patch) | |
| tree | 6463336db2d1e41eb3b34c38ac693278cde0b462 /indra | |
| parent | db18ad3b2a368986b2757aab673c3b988cd60575 (diff) | |
| parent | c7057c141c38492bfdc2bfe9d82de97a7364f01b (diff) | |
Merge 3.6.8
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llappearance/lltexlayer.cpp | 5 | ||||
| -rwxr-xr-x | indra/llrender/llcubemap.cpp | 2 | ||||
| -rwxr-xr-x | indra/llrender/llimagegl.cpp | 127 | ||||
| -rwxr-xr-x | indra/llrender/llimagegl.h | 11 | ||||
| -rwxr-xr-x | indra/llrender/llrendertarget.cpp | 8 | ||||
| -rwxr-xr-x | indra/llrender/llvertexbuffer.cpp | 22 | ||||
| -rwxr-xr-x | indra/llrender/llvertexbuffer.h | 4 | ||||
| -rwxr-xr-x | indra/llwindow/llwindowmacosx-objc.h | 1 | ||||
| -rwxr-xr-x | indra/llwindow/llwindowmacosx-objc.mm | 2 | ||||
| -rw-r--r-- | indra/newview/VIEWER_VERSION.txt | 2 | ||||
| -rw-r--r-- | indra/newview/llappdelegate-objc.mm | 13 | ||||
| -rwxr-xr-x | indra/newview/llappviewermacosx.cpp | 53 | ||||
| -rw-r--r-- | indra/newview/llavatarrenderinfoaccountant.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/lldrawpoolavatar.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llspatialpartition.cpp | 20 | ||||
| -rwxr-xr-x | indra/newview/llvoavatar.cpp | 28 | ||||
| -rwxr-xr-x | indra/newview/llvoavatarself.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/pipeline.cpp | 12 | 
18 files changed, 82 insertions, 234 deletions
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index f951a982e5..a3a8616864 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -1123,7 +1123,10 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)  	// *TODO: Is this correct?  	//gPipeline.disableLights();  	stop_glerror(); -	glDisable(GL_LIGHTING); +	if (!LLGLSLShader::sNoFixedFunction) +	{ +		glDisable(GL_LIGHTING); +	}  	stop_glerror();  	bool use_shaders = LLGLSLShader::sNoFixedFunction; diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index 362452d837..45a3b18179 100755 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -81,7 +81,7 @@ void LLCubeMap::initGL()  		{  			U32 texname = 0; -			LLImageGL::generateTextures(LLTexUnit::TT_CUBE_MAP, GL_RGB8, 1, &texname); +			LLImageGL::generateTextures(1, &texname);  			for (int i = 0; i < 6; i++)  			{ diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 6a37d31415..ab875141c5 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -54,8 +54,6 @@ S32 LLImageGL::sGlobalTextureMemoryInBytes		= 0;  S32 LLImageGL::sBoundTextureMemoryInBytes		= 0;  S32 LLImageGL::sCurBoundTextureMemory	= 0;  S32 LLImageGL::sCount					= 0; -LLImageGL::dead_texturelist_t LLImageGL::sDeadTextureList[LLTexUnit::TT_NONE]; -U32 LLImageGL::sCurTexName = 1;  BOOL LLImageGL::sGlobalUseAnisotropic	= FALSE;  F32 LLImageGL::sLastFrameTime			= 0.f; @@ -716,7 +714,12 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)  					mMipLevels = wpo2(llmax(w, h));  					//use legacy mipmap generation mode (note: making this condional can cause rendering issues) -					glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE); +					// -- but making it not conditional triggers deprecation warnings when core profile is enabled +					//		(some rendering issues while core profile is enabled are acceptable at this point in time) +					if (!LLRender::sGLCoreProfile) +					{ +						glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE); +					}  					LLImageGL::setManualImage(mTarget, 0, mFormatInternal,  								 w, h,  @@ -1084,95 +1087,19 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_  // static  static LLFastTimer::DeclareTimer FTM_GENERATE_TEXTURES("generate textures"); -void LLImageGL::generateTextures(LLTexUnit::eTextureType type, U32 format, S32 numTextures, U32 *textures) +void LLImageGL::generateTextures(S32 numTextures, U32 *textures)  {  	LLFastTimer t(FTM_GENERATE_TEXTURES); -	bool empty = true; - -	if (LLRender::sGLCoreProfile) -	{ -		switch (format) -		{ -			case GL_LUMINANCE8: format = GL_RGB8; break; -			case GL_LUMINANCE8_ALPHA8: -			case GL_ALPHA8: format = GL_RGBA8; break; -		} -	} - -	dead_texturelist_t::iterator iter = sDeadTextureList[type].find(format); -	 -	if (iter != sDeadTextureList[type].end()) -	{ -		empty = iter->second.empty(); -	} -	 -	for (S32 i = 0; i < numTextures; ++i) -	{ -		if (!empty) -		{ -			textures[i] = iter->second.front(); -			iter->second.pop_front(); -			empty = iter->second.empty(); -		} -		else -		{ -			textures[i] = sCurTexName++; -		} -	} +	glGenTextures(numTextures, textures);  }  // static -void LLImageGL::deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip_levels, S32 numTextures, U32 *textures, bool immediate) +void LLImageGL::deleteTextures(S32 numTextures, U32 *textures)  {  	if (gGLManager.mInited)  	{ -		switch (format) -		{ -			case 0: - -			// We get ARB errors in debug when attempting to use glTexImage2D with these deprecated pix formats -			// -			case GL_LUMINANCE8: -			case GL_INTENSITY8: -			case GL_ALPHA8: -				glDeleteTextures(numTextures, textures); -			break; - -			default: -			{ -				if (type == LLTexUnit::TT_CUBE_MAP || mip_levels == -1) -		{ //unknown internal format or unknown number of mip levels, not safe to reuse -			glDeleteTextures(numTextures, textures); -		} -		else -		{ -			for (S32 i = 0; i < numTextures; ++i) -			{ //remove texture from VRAM by setting its size to zero - -				for (S32 j = 0; j <= mip_levels; j++) -				{ -					gGL.getTexUnit(0)->bindManual(type, textures[i]); -							U32 internal_type = LLTexUnit::getInternalType(type); -							glTexImage2D(internal_type, j, format, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); -							stop_glerror(); -				} - -				llassert(std::find(sDeadTextureList[type][format].begin(), -								   sDeadTextureList[type][format].end(), textures[i]) ==  -								   sDeadTextureList[type][format].end()); - -				sDeadTextureList[type][format].push_back(textures[i]); -			}	 -		} +		glDeleteTextures(numTextures, textures);  	} -			break; -		} -	} -	 -	/*if (immediate) -	{ -		LLImageGL::deleteDeadTextures(); -	}*/  }  // static @@ -1300,11 +1227,11 @@ BOOL LLImageGL::createGLTexture()  	if(mTexName)  	{ -		LLImageGL::deleteTextures(mBindTarget, mFormatInternal, mMipLevels, 1, (reinterpret_cast<GLuint*>(&mTexName))) ; +		LLImageGL::deleteTextures(1, (reinterpret_cast<GLuint*>(&mTexName))) ;  	} -	LLImageGL::generateTextures(mBindTarget, mFormatInternal, 1, &mTexName); +	LLImageGL::generateTextures(1, &mTexName);  	stop_glerror();  	if (!mTexName)  	{ @@ -1419,7 +1346,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_  	}  	else  	{ -		LLImageGL::generateTextures(mBindTarget, mFormatInternal, 1, &mTexName); +		LLImageGL::generateTextures(1, &mTexName);  		stop_glerror();  		{  			llverify(gGL.getTexUnit(0)->bind(this)); @@ -1464,7 +1391,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_  	{  		sGlobalTextureMemoryInBytes -= mTextureMemory; -		LLImageGL::deleteTextures(mBindTarget, mFormatInternal, mMipLevels, 1, &old_name); +		LLImageGL::deleteTextures(1, &old_name);  		stop_glerror();  	} @@ -1593,30 +1520,6 @@ void LLImageGL::deleteDeadTextures()  {  	bool reset = false; -	/*while (!sDeadTextureList.empty()) -	{ -		GLuint tex = sDeadTextureList.front(); -		sDeadTextureList.pop_front(); -		for (int i = 0; i < gGLManager.mNumTextureImageUnits; i++) -		{ -			LLTexUnit* tex_unit = gGL.getTexUnit(i); - -			if (tex_unit && tex_unit->getCurrTexture() == tex) -			{ -				tex_unit->unbind(tex_unit->getCurrType()); -				stop_glerror(); - -				if (i > 0) -				{ -					reset = true; -				} -			} -		} -		 -		glDeleteTextures(1, &tex); -		stop_glerror(); -	}*/ -  	if (reset)  	{  		gGL.getTexUnit(0)->activate(); @@ -1633,7 +1536,7 @@ void LLImageGL::destroyGLTexture()  			mTextureMemory = 0;  		} -		LLImageGL::deleteTextures(mBindTarget,  mFormatInternal, mMipLevels, 1, &mTexName);			 +		LLImageGL::deleteTextures(1, &mTexName);			  		mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel.  		mTexName = 0;		  		mGLTextureCreated = FALSE ; diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 57a052b258..0c62dd0d33 100755 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -45,16 +45,9 @@ class LLImageGL : public LLRefCount  {  	friend class LLTexUnit;  public: -	static U32 sCurTexName; - -	//previously used but now available texture names -	// sDeadTextureList[<usage>][<internal format>] -	typedef std::map<U32, std::list<U32> > dead_texturelist_t; -	static dead_texturelist_t sDeadTextureList[LLTexUnit::TT_NONE]; -  	// These 2 functions replace glGenTextures() and glDeleteTextures() -	static void generateTextures(LLTexUnit::eTextureType type, U32 format, S32 numTextures, U32 *textures); -	static void deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip_levels, S32 numTextures, U32 *textures, bool immediate = false); +	static void generateTextures(S32 numTextures, U32 *textures); +	static void deleteTextures(S32 numTextures, U32 *textures);  	static void deleteDeadTextures();  	// Size calculation diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index 353e61105a..b82b370d6e 100755 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -194,7 +194,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)  	}  	U32 tex; -	LLImageGL::generateTextures(mUsage, color_fmt, 1, &tex); +	LLImageGL::generateTextures(1, &tex);  	gGL.getTexUnit(0)->bindManual(mUsage, tex);  	stop_glerror(); @@ -280,7 +280,7 @@ bool LLRenderTarget::allocateDepth()  	}  	else  	{ -		LLImageGL::generateTextures(mUsage, GL_DEPTH_COMPONENT24, 1, &mDepth); +		LLImageGL::generateTextures(1, &mDepth);  		gGL.getTexUnit(0)->bindManual(mUsage, mDepth);  		U32 internal_type = LLTexUnit::getInternalType(mUsage); @@ -357,7 +357,7 @@ void LLRenderTarget::release()  		}  		else  		{ -			LLImageGL::deleteTextures(mUsage, 0, 0, 1, &mDepth, true); +			LLImageGL::deleteTextures(1, &mDepth);  			stop_glerror();  		}  		mDepth = 0; @@ -389,7 +389,7 @@ void LLRenderTarget::release()  	if (mTex.size() > 0)  	{  		sBytesAllocated -= mResX*mResY*4*mTex.size(); -		LLImageGL::deleteTextures(mUsage, mInternalFormat[0], 0, mTex.size(), &mTex[0], true); +		LLImageGL::deleteTextures(mTex.size(), &mTex[0]);  		mTex.clear();  		mInternalFormat.clear();  	} diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index f168b3af14..e6f20cd40e 100755 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -91,7 +91,6 @@ LLVBOPool LLVertexBuffer::sDynamicIBOPool(GL_DYNAMIC_DRAW_ARB, GL_ELEMENT_ARRAY_  U32 LLVBOPool::sBytesPooled = 0;  U32 LLVBOPool::sIndexBytesPooled = 0; -U32 LLVBOPool::sCurGLName = 1;  std::list<U32> LLVertexBuffer::sAvailableVAOName;  U32 LLVertexBuffer::sCurVAOName = 1; @@ -125,16 +124,8 @@ U32 LLVBOPool::genBuffer()  {  	U32 ret = 0; -	if (mGLNamePool.empty()) -	{ -		ret = sCurGLName++; -	} -	else -	{ -		ret = mGLNamePool.front(); -		mGLNamePool.pop_front(); -	} - +	glGenBuffersARB(1, &ret); +	  	return ret;  } @@ -146,12 +137,9 @@ void LLVBOPool::deleteBuffer(U32 name)  		glBindBufferARB(mType, name);  		glBufferDataARB(mType, 0, NULL, mUsage); - -		llassert(std::find(mGLNamePool.begin(), mGLNamePool.end(), name) == mGLNamePool.end()); - -		mGLNamePool.push_back(name); -  		glBindBufferARB(mType, 0); + +		glDeleteBuffersARB(1, &name);  	}  } @@ -1333,7 +1321,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)  		//actually allocate space for the vertex buffer if using VBO mapping  		flush(); -		if (gGLManager.mHasVertexArrayObject && useVBOs() && (LLRender::sGLCoreProfile || sUseVAO)) +		if (gGLManager.mHasVertexArrayObject && useVBOs() && sUseVAO)  		{  #if GL_ARB_vertex_array_object  			mGLArray = getVAOName(); diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index de58207c23..619a0cec46 100755 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -57,8 +57,6 @@ public:  	static U32 sBytesPooled;  	static U32 sIndexBytesPooled; -	static U32 sCurGLName; -  	LLVBOPool(U32 vboUsage, U32 vboType);  	const U32 mUsage; @@ -86,8 +84,6 @@ public:  		volatile U8* mClientData;  	}; -	std::list<U32> mGLNamePool; -  	typedef std::list<Record> record_list_t;  	std::vector<record_list_t> mFreeList;  	std::vector<U32> mMissCount; diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index 32b3bfb078..2cae6f3f72 100755 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -49,6 +49,7 @@ void handleQuit();  bool runMainLoop();  void initMainLoop();  void cleanupViewer(); +void handleUrl(const char* url);  /* Defined in llwindowmacosx-objc.mm: */  int createNSApp(int argc, const char **argv); diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 0354c2b717..0768d0352e 100755 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -57,7 +57,7 @@ void setupCocoa()  		[[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];  		[pool release]; -		 +  		inited = true;  	}  } diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 5b3413147c..cff2619cfb 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.6.7 +3.6.9 diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index 30476b3d22..91251ed7c0 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -54,6 +54,19 @@  	}  	[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(languageUpdated) name:@"NSTextInputContextKeyboardSelectionDidChangeNotification" object:nil]; + +    [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; +} + +- (void) handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent { +    NSString    *url= nil; +    url = [[[[NSAppleEventManager sharedAppleEventManager]// 1 +                      currentAppleEvent]// 2 +                     paramDescriptorForKeyword:keyDirectObject]// 3 +                    stringValue];// 4 + +    const char* url_utf8 = [url UTF8String]; +   handleUrl(url_utf8);  }  - (void) applicationDidBecomeActive:(NSNotification *)notification diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 316c90d9d2..2723f0b90d 100755 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -483,41 +483,24 @@ bool LLAppViewerMacOSX::getMasterSystemAudioMute()  	return (mute != 0);  } -OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) +void handleUrl(const char* url_utf8)  { -	OSErr result = noErr; -	DescType actualType; -	char buffer[1024];		// Flawfinder: ignore -	Size size; -	 -	result = AEGetParamPtr ( -		messagein, -		keyDirectObject, -		typeCString, -		&actualType, -		(Ptr)buffer, -		sizeof(buffer), -		&size);	 -	 -	if(result == noErr) -	{ -		std::string url = buffer; +    if (url_utf8) +    { +        std::string url = url_utf8; +	    // Safari 3.2 silently mangles secondlife:///app/ URLs into +	    // secondlife:/app/ (only one leading slash). +	    // Fix them up to meet the URL specification. JC +	    const std::string prefix = "secondlife:/app/"; +	    std::string test_prefix = url.substr(0, prefix.length()); +	    LLStringUtil::toLower(test_prefix); +	    if (test_prefix == prefix) +	    { +		    url.replace(0, prefix.length(), "secondlife:///app/"); +	    } -		// Safari 3.2 silently mangles secondlife:///app/ URLs into -		// secondlife:/app/ (only one leading slash). -		// Fix them up to meet the URL specification. JC -		const std::string prefix = "secondlife:/app/"; -		std::string test_prefix = url.substr(0, prefix.length()); -		LLStringUtil::toLower(test_prefix); -		if (test_prefix == prefix) -		{ -			url.replace(0, prefix.length(), "secondlife:///app/"); -		} -		 -		LLMediaCtrl* web = NULL; -		const bool trusted_browser = false; -		LLURLDispatcher::dispatch(url, "", web, trusted_browser); -	} -	 -	return(result); +	    LLMediaCtrl* web = NULL; +    	const bool trusted_browser = false; +	    LLURLDispatcher::dispatch(url, "", web, trusted_browser); +    }  } diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 5780268acb..9e3225a264 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -393,6 +393,6 @@ void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer(const LLUUID& reg  // static   bool LLAvatarRenderInfoAccountant::logRenderInfo()  { -	static LLCachedControl<bool> render_mute_logging_enabled(gSavedSettings, "RenderAutoMuteLogging"); +	static LLCachedControl<bool> render_mute_logging_enabled(gSavedSettings, "RenderAutoMuteLogging", false);  	return render_mute_logging_enabled;  } diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index ba8c449c3d..f622d5a63a 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -697,7 +697,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()  	specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP);  	normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL);  	sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); -	gPipeline.bindDeferredShader(*sVertexProgram); +	sVertexProgram->bind();  	sVertexProgram->setMinimumAlpha(0.01f);  } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index d7ae897604..00eb0c1ab1 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -89,28 +89,17 @@ class LLOcclusionQueryPool : public LLGLNamePool  public:  	LLOcclusionQueryPool()  	{ -		mCurQuery = 1; +		  	}  protected: -	std::list<GLuint> mAvailableName; -	GLuint mCurQuery; -		  	virtual GLuint allocateName()  	{  		GLuint ret = 0; -		if (!mAvailableName.empty()) -		{ -			ret = mAvailableName.front(); -			mAvailableName.pop_front(); -		} -		else -		{ -			ret = mCurQuery++; -		} - +		glGenQueriesARB(1, &ret); +	  		return ret;  	} @@ -119,8 +108,7 @@ protected:  #if LL_TRACK_PENDING_OCCLUSION_QUERIES  		LLSpatialGroup::sPendingQueries.erase(name);  #endif -		llassert(std::find(mAvailableName.begin(), mAvailableName.end(), name) == mAvailableName.end()); -		mAvailableName.push_back(name); +		glDeleteQueriesARB(1, &name);  	}  }; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 68abb8c72e..e343481b32 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -934,7 +934,7 @@ void LLVOAvatar::deleteLayerSetCaches(bool clearAll)  		}  		if (mBakedTextureDatas[i].mMaskTexName)  		{ -			LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (GLuint*)&(mBakedTextureDatas[i].mMaskTexName)); +			LLImageGL::deleteTextures(1, (GLuint*)&(mBakedTextureDatas[i].mMaskTexName));  			mBakedTextureDatas[i].mMaskTexName = 0 ;  		}  	} @@ -5521,10 +5521,7 @@ void LLVOAvatar::addChild(LLViewerObject *childp)  	LLViewerObject::addChild(childp);  	if (childp->mDrawable)  	{ -		if (!attachObject(childp)) -		{ -			mPendingAttachment.push_back(childp); -		} +		attachObject(childp);  	}  	else  	{ @@ -5558,21 +5555,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi  	if (!attachment)  	{  		llwarns << "Object attachment point invalid: " << attachmentID << llendl; - -		for (int i = 0; i < 15 && !attachment; i++) -		{ -			attachment = get_if_there(mAttachmentPoints, i, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) - -			if (attachment) -			{ -				llwarns << "Object attachment point falling back to : " << i << llendl; -			} -		} -		 -		if (!attachment) -		{ -			llerrs << "Could not find any object attachment point for: " << attachmentID << llendl; -		} +		attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest)  	}  	return attachment; @@ -5645,10 +5628,7 @@ void LLVOAvatar::lazyAttach()  	{  		if (mPendingAttachment[i]->mDrawable)  		{ -			if (!attachObject(mPendingAttachment[i])) -			{ -				still_pending.push_back(mPendingAttachment[i]); -			} +			attachObject(mPendingAttachment[i]);  		}  		else  		{ diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 15628d5ab2..9ce99444d9 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -3066,7 +3066,7 @@ void LLVOAvatarSelf::deleteScratchTextures()  		 namep;   		 namep = sScratchTexNames.getNextData() )  	{ -		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (U32 *)namep ); +		LLImageGL::deleteTextures(1, (U32 *)namep );  		stop_glerror();  	} diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b0c73d0304..5da8a78b1b 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1198,13 +1198,13 @@ void LLPipeline::releaseGLBuffers()  	if (mNoiseMap)  	{ -		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 0, 1, &mNoiseMap); +		LLImageGL::deleteTextures(1, &mNoiseMap);  		mNoiseMap = 0;  	}  	if (mTrueNoiseMap)  	{ -		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 0, 1, &mTrueNoiseMap); +		LLImageGL::deleteTextures(1, &mTrueNoiseMap);  		mTrueNoiseMap = 0;  	} @@ -1229,7 +1229,7 @@ void LLPipeline::releaseLUTBuffers()  {  	if (mLightFunc)  	{ -		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_R16F, 0, 1, &mLightFunc); +		LLImageGL::deleteTextures(1, &mLightFunc);  		mLightFunc = 0;  	}  } @@ -1323,7 +1323,7 @@ void LLPipeline::createGLBuffers()  				noise[i].mV[2] = ll_frand()*scaler+1.f-scaler/2.f;  			} -			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 1, &mNoiseMap); +			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, false); @@ -1339,7 +1339,7 @@ void LLPipeline::createGLBuffers()  				noise[i] = ll_frand()*2.0-1.0;  			} -			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 1, &mTrueNoiseMap); +			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, false);  			gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); @@ -1452,7 +1452,7 @@ void LLPipeline::createLUTBuffers()  			//  			pix_format = GL_R32F;  #endif -			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, pix_format, 1, &mLightFunc); +			LLImageGL::generateTextures(1, &mLightFunc);  			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);  			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false);  			//LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_UNSIGNED_BYTE, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false);  | 
