Class BufferedRTHandleSystem
Implement a multiple buffering for RenderTextures.
Namespace: UnityEngine.Experimental.Rendering
Syntax
public class BufferedRTHandleSystem : IDisposable
Methods
AllocBuffer(Int32, Func<RTHandleSystem, Int32, RTHandleSystem.RTHandle>, Int32)
Allocate RT handles for a buffer.
Declaration
public void AllocBuffer(int bufferId, Func<RTHandleSystem, int, RTHandleSystem.RTHandle> allocator, int bufferCount)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | bufferId | The buffer to allocate. |
| Func<RTHandleSystem, Int32, RTHandleSystem.RTHandle> | allocator | The functor to use for allocation. |
| Int32 | bufferCount | The number of RT handles for this buffer. |
Dispose()
Declaration
public void Dispose()
GetFrameRT(Int32, Int32)
Return the frame RT or null.
Declaration
public RTHandleSystem.RTHandle GetFrameRT(int bufferId, int frameIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | bufferId | Defines the buffer to use. |
| Int32 | frameIndex |
Returns
| Type | Description |
|---|---|
| RTHandleSystem.RTHandle | The frame RT or null when the |
ReleaseAll()
Deallocate and clear all buffers.
Declaration
public void ReleaseAll()
SetReferenceSize(Int32, Int32, MSAASamples)
Set the reference size for this RT Handle System (
Declaration
public void SetReferenceSize(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. |
Swap()
Swap the buffers.
Take care that if the new current frame needs resizing, it will occurs during the this call.
Declaration
public void Swap()