Class BufferedRTHandleSystem
Implement a multiple buffering for RenderTextures.
Namespace: UnityEngine.Rendering
Syntax
public class BufferedRTHandleSystem : IDisposable
Properties
maxHeight
Maximum allocated height of the Buffered RTHandle System
Declaration
public int maxHeight { get; }
Property Value
Type | Description |
---|---|
Int32 |
maxWidth
Maximum allocated width of the Buffered RTHandle System
Declaration
public int maxWidth { get; }
Property Value
Type | Description |
---|---|
Int32 |
rtHandleProperties
Current properties of the Buffered RTHandle System
Declaration
public RTHandleProperties rtHandleProperties { get; }
Property Value
Type | Description |
---|---|
RTHandleProperties |
Methods
AllocBuffer(Int32, Func<RTHandleSystem, Int32, RTHandle>, Int32)
Allocate RT handles for a buffer.
Declaration
public void AllocBuffer(int bufferId, Func<RTHandleSystem, int, RTHandle> allocator, int bufferCount)
Parameters
Type | Name | Description |
---|---|---|
Int32 | bufferId | The buffer to allocate. |
Func<RTHandleSystem, Int32, RTHandle> | allocator | The functor to use for allocation. |
Int32 | bufferCount | The number of RT handles for this buffer. |
Dispose()
Dispose implementation
Declaration
public void Dispose()
GetFrameRT(Int32, Int32)
Return the frame RT or null.
Declaration
public RTHandle GetFrameRT(int bufferId, int frameIndex)
Parameters
Type | Name | Description |
---|---|---|
Int32 | bufferId | Defines the buffer to use. |
Int32 | frameIndex |
Returns
Type | Description |
---|---|
RTHandle | The frame RT or null when the |
ReleaseAll()
Deallocate and clear all buffers.
Declaration
public void ReleaseAll()
ReleaseBuffer(Int32)
Release a buffer
Declaration
public void ReleaseBuffer(int bufferId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | bufferId | Id of the buffer that needs to be released. |
SwapAndSetReferenceSize(Int32, Int32, MSAASamples)
Swap buffers Set the reference size for this RT Handle System (
Declaration
public void SwapAndSetReferenceSize(int width, int height, MSAASamples msaaSamples)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | The width of the RTs of this buffer. |
Int32 | height | The height of the RTs of this buffer. |
MSAASamples | msaaSamples | Number of MSAA samples for this buffer. |