#pragma once #include #include #include typedef struct Model Model; typedef struct Texture Texture; typedef uint64_t Hash; typedef enum AssetType { ModelAsset, TextureAsset, } AssetType; typedef struct Asset { AssetType type; Hash hash; union { Model* model; const Texture* texture; }; } Asset; DEF_MEMPOOL(asset_pool, Asset, GFX_MAX_NUM_ASSETS) typedef struct AssetCache { asset_pool assets; } AssetCache; /// Create a new asset cache. void gfx_init_asset_cache(AssetCache*); /// Destroy the asset cache. void gfx_destroy_asset_cache(AssetCache*);