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


C++ LLSpatialGroup::isDead方法代码示例

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


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

示例1: renderAlphaHighlight

void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask)
{
	for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
	{
		LLSpatialGroup* group = *i;
		if (group->mSpatialPartition->mRenderByGroup &&
			!group->isDead())
		{
			LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];	

			for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)	
			{
				LLDrawInfo& params = **k;
				
				if (params.mParticle)
				{
					continue;
				}

				LLRenderPass::applyModelMatrix(params);
				if (params.mGroup)
				{
					params.mGroup->rebuildMesh();
				}
				params.mVertexBuffer->setBuffer(mask);
				params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
				gPipeline.addTrianglesDrawn(params.mCount/3);
			}
		}
	}
}
开发者ID:catface,项目名称:catfacebase,代码行数:31,代码来源:lldrawpoolalpha.cpp

示例2: renderAlphaHighlight

void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask, std::vector<LLSpatialGroup*>& groups)
{
#if !LL_RELEASE_FOR_DOWNLOAD
	LLGLState::checkClientArrays(mask);
#endif

	LLSpatialBridge* last_bridge = NULL;
	LLSpatialPartition* last_part = NULL;
	glPushMatrix();
	
	for (std::vector<LLSpatialGroup*>::iterator i = groups.begin(); i != groups.end(); ++i)
	{
		LLSpatialGroup* group = *i;
		if (group->mSpatialPartition->mRenderByGroup &&
			!group->isDead())
		{
			LLSpatialPartition* part = group->mSpatialPartition;
			if (part != last_part)
			{
				LLSpatialBridge* bridge = part->asBridge();
				if (bridge != last_bridge)
				{
					glPopMatrix();
					glPushMatrix();
					if (bridge)
					{
						glMultMatrixf((F32*) bridge->mDrawable->getRenderMatrix().mMatrix);
					}
					last_bridge = bridge;
				}
				
				last_part = part;
			}

			LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];	

			for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)	
			{
				LLDrawInfo& params = **k;
				
				if (params.mParticle)
				{
					continue;
				}
				params.mVertexBuffer->setBuffer(mask);
				U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer();
				glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
									GL_UNSIGNED_INT, indices_pointer+params.mOffset);
				
				addIndicesDrawn(params.mCount);
			}
		}
	}
	glPopMatrix();
}
开发者ID:Boy,项目名称:netbook,代码行数:55,代码来源:lldrawpoolalpha.cpp

示例3: renderAlphaHighlight

void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask)
{
	for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
	{
		LLSpatialGroup* group = *i;
		if (group->mSpatialPartition->mRenderByGroup &&
			!group->isDead())
		{
			LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];	

			for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)	
			{
				LLDrawInfo& params = **k;
				
				if (params.mParticle)
				{
					continue;
				}

				LLRenderPass::applyModelMatrix(params);
				if (params.mGroup)
				{
					params.mGroup->rebuildMesh();
				}
                // KL Batching Textures, taken from renderAlpha and fiddled to enable highlighting transparent to work
				if (params.mTextureList.size() > 1)
				{
				    gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); // not sure on this
                    glColor4f(1,0,0,1);
                    // KL someone set us up the bomb... make your peace					 
					for (U32 i = 0; i < params.mTextureList.size(); ++i)
					{
						if (params.mTextureList[i].notNull())
						{
							gGL.getTexUnit(i)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE);
						}
					}
				}
			
				params.mVertexBuffer->setBuffer(mask);
				params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
				gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
			}
		}
	}
}
开发者ID:OS-Development,项目名称:VW.Kirsten,代码行数:46,代码来源:lldrawpoolalpha.cpp

示例4: renderAlpha

void LLDrawPoolAlpha::renderAlpha(U32 mask, std::vector<LLSpatialGroup*>& groups)
{
#if !LL_RELEASE_FOR_DOWNLOAD
	LLGLState::checkClientArrays(mask);
#endif

	LLSpatialBridge* last_bridge = NULL;
	LLSpatialPartition* last_part = NULL;
	glPushMatrix();
	LLGLDepthTest depth(GL_TRUE, GL_FALSE);

	for (std::vector<LLSpatialGroup*>::iterator i = groups.begin(); i != groups.end(); ++i)
	{
		LLSpatialGroup* group = *i;
		if (group->mSpatialPartition->mRenderByGroup &&
			!group->isDead())
		{
			LLSpatialPartition* part = group->mSpatialPartition;
			if (part != last_part)
			{
				LLSpatialBridge* bridge = part->asBridge();
				if (bridge != last_bridge)
				{
					glPopMatrix();
					glPushMatrix();
					if (bridge)
					{
						glMultMatrixf((F32*) bridge->mDrawable->getRenderMatrix().mMatrix);
					}
					last_bridge = bridge;
				}

//				if (!last_part || part->mDepthMask != last_part->mDepthMask)
//				{
//					glDepthMask(part->mDepthMask);
//				}
				last_part = part;
			}

			renderGroupAlpha(group,LLRenderPass::PASS_ALPHA,mask,TRUE);
		}
	}
	
	glPopMatrix();
}
开发者ID:Boy,项目名称:netbook,代码行数:45,代码来源:lldrawpoolalpha.cpp

示例5: renderAlpha

void LLDrawPoolAlpha::renderAlpha(U32 mask)
{
	BOOL initialized_lighting = FALSE;
	BOOL light_enabled = TRUE;
	//BOOL is_particle = FALSE;
	BOOL use_shaders = (LLPipeline::sUnderWaterRender && gPipeline.canUseVertexShaders())
		|| gPipeline.canUseWindLightShadersOnObjects();
	
	// check to see if it's a particle and if it's "close"
	{
		if (LLPipeline::sImpostorRender)
		{
			gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
		}
		else
		{
			gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
		}
	}

	for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
	{
		LLSpatialGroup* group = *i;
		llassert(group);
		llassert(group->mSpatialPartition);

		if (group->mSpatialPartition->mRenderByGroup &&
		    !group->isDead())
		{
			bool draw_glow_for_this_partition = mVertexShaderLevel > 0 && // no shaders = no glow.
				// All particle systems seem to come off the wire with texture entries which claim that they glow.  This is probably a bug in the data.  Suppress.
				group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_PARTICLE &&
				group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_CLOUD &&
				group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_HUD_PARTICLE;

			LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];

			for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)	
			{
				LLDrawInfo& params = **k;

				LLRenderPass::applyModelMatrix(params);

				{
					if (params.mFullbright)
					{
						// Turn off lighting if it hasn't already been so.
						if (light_enabled || !initialized_lighting)
						{
							initialized_lighting = TRUE;
							if (use_shaders) 
							{
								target_shader = fullbright_shader;
							}
							else
							{
								gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
							}
							light_enabled = FALSE;
						}
					}
					// Turn on lighting if it isn't already.
					else if (!light_enabled || !initialized_lighting)
					{
						initialized_lighting = TRUE;
						if (use_shaders) 
						{
							target_shader = simple_shader;
						}
						else
						{
							gPipeline.enableLightsDynamic();
						}
						light_enabled = TRUE;
					}

					// If we need shaders, and we're not ALREADY using the proper shader, then bind it
					// (this way we won't rebind shaders unnecessarily).
					if(use_shaders && (current_shader != target_shader))
					{
						llassert(target_shader != NULL);
						if (deferred_render && current_shader != NULL)
						{
							gPipeline.unbindDeferredShader(*current_shader);
						}
						current_shader = target_shader;
						if (deferred_render)
						{
							gPipeline.bindDeferredShader(*current_shader);
						}
						else
						{
							current_shader->bind();
						}
					}
					else if (!use_shaders && current_shader != NULL)
					{
					
						if (deferred_render)
						{
//.........这里部分代码省略.........
开发者ID:catface,项目名称:catfacebase,代码行数:101,代码来源:lldrawpoolalpha.cpp

示例6: renderAlpha

void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
{
	BOOL initialized_lighting = FALSE;
	BOOL light_enabled = TRUE;
	
	BOOL use_shaders = gPipeline.canUseVertexShaders();
		
	for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
	{
		LLSpatialGroup* group = *i;
		llassert(group);
		llassert(group->getSpatialPartition());

		if (group->getSpatialPartition()->mRenderByGroup &&
		    !group->isDead())
		{
			bool is_particle_or_hud_particle = group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_PARTICLE
													  || group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD_PARTICLE;


			// <FS:LO> Dont suspend partical processing while particles are hidden, just skip over drawing them
			if(!(gPipeline.sRenderParticles) && (
												 group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_PARTICLE ||
												 group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD_PARTICLE))
			{
				continue;
			}
			// </FS:LO>


			bool draw_glow_for_this_partition = mVertexShaderLevel > 0; // no shaders = no glow.

			
			LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_GROUP_LOOP);

			bool disable_cull = is_particle_or_hud_particle;
			LLGLDisable cull(disable_cull ? GL_CULL_FACE : 0);

			LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];

			for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)	
			{
				LLDrawInfo& params = **k;

				if ((params.mVertexBuffer->getTypeMask() & mask) != mask)
				{ //FIXME!
					LL_WARNS() << "Missing required components, skipping render batch." << LL_ENDL;
					continue;
				}

				// Fix for bug - NORSPEC-271
				// If the face is more than 90% transparent, then don't update the Depth buffer for Dof
				// We don't want the nearly invisible objects to cause of DoF effects
				if(pass == 1 && !LLPipeline::sImpostorRender)
				{
					LLFace*	face = params.mFace;
					if(face)
					{
						const LLTextureEntry* tep = face->getTextureEntry();
						if(tep)
						{
							if(tep->getColor().mV[3] < 0.1f)
								continue;
						}
					}
				}

				LLRenderPass::applyModelMatrix(params);

				LLMaterial* mat = NULL;

				if (deferred_render)
				{
					mat = params.mMaterial;
				}
				
				if (params.mFullbright)
				{
					// Turn off lighting if it hasn't already been so.
					if (light_enabled || !initialized_lighting)
					{
						initialized_lighting = TRUE;
						if (use_shaders) 
						{
							target_shader = fullbright_shader;
						}
						else
						{
							gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
						}
						light_enabled = FALSE;
					}
				}
				// Turn on lighting if it isn't already.
				else if (!light_enabled || !initialized_lighting)
				{
					initialized_lighting = TRUE;
					if (use_shaders) 
					{
						target_shader = simple_shader;
//.........这里部分代码省略.........
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:101,代码来源:lldrawpoolalpha.cpp

示例7: renderAlpha

void LLDrawPoolAlpha::renderAlpha(U32 mask)
{
	BOOL initialized_lighting = FALSE;
	BOOL light_enabled = TRUE;
	//BOOL is_particle = FALSE;
	BOOL use_shaders = (LLPipeline::sUnderWaterRender && gPipeline.canUseVertexShaders())
		|| gPipeline.canUseWindLightShadersOnObjects();
	
	// check to see if it's a particle and if it's "close"
	{
		if (LLPipeline::sImpostorRender)
		{
			gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
		}
		else
		{
			gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
		}
	}

	for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
	{
		LLSpatialGroup* group = *i;
		if (group->mSpatialPartition->mRenderByGroup &&
			!group->isDead())
		{
			LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];

			for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)	
			{
				LLDrawInfo& params = **k;

				LLRenderPass::applyModelMatrix(params);

				if (params.mTexture.notNull())
				{
					gGL.getTexUnit(0)->activate();
					gGL.getTexUnit(0)->bind(params.mTexture.get());

					if (params.mTextureMatrix)
					{
						glMatrixMode(GL_TEXTURE);
						glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
						gPipeline.mTextureMatrixOps++;
					}
				}

				if (params.mFullbright)
				{
					// Turn off lighting if it hasn't already been so.
					if (light_enabled || !initialized_lighting)
					{
						initialized_lighting = TRUE;
						if (use_shaders) 
						{
							target_shader = fullbright_shader;
						}
						else
						{
							gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
						}
						light_enabled = FALSE;
					}
				}
				// Turn on lighting if it isn't already.
				else if (!light_enabled || !initialized_lighting)
				{
					initialized_lighting = TRUE;
					if (use_shaders) 
					{
						target_shader = simple_shader;
					}
					else
					{
						gPipeline.enableLightsDynamic();
					}
					light_enabled = TRUE;
				}

				// If we need shaders, and we're not ALREADY using the proper shader, then bind it
				// (this way we won't rebind shaders unnecessarily).
				if(use_shaders && (current_shader != target_shader))
				{
					llassert(target_shader != NULL);
					if (deferred_render && current_shader != NULL)
					{
						gPipeline.unbindDeferredShader(*current_shader);
					}
					current_shader = target_shader;
					if (deferred_render)
					{
						gPipeline.bindDeferredShader(*current_shader);
					}
					else
					{
						current_shader->bind();
					}
				}
				else if (!use_shaders && current_shader != NULL)
				{
//.........这里部分代码省略.........
开发者ID:9skunks,项目名称:imprudence,代码行数:101,代码来源:lldrawpoolalpha.cpp


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