VJ Master 1.0
Real-time audio analysis and visualisation.
Loading...
Searching...
No Matches
FST_VJ_PingPongBuffer Struct Reference

Structure representing a Ping-Pong buffer setup for compute shaders. More...

#include <ST_VJ_PingPongBuffer.h>

Public Member Functions

 FST_VJ_PingPongBuffer ()
void PingPong (FRDGBuilder &GraphBuilder)
void RegisterRW (FRDGBuilder &GraphBuilder, FString readName, FString writeName)
void RegisterR (FRDGBuilder &GraphBuilder, FString readName)
void RegisterW (FRDGBuilder &GraphBuilder, FString writeName)
 ~FST_VJ_PingPongBuffer ()
void ReleaseData ()

Public Attributes

TRefCountPtr< FRDGPooledBuffer > ReadPooled = nullptr
TRefCountPtr< FRDGPooledBuffer > WritePooled = nullptr
FRDGBufferRef ReadScopedRef = nullptr
FRDGBufferRef WriteScopedRef = nullptr
FRDGBufferSRVRef ReadScopedSRV = nullptr
FRDGBufferUAVRef WriteScopedUAV = nullptr

Detailed Description

Structure representing a Ping-Pong buffer setup for compute shaders.

Manages two GPU buffers (read and write) and handles swapping (ping-ponging) between them during compute shader execution.

Constructor & Destructor Documentation

◆ FST_VJ_PingPongBuffer()

FST_VJ_PingPongBuffer::FST_VJ_PingPongBuffer ( )
inline

Default constructor. Initializes all pointers to nullptr.

◆ ~FST_VJ_PingPongBuffer()

FST_VJ_PingPongBuffer::~FST_VJ_PingPongBuffer ( )
inline

Destructor. Ensures that all resources are properly released.

Member Function Documentation

◆ PingPong()

void FST_VJ_PingPongBuffer::PingPong ( FRDGBuilder & GraphBuilder)
inline

Swaps the read and write buffers.

Parameters
GraphBuilderThe graph builder used to create SRV and UAVs for the new buffers.

◆ RegisterR()

void FST_VJ_PingPongBuffer::RegisterR ( FRDGBuilder & GraphBuilder,
FString readName )
inline

Registers only the SRV for the read buffer.

Parameters
GraphBuilderThe graph builder for registering resources.
readNameName used for the read buffer SRV registration.

◆ RegisterRW()

void FST_VJ_PingPongBuffer::RegisterRW ( FRDGBuilder & GraphBuilder,
FString readName,
FString writeName )
inline

Registers both the SRV and UAV for the read and write buffers, respectively.

Parameters
GraphBuilderThe graph builder for registering resources.
readNameName used for the read buffer SRV registration.
writeNameName used for the write buffer UAV registration.

◆ RegisterW()

void FST_VJ_PingPongBuffer::RegisterW ( FRDGBuilder & GraphBuilder,
FString writeName )
inline

Registers only the UAV for the write buffer.

Parameters
GraphBuilderThe graph builder for registering resources.
writeNameName used for the write buffer UAV registration.

◆ ReleaseData()

void FST_VJ_PingPongBuffer::ReleaseData ( )
inline

Releases all buffer resources and resets references to nullptr.

Member Data Documentation

◆ ReadPooled

TRefCountPtr<FRDGPooledBuffer> FST_VJ_PingPongBuffer::ReadPooled = nullptr

Pooled buffer used for reading.

◆ ReadScopedRef

FRDGBufferRef FST_VJ_PingPongBuffer::ReadScopedRef = nullptr

RDG scoped reference for the read buffer.

◆ ReadScopedSRV

FRDGBufferSRVRef FST_VJ_PingPongBuffer::ReadScopedSRV = nullptr

Shader Resource View for the read buffer.

◆ WritePooled

TRefCountPtr<FRDGPooledBuffer> FST_VJ_PingPongBuffer::WritePooled = nullptr

Pooled buffer used for writing.

◆ WriteScopedRef

FRDGBufferRef FST_VJ_PingPongBuffer::WriteScopedRef = nullptr

RDG scoped reference for the write buffer.

◆ WriteScopedUAV

FRDGBufferUAVRef FST_VJ_PingPongBuffer::WriteScopedUAV = nullptr

Unordered Access View for the write buffer.


The documentation for this struct was generated from the following file:
  • H:/Games/Unreal/Aaron/FunWithShaders/Plugins/ST_VJMaster/Source/ST_AudioVisualisation/Public/Compute/Utils/ST_VJ_PingPongBuffer.h