UNiagaraDataInterfaceLandscape::ProvidePerInstanceDataForRenderThread

Subclasses that wish to work with GPU systems/emitters must implement this.

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

UNiagaraDataInterface::ProvidePerInstanceDataForRenderThread()

UNiagaraDataInterfaceLandscape::ProvidePerInstanceDataForRenderThread()

References

Module

Niagara

Header

/Engine/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraDataInterfaceLandscape.h

Include

#include "NiagaraDataInterfaceLandscape.h"

Source

/Engine/Plugins/FX/Niagara/Source/Niagara/Private/NiagaraDataInterfaceLandscape.cpp

Syntax

virtual void ProvidePerInstanceDataForRenderThread
(
    void * DataForRenderThread,
    void * PerInstanceData,
    const FNiagaraSystemInstanceID & SystemInstance
)

Remarks

Subclasses that wish to work with GPU systems/emitters must implement this. Those interfaces must fill DataForRenderThread with the data needed to upload to the GPU. It will be the last thing called on this data interface for a specific tick. This will be consumed by the associated FNiagaraDataInterfaceProxy.

This class does not own the memory pointed to by DataForRenderThread. It will be recycled automatically. However, if you allocate memory yourself to pass via this buffer you ARE responsible for freeing it when it is consumed by the proxy (Which is what ChaosDestruction does). Likewise, the class also does not own the memory in PerInstanceData. That pointer is the pointer passed to PerInstanceTick/PerInstanceTickPostSimulate. This will not be called if PerInstanceDataPassedToRenderThreadSize is 0.