Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
asset_manager.c File Reference
#include "asset_manager.h"
#include "utils.h"
#include <stdint.h>
#include <string.h>
#include <strings.h>
Include dependency graph for asset_manager.c:

Data Structures

struct  AssetRegistryEntry
 

Functions

static const AssetRegistryEntry * find_registry_entry (const char *filename)
 
bool asset_resolve_path (const char *base_dir, const char *filename, AssetHandle *out_handle)
 Tente de résoudre un fichier en une ressource reconnue.
 
bool asset_has_flag (const char *filename, uint32_t flag)
 Vérifie si un fichier correspond à un flag spécifique (ex: ASSET_FLAG_HDR_CAPABLE)
 

Variables

static const AssetRegistryEntry ASSET_REGISTRY []
 
static const size_t REGISTRY_COUNT
 

Function Documentation

◆ asset_has_flag()

bool asset_has_flag ( const char *  filename,
uint32_t  flag 
)

Vérifie si un fichier correspond à un flag spécifique (ex: ASSET_FLAG_HDR_CAPABLE)

Here is the call graph for this function:

◆ asset_resolve_path()

bool asset_resolve_path ( const char *  base_dir,
const char *  filename,
AssetHandle *  out_handle 
)

Tente de résoudre un fichier en une ressource reconnue.

Returns
true si le format est supporté et le handle rempli, false sinon.
Here is the call graph for this function:

◆ find_registry_entry()

static const AssetRegistryEntry * find_registry_entry ( const char *  filename)
static

Variable Documentation

◆ ASSET_REGISTRY

const AssetRegistryEntry ASSET_REGISTRY[]
static
Initial value:
= {
@ ASSET_TYPE_TEXTURE_KTX
Definition asset_manager.h:20
@ ASSET_TYPE_TEXTURE_STB
Definition asset_manager.h:19
@ ASSET_FLAG_COMPRESSED
Definition asset_manager.h:28
@ ASSET_FLAG_NONE
Definition asset_manager.h:26
@ ASSET_FLAG_HDR_CAPABLE
Definition asset_manager.h:27

◆ REGISTRY_COUNT

const size_t REGISTRY_COUNT
static
Initial value:
=
sizeof(ASSET_REGISTRY) / sizeof(ASSET_REGISTRY[0])
static const AssetRegistryEntry ASSET_REGISTRY[]
Definition asset_manager.c:17