Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
asset_manager.h File Reference
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for asset_manager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AssetHandle
 

Macros

#define ASSET_DIR_HDR   "assets/textures/hdr"
 
#define ASSET_DIR_SHADERS   "shaders"
 
#define ASSET_DIR_MODELS   "assets/models"
 

Enumerations

enum  AssetType { ASSET_TYPE_UNKNOWN = 0 , ASSET_TYPE_TEXTURE_STB , ASSET_TYPE_TEXTURE_KTX }
 
enum  AssetFlags { ASSET_FLAG_NONE = 0 , ASSET_FLAG_HDR_CAPABLE = (1U << 0U) , ASSET_FLAG_COMPRESSED = (1U << 1U) }
 

Functions

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)
 

Macro Definition Documentation

◆ ASSET_DIR_HDR

#define ASSET_DIR_HDR   "assets/textures/hdr"

◆ ASSET_DIR_MODELS

#define ASSET_DIR_MODELS   "assets/models"

◆ ASSET_DIR_SHADERS

#define ASSET_DIR_SHADERS   "shaders"

Enumeration Type Documentation

◆ AssetFlags

enum AssetFlags
Enumerator
ASSET_FLAG_NONE 
ASSET_FLAG_HDR_CAPABLE 
ASSET_FLAG_COMPRESSED 

◆ AssetType

enum AssetType
Enumerator
ASSET_TYPE_UNKNOWN 
ASSET_TYPE_TEXTURE_STB 
ASSET_TYPE_TEXTURE_KTX 

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: