VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::LoadedData Struct Reference

#include <framework/handlers/resourceLoader.h>

Classes

struct  PixelData
 Decoded pixel data — populated only by TextureResourceHandler. More...

Public Attributes

std::vector< uint8_t > bytes
 Raw file bytes (always available for container / font types).
std::optional< PixelDatapixelData
std::shared_ptr< void > preparedData
std::shared_ptr< void > preparsed
std::string url
 Source file path.

Detailed Description

Raw data produced by a ResourceHandler on the background I/O thread.

For textures the handler decodes pixels into PixelData so only the GPU upload step remains on the main thread. For containers and fonts the handler reads raw bytes; parsing happens on the main thread because the parsers create GPU resources.

Definition at line 34 of file resourceLoader.h.

Member Data Documentation

◆ bytes

std::vector<uint8_t> visutwin::canvas::LoadedData::bytes

Raw file bytes (always available for container / font types).

Definition at line 40 of file resourceLoader.h.

◆ pixelData

std::optional<PixelData> visutwin::canvas::LoadedData::pixelData

Definition at line 53 of file resourceLoader.h.

◆ preparedData

std::shared_ptr<void> visutwin::canvas::LoadedData::preparedData

Type-erased fully pre-processed data produced by the handler on the background thread. For GLB containers this holds a shared_ptr<PreparedGlbData> with all CPU-heavy results (pixel conversion, Draco decode, vertex/index extraction, tangent generation, animation parsing) so the main-thread callback only creates GPU resources.

Definition at line 67 of file resourceLoader.h.

◆ preparsed

std::shared_ptr<void> visutwin::canvas::LoadedData::preparsed

Type-erased pre-parsed data produced by the handler on the background thread. For GLB containers this holds a shared_ptr<tinygltf::Model> so the main-thread callback only performs fast GPU resource creation instead of the full parse.

Definition at line 59 of file resourceLoader.h.

◆ url

std::string visutwin::canvas::LoadedData::url

Source file path.

Definition at line 37 of file resourceLoader.h.


The documentation for this struct was generated from the following file: