当前位置: 首页>>代码示例>>C++>>正文


C++ LLViewerFetchedTexture::forSculpt方法代码示例

本文整理汇总了C++中LLViewerFetchedTexture::forSculpt方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerFetchedTexture::forSculpt方法的具体用法?C++ LLViewerFetchedTexture::forSculpt怎么用?C++ LLViewerFetchedTexture::forSculpt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLViewerFetchedTexture的用法示例。


在下文中一共展示了LLViewerFetchedTexture::forSculpt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: updateSelf

/* [maintenence functions] */
void LocalBitmap::updateSelf()
{
	if ( this->linkstatus == LINK_ON || this->linkstatus == LINK_UPDATING )
	{
		/* making sure file still exists */
		if ( !gDirUtilp->fileExists(this->filename) ) { this->linkstatus = LINK_BROKEN; return; }

		/* exists, let's check if it's lastmod has changed */
		llstat temp_stat;
		LLFile::stat(this->filename, &temp_stat);
		std::time_t temp_time = temp_stat.st_mtime;

		LLSD new_last_modified = asctime( localtime(&temp_time) );
		if ( this->last_modified.asString() == new_last_modified.asString() ) { return; }

		/* here we update the image */
		LLImageRaw* new_imgraw = new LLImageRaw();
		
		if ( !decodeSelf(new_imgraw) ) { this->linkstatus = LINK_UPDATING; return; }
		else { this->linkstatus = LINK_ON; }

		LLViewerFetchedTexture* image = gTextureList.findImage(this->id);
		
		if (!image->forSculpt()) 
		    { image->createGLTexture( LOCAL_DISCARD_LEVEL, new_imgraw ); }
		else
			{ image->setCachedRawImage(-1,new_imgraw); }

		/* finalizing by updating lastmod to current */
		this->last_modified = new_last_modified;

		/* setting unit property to reflect that it has been changed */
		switch (this->bitmap_type)
		{
			case TYPE_TEXTURE:
				  { break; }

			case TYPE_SCULPT:
				  {
					  /* sets a bool to run through all visible sculpts in one go, and update the ones necessary. */
					  this->sculpt_dirty = true;
					  this->volume_dirty = true;
					  gLocalBrowser->setSculptUpdated( true );
					  break;
				  }

			case TYPE_LAYER:
				  {
					  /* sets a bool to rebake layers after the iteration is done with */
					  gLocalBrowser->setLayerUpdated( true );
					  break;
				  }

			default:
				  { break; }

		}
	}

}
开发者ID:Kiera,项目名称:Crow,代码行数:61,代码来源:floaterlocalassetbrowse.cpp


注:本文中的LLViewerFetchedTexture::forSculpt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。