Kohi Game Engine
vfs_asset_data Struct Reference

Represents data and properties from an asset loaded from the VFS. More...

#include <vfs.h>

Data Fields

kname asset_name
 The name of the asset stored as a kname. More...
 
kname package_name
 The name of the package containing the asset, stored as a kname. More...
 
const char * path
 A copy of the asset path. More...
 
u64 size
 The size of the asset in bytes. More...
 
union {
   const char *   text
 
   const void *   bytes
 
}; 
 
vfs_asset_flags flags
 Various flags for the given asset. More...
 
vfs_request_result result
 
u32 context_size
 
void * context
 

Detailed Description

Represents data and properties from an asset loaded from the VFS.

Field Documentation

◆ 

union { ... }

◆ asset_name

kname asset_name

The name of the asset stored as a kname.

◆ bytes

const void* bytes

The binary asset data, if a binary asset.

◆ context

void* context

The context passed in from the original request.

◆ context_size

u32 context_size

The size of the context in bytes.

◆ flags

Various flags for the given asset.

◆ package_name

kname package_name

The name of the package containing the asset, stored as a kname.

◆ path

const char* path

A copy of the asset path.

◆ result

The result of the asset load operation.

◆ size

u64 size

The size of the asset in bytes.

◆ text

const char* text

The asset data as a string, if a text asset. Zero-terminated.


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