Class BufferedRTHandleSystem | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class BufferedRTHandleSystem

    Implement a multiple buffering for RenderTextures.

    Inheritance
    System.Object
    BufferedRTHandleSystem
    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
    System.Int32 bufferId

    The buffer to allocate.

    Func<RTHandleSystem, System.Int32, RTHandleSystem.RTHandle> allocator

    The functor to use for allocation.

    System.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
    System.Int32 bufferId

    Defines the buffer to use.

    System.Int32 frameIndex
    Returns
    Type Description
    RTHandleSystem.RTHandle

    The frame RT or null when the bufferId was not previously allocated (AllocBuffer(Int32, Func<RTHandleSystem, Int32, RTHandleSystem.RTHandle>, Int32)).

    ReleaseAll()

    Deallocate and clear all buffers.

    Declaration
    public void ReleaseAll()

    SetReferenceSize(Int32, Int32, Boolean, MSAASamples)

    Set the reference size for this RT Handle System (SetReferenceSize(Int32, Int32, Boolean, MSAASamples))

    Declaration
    public void SetReferenceSize(int width, int height, bool msaa, MSAASamples msaaSamples)
    Parameters
    Type Name Description
    System.Int32 width

    The width of the RTs of this buffer.

    System.Int32 height

    The height of the RTs of this buffer.

    System.Boolean msaa

    Whether this buffer use MSAA.

    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()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023