From a358fbc9f4ba3a7b01f600109fc86aeb2fcf96b8 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 1 Feb 2026 12:06:37 +0100 Subject: feat(asset_manager): Implement array-based caching - Refactored asset manager to use a static array for caching, improving performance and memory efficiency. - Updated asset_packer to correctly generate ASSET_LAST_ID for array sizing. - Modified asset_manager.h to use a forward declaration for AssetId. - Updated asset_manager.cc to use the conditional include for generated asset headers. - Added a test case in test_assets to verify the array-based cache and ASSET_LAST_ID logic. --- PROJECT_CONTEXT.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'PROJECT_CONTEXT.md') diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index b34805a..569683c 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -61,6 +61,13 @@ Incoming tasks in no particular order: - Update `main.cc` / `gpu.cc` to use `Renderer3D`. - Apply Gaussian Blur and Chromatic Aberration post-processing. +* **17. Implement Asset Manager Caching & Procedural Generation** + * 17a. **(Task a)** Implemented array-based caching in `asset_manager.cc` for `GetAsset` (Done). + * 17b. **(Task b)** Modify `asset_packer` to parse a new `PROC(function_name)` compression method. This will generate a record mapping an Asset ID to the procedural function's name. + * 17c. **(Task b)** Implement a runtime dispatcher in `GetAsset`. When a `PROC` asset is requested, the dispatcher will look up the function by its name and execute it. The result will then be cached. + * 17d. **(Task c)** Update the asset management test suite to include a test case with `PROC(function_name)` in `test_assets_list.txt` to verify the generation and caching. + * 17e. **(Task d)** Integrate into `demo64k` by adding a procedural noise texture to `demo_assets.txt` and using this new mechanism in the `Hybrid3DEffect` for bump mapping. + ## Session Decisions and Current State ### 3D Renderer Implementation -- cgit v1.2.3