コード例 #1
0
void FSlateRHIRenderingPolicy::UpdateBuffers( const FSlateWindowElementList& WindowElementList )
{
	SCOPE_CYCLE_COUNTER( STAT_SlateUpdateBufferRTTime );
	// Should only be called by the rendering thread
	check(IsInRenderingThread());

	{
		const TArray<FSlateVertex>& Vertices = WindowElementList.GetBatchedVertices();
		const TArray<SlateIndex>& Indices = WindowElementList.GetBatchedIndices();

		TSlateElementVertexBuffer<FSlateVertex>& VertexBuffer = VertexBuffers[CurrentBufferIndex];
		FSlateElementIndexBuffer& IndexBuffer = IndexBuffers[CurrentBufferIndex];

		VertexBuffer.FillBuffer( Vertices, bShouldShrinkResources );
		IndexBuffer.FillBuffer( Indices, bShouldShrinkResources );
	}
}