class

RenderTargetAsset

A texture the renderer writes instead of the cook — UE's TextureRenderTarget2D. The .mrt file holds only the size and the clear colour; the image is created at CreateGPU and filled by whatever captures into it (a SceneCaptureComponent naming this asset). It IS a TextureAsset, so a material's Texture Sample slot, a UI image or any other texture consumer binds it without knowing the difference, and the material's descriptor set stays valid across captures because the image object never changes — only its contents do.

Module
AssetSystem
Header
#include "AssetSystem/Assets/RenderTargetAsset.h"
Namespace
Mowo

Constructors

SignatureNameDescription
RenderTargetAsset()RenderTargetAsset
~RenderTargetAsset() override~RenderTargetAsset

Public functions

ReturnsNameDescription
boolLoad
voidUnload
boolCreateGPU
voidDestroyGPU
boolCanAdoptLoadedState
boolSaveToFile
uint32_tGetTargetWidth
uint32_tGetTargetHeight
voidSetTargetSize
const Vec4&GetClearColor
voidSetClearColor
Ref<Image2D>GetTargetImageThe image captures blit into; null until CreateGPU.
uint32_tGetWriteCountHow many captures have written the target since it was created — a consumer that must not sample an unwritten target reads this.
voidNoteWritten
uint64_tEstimatedMemoryUsage

Function details

RenderTargetAsset

C++
RenderTargetAsset()

~RenderTargetAsset

C++
~RenderTargetAsset() override

Load

C++
bool Load(const std::string& path) override

Unload

C++
void Unload() override

CreateGPU

C++
bool CreateGPU(const GPUContext& ctx) override

DestroyGPU

C++
void DestroyGPU() override

CanAdoptLoadedState

C++
bool CanAdoptLoadedState() const override

SaveToFile

C++
bool SaveToFile(const std::string& path) const

GetTargetWidth

C++
uint32_t GetTargetWidth() const

GetTargetHeight

C++
uint32_t GetTargetHeight() const

SetTargetSize

C++
void SetTargetSize(uint32_t width, uint32_t height)

GetClearColor

C++
const Vec4& GetClearColor() const

SetClearColor

C++
void SetClearColor(const Vec4& color)

GetTargetImage

C++
Ref<Image2D> GetTargetImage() const

The image captures blit into; null until CreateGPU.

GetWriteCount

C++
uint32_t GetWriteCount() const

How many captures have written the target since it was created — a consumer that must not sample an unwritten target reads this.

NoteWritten

C++
void NoteWritten()

EstimatedMemoryUsage

C++
uint64_t EstimatedMemoryUsage() const override
Generated from AssetSystem/Assets/RenderTargetAsset.h via assetsystem.json · Nov 4, 2026Version 1.0.0