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


C++ MarkRenderStateDirty函数代码示例

本文整理汇总了C++中MarkRenderStateDirty函数的典型用法代码示例。如果您正苦于以下问题:C++ MarkRenderStateDirty函数的具体用法?C++ MarkRenderStateDirty怎么用?C++ MarkRenderStateDirty使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: check

void UGeometryCacheComponent::UpdateTrackSectionMeshData(int32 SectionIndex, FGeometryCacheMeshData* MeshData)
{
	// Check if the index is in range and Vertices contains any data
	check(SectionIndex < TrackSections.Num() && MeshData != nullptr && "Invalid SectionIndex or Mesh Data");
	// Reset this section (in case it already existed)
	FTrackRenderData& UpdateSection = TrackSections[SectionIndex];
	
	// Number of Vertices
	const int32 NumVerts = MeshData->Vertices.Num();
	
	// Update MeshDataPointer
	UpdateSection.MeshData = MeshData;

	//if (SceneProxy)
	//{		
	//	UpdateTrackSectionVertexbuffer(SectionIndex, MeshData);
	//	UpdateTrackSectionIndexbuffer(SectionIndex, MeshData->Indices);
	//	// Will update the bounds (used for frustum culling)
	//	MarkRenderTransformDirty();
	//	MarkRenderDynamicDataDirty();
	//}
	//else
	//{
	//	// Recreate scene proxy
	//	MarkRenderStateDirty(); 
	//}

	// Update overall bounds	
	UpdateLocalBounds();

	MarkRenderStateDirty();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:32,代码来源:GeometryCacheComponent.cpp

示例2: MarkRenderStateDirty

void UMeshComponent::SetMaterial(int32 ElementIndex, UMaterialInterface* Material)
{
	if (ElementIndex >= 0)
	{
		if (Materials.IsValidIndex(ElementIndex) && (Materials[ElementIndex] == Material))
		{
			// Do nothing, the material is already set
		}
		else
		{
			// Grow the array if the new index is too large
			if (Materials.Num() <= ElementIndex)
			{
				Materials.AddZeroed(ElementIndex + 1 - Materials.Num());
			}

			// Set the material and invalidate things
			Materials[ElementIndex] = Material;
			MarkRenderStateDirty();

			if (BodyInstance.IsValidBodyInstance())
			{
				BodyInstance.UpdatePhysicalMaterials();
			}
		}
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:27,代码来源:MeshComponent.cpp

示例3: GetOwner

bool UPaperTileMapComponent::SetTileMap(class UPaperTileMap* NewTileMap)
{
	if (NewTileMap != TileMap)
	{
		// Don't allow changing the tile map if we are "static".
		AActor* Owner = GetOwner();
		if (!IsRegistered() || (Owner == nullptr) || (Mobility != EComponentMobility::Static))
		{
			TileMap = NewTileMap;

			// Need to send this to render thread at some point
			MarkRenderStateDirty();

			// Update physics representation right away
			RecreatePhysicsState();

			// Since we have new mesh, we need to update bounds
			UpdateBounds();

			return true;
		}
	}

	return false;
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:25,代码来源:PaperTileMapComponent.cpp

示例4: sizeof

void UGameplayDebuggingComponent::OnRep_UpdateEQS()
{
#if  USE_EQS_DEBUGGER
    // decode scoring data
    if (World && World->GetNetMode() == NM_Client)
    {
        TArray<uint8> UncompressedBuffer;
        int32 UncompressedSize = 0;
        const int32 HeaderSize = sizeof(int32);
        uint8* SrcBuffer = (uint8*)EQSRepData.GetData();
        FMemory::Memcpy(&UncompressedSize, SrcBuffer, HeaderSize);
        SrcBuffer += HeaderSize;
        const int32 CompressedSize = EQSRepData.Num() - HeaderSize;

        UncompressedBuffer.AddZeroed(UncompressedSize);

        FCompression::UncompressMemory((ECompressionFlags)(COMPRESS_ZLIB), (void*)UncompressedBuffer.GetData(), UncompressedSize, SrcBuffer, CompressedSize);
        FMemoryReader ArReader(UncompressedBuffer);

        ArReader << EQSLocalData;
    }

    UpdateBounds();
    MarkRenderStateDirty();
#endif //USE_EQS_DEBUGGER
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:26,代码来源:GameplayDebuggingComponent.cpp

示例5: MarkRenderStateDirty

void FGameplayDebuggerCategory_AI::OnDataPackReplicated(int32 DataPackId)
{
	if (DataPackId == PathDataPackId)
	{
		MarkRenderStateDirty();
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:7,代码来源:GameplayDebuggerCategory_AI.cpp

示例6: new

void ULineBatchComponent::DrawBox(const FBox& Box, const FMatrix& TM, const FColor& Color, uint8 DepthPriorityGroup)
{
	FVector	B[2], P, Q;
	int32 ai, aj;
	B[0] = Box.Min;
	B[1] = Box.Max;

	for( ai=0; ai<2; ai++ ) for( aj=0; aj<2; aj++ )
	{
		P.X=B[ai].X; Q.X=B[ai].X;
		P.Y=B[aj].Y; Q.Y=B[aj].Y;
		P.Z=B[0].Z; Q.Z=B[1].Z;
		new(BatchedLines) FBatchedLine(TM.TransformPosition(P), TM.TransformPosition(Q), Color, DefaultLifeTime, 0.0f, DepthPriorityGroup);

		P.Y=B[ai].Y; Q.Y=B[ai].Y;
		P.Z=B[aj].Z; Q.Z=B[aj].Z;
		P.X=B[0].X; Q.X=B[1].X;
		new(BatchedLines) FBatchedLine(TM.TransformPosition(P), TM.TransformPosition(Q), Color, DefaultLifeTime, 0.0f, DepthPriorityGroup);

		P.Z=B[ai].Z; Q.Z=B[ai].Z;
		P.X=B[aj].X; Q.X=B[aj].X;
		P.Y=B[0].Y; Q.Y=B[1].Y;
		new(BatchedLines) FBatchedLine(TM.TransformPosition(P), TM.TransformPosition(Q), Color, DefaultLifeTime, 0.0f, DepthPriorityGroup);
	}
	// LineBatcher and PersistentLineBatcher components will be updated at the end of UWorld::Tick
	MarkRenderStateDirty();
}
开发者ID:Foreven,项目名称:Unreal4-1,代码行数:27,代码来源:LineBatchComponent.cpp

示例7: TurnOnOutlineRendering

void AViewManager::TurnOnOutlineRendering()
{
	PostProcessVolume->bEnabled = true;
	for (TObjectIterator<AActor> Itr; Itr; ++Itr)
	{
		auto CurrentObject = *Itr;
		bool FoundOutlineObject = false;
		for (auto OutlineObject : PlanElements)
		{
			if (OutlineObject == CurrentObject)
			{
				FoundOutlineObject = true;
			}
		}
		if (!FoundOutlineObject)
		{
			CurrentObject->SetActorHiddenInGame(true);
		}
	}
	for (auto OutlineObject : PlanElements)
	{
		if (OutlineObject)
		{
			OutlineObject->SetActorHiddenInGame(false);
			auto RenderComponent = OutlineObject->GetRootPrimitiveComponent();
			if (RenderComponent)
			{
				RenderComponent->bRenderCustomDepth = true;
				RenderComponent->bRenderInMainPass = false;
				RenderComponent->MarkRenderStateDirty();
			}
		}
	}
}
开发者ID:AlexMcGilvray,项目名称:LevelViz,代码行数:34,代码来源:ViewManager.cpp

示例8: MarkRenderStateDirty

void ULineBatchComponent::ApplyWorldOffset(const FVector& InOffset, bool bWorldShift)
{
	Super::ApplyWorldOffset(InOffset, bWorldShift);

	bool bDirty = false;
	for (FBatchedLine& Line : BatchedLines)
	{
		Line.Start += InOffset;
		Line.End += InOffset;
		bDirty = true;
	}

	for (FBatchedPoint& Point : BatchedPoints)
	{
		Point.Position += InOffset;
		bDirty = true;
	}

	for (FBatchedMesh& Mesh : BatchedMeshes)
	{
		for (FVector& Vert : Mesh.MeshVerts)
		{
			Vert += InOffset;
			bDirty = true;
		}
	}

	if (bDirty)
	{
		MarkRenderStateDirty();
	}
}
开发者ID:Foreven,项目名称:Unreal4-1,代码行数:32,代码来源:LineBatchComponent.cpp

示例9: ClearAllInstanceBodies

bool UPaperGroupedSpriteComponent::RemoveInstance(int32 InstanceIndex)
{
	if (!PerInstanceSpriteData.IsValidIndex(InstanceIndex))
	{
		return false;
	}

	// Request navigation update
	UNavigationSystem::UpdateNavOctree(this);

	// remove instance
	PerInstanceSpriteData.RemoveAt(InstanceIndex);

	// update the physics state
	if (bPhysicsStateCreated)
	{
		// TODO: it may be possible to instead just update the BodyInstanceIndex for all bodies after the removed instance. 
		ClearAllInstanceBodies();
		CreateAllInstanceBodies();
	}

	// Indicate we need to update render state to reflect changes
	MarkRenderStateDirty();

	return true;
}
开发者ID:PopCap,项目名称:GameIdea,代码行数:26,代码来源:PaperGroupedSpriteComponent.cpp

示例10: MarkRenderStateDirty

void ULineBatchComponent::DrawLines(const TArray<FBatchedLine>& InLines)
{
	BatchedLines.Append(InLines);
	
	// LineBatcher and PersistentLineBatcher components will be updated at the end of UWorld::Tick
	MarkRenderStateDirty();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:7,代码来源:LineBatchComponent.cpp

示例11: TurnOffOutlineRendering

void AViewManager::TurnOffOutlineRendering()
{  
	PostProcessVolume->bEnabled = false;
	for (TObjectIterator<AActor> Itr; Itr; ++Itr)
	{
		auto CurrentObject = *Itr;
		if (CurrentObject)
		{
			CurrentObject->SetActorHiddenInGame(false); 
		}
	}
	for (auto OutlineObject : PlanElements)
	{
		if (OutlineObject)
		{
			OutlineObject->SetActorHiddenInGame(false);
			auto RenderComponent = OutlineObject->GetRootPrimitiveComponent();
			if (RenderComponent)
			{
				RenderComponent->bRenderCustomDepth = false;
				RenderComponent->bRenderInMainPass = true;
				RenderComponent->MarkRenderStateDirty();
			}
		}
	}
	CameraSwitchToStandardPerspective();
}
开发者ID:AlexMcGilvray,项目名称:LevelViz,代码行数:27,代码来源:ViewManager.cpp

示例12: Modify

/** Invalidates the light's cached lighting with the option to recreate the light Guids. */
void ULightComponent::InvalidateLightingCacheInner(bool bRecreateLightGuids)
{
	// Save the light state for transactions.
	Modify();

	// Detach the component from the scene for the duration of this function.
	FComponentReregisterContext ReregisterContext(this);

	// Block until the RT processes the unregister before modifying variables that it may need to access
	FlushRenderingCommands();

	StaticShadowDepthMap.Empty();
	BeginReleaseResource(&StaticShadowDepthMap);

	bPrecomputedLightingIsValid = false;

	if (bRecreateLightGuids)
	{
		// Create new guids for light.
		UpdateLightGUIDs();
	}
	else
	{
		ValidateLightGUIDs();
		ShadowMapChannel = INDEX_NONE;
	}
	
	// Send to render thread
	MarkRenderStateDirty();
}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:31,代码来源:LightComponent.cpp

示例13: new

void ULineBatchComponent::DrawLine(const FVector& Start, const FVector& End, const FLinearColor& Color, uint8 DepthPriority, const float Thickness, const float LifeTime)
{
	new(BatchedLines) FBatchedLine(Start, End, Color, LifeTime, Thickness, DepthPriority);

	// LineBatcher and PersistentLineBatcher components will be updated at the end of UWorld::Tick
	MarkRenderStateDirty();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:7,代码来源:LineBatchComponent.cpp

示例14: MarkRenderStateDirty

void UExponentialHeightFogComponent::SetDirectionalInscatteringExponent(float Value)
{
	if(DirectionalInscatteringExponent != Value)
	{
		DirectionalInscatteringExponent = Value;
		MarkRenderStateDirty();
	}
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:8,代码来源:HeightFogComponent.cpp

示例15: MarkRenderStateDirty

void ULightComponent::SetMaterial(int32 ElementIndex, UMaterialInterface* InMaterial)
{
	if (ElementIndex == 0)
	{
		LightFunctionMaterial = InMaterial;
		MarkRenderStateDirty();
	}
}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:8,代码来源:LightComponent.cpp


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