You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb none Should be just copyright updates [CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
RenderTargetPool.h: Scene render target pool manager.
|
|
=============================================================================*/
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "RHI.h"
|
|
#include "RenderResource.h"
|
|
#include "RendererInterface.h"
|
|
#include "RenderGraphResources.h"
|
|
|
|
|
|
/**
|
|
* Pools all resources for the render graph.
|
|
*/
|
|
class RENDERCORE_API FRenderGraphResourcePool : public FRenderResource
|
|
{
|
|
public:
|
|
FRenderGraphResourcePool();
|
|
|
|
/** Allocate a buffer from a given descriptor. */
|
|
void FindFreeBuffer(
|
|
FRHICommandList& RHICmdList,
|
|
const FRDGBufferDesc& Desc,
|
|
TRefCountPtr<FPooledRDGBuffer>& Out,
|
|
const TCHAR* InDebugName);
|
|
|
|
/** Free renderer resources */
|
|
virtual void ReleaseDynamicRHI() override;
|
|
|
|
/** Good to call between levels or before memory intense operations. */
|
|
void FreeUnusedResources();
|
|
|
|
private:
|
|
/** Elements can be 0, we compact the buffer later. */
|
|
TArray< TRefCountPtr<FPooledRDGBuffer> > AllocatedBuffers;
|
|
};
|
|
|
|
/** The global render targets for easy shading. */
|
|
extern RENDERCORE_API TGlobalResource<FRenderGraphResourcePool> GRenderGraphResourcePool;
|