Commit Graph

44 Commits

Author SHA1 Message Date
308b3b061c Add builtin unlit surface path 2026-04-03 17:18:46 +08:00
27014e613e Adopt binding plan for builtin object-id pass 2026-04-03 17:05:38 +08:00
03bd755e0a Formalize material schema and constant layout contract 2026-04-03 16:49:30 +08:00
24a200e126 Move scene viewport shaders into editor resources 2026-04-03 15:43:21 +08:00
d4afa022c1 Add shader artifact import pipeline 2026-04-03 14:56:51 +08:00
6636834b35 feat: add unity-aligned shader contract metadata 2026-04-03 00:01:31 +08:00
b43d4048b8 test: cover builtin shader manifest resolution outside project cwd 2026-04-02 23:35:50 +08:00
ffb62ddd9c refactor: externalize builtin object id and grid shader assets 2026-04-02 23:15:19 +08:00
307e8dbd0e refactor: externalize builtin forward-lit shader asset 2026-04-02 23:04:59 +08:00
c9adc6ec5e feat: add multi-pass shader manifest loading 2026-04-02 22:54:25 +08:00
5ff97b437a fix: restore backpack material import output 2026-04-02 22:34:25 +08:00
9ce779da43 refactor: route builtin outline pass through shader assets 2026-04-02 20:18:39 +08:00
e30f5d5ffa Split mesh artifacts into material and texture artifacts 2026-04-02 19:36:16 +08:00
b2d0570b1b refactor: route builtin infinite grid through shader assets 2026-04-02 19:32:15 +08:00
11fb8f3585 refactor: route builtin object-id pass through shader assets 2026-04-02 19:17:22 +08:00
9f7d8fd68d refactor: route builtin forward pipeline through shader assets 2026-04-02 19:00:48 +08:00
dd08d8969e refactor: add minimal material gpu binding 2026-04-02 17:13:53 +08:00
70ced2d91f refactor: add shader pass and backend variants 2026-04-02 16:10:50 +08:00
4c167bec0e Implement initial Unity-style asset library cache 2026-04-02 03:03:36 +08:00
e5cb79f3ce chore: sync workspace state 2026-03-29 01:36:53 +08:00
eb5de3e3d4 Add backpack editor startup scene 2026-03-28 19:26:08 +08:00
9a5c187abc Add material render state and pipeline caching 2026-03-27 12:18:04 +08:00
f68da2e3f9 Add material render metadata and loader parsing 2026-03-27 00:30:49 +08:00
e174862b8a Import material textures with mesh assets 2026-03-26 16:22:24 +08:00
6f1cbbf305 Add mesh bounds metadata 2026-03-26 03:26:44 +08:00
cb05472205 Add assimp-based mesh import 2026-03-26 02:53:34 +08:00
d575532966 docs: update TEST_SPEC.md and README.md to reflect new directory structure
- TEST_SPEC.md: Updated test directory structure to reflect Core/Asset,
  Core/IO, and Resources/<Type> subdirectories
- TEST_SPEC.md: Updated module names and test counts (852 total)
- TEST_SPEC.md: Updated build commands for new Resources subdirectories
- README.md: Updated engine structure with Core/Asset/ and Core/IO/
- README.md: Updated Resources section with layered architecture
- README.md: Updated test coverage table with accurate counts
2026-03-24 16:14:05 +08:00
0b3423966d refactor(tests): reorganize tests directory to match engine structure
- Created tests/Core/Asset/ with tests for IResource, ResourceTypes, ResourceHandle, ResourceCache, ResourceDependencyGraph, ResourceGUID
- Created tests/Core/IO/ with tests for IResourceLoader, ResourcePath, ResourceFileSystem, FileArchive, ResourcePackage
- Reorganized tests/Resources/ into subdirectories: Texture/, Mesh/, Material/, Shader/, AudioClip/
- Added CMakeLists.txt for each new test subdirectory
- Fixed Material.h missing ResourceManager.h include (lost during engine refactor)
- tests/Core/CMakeLists.txt updated to include Asset/ and IO/ subdirectories
2026-03-24 15:44:13 +08:00
0345ce50cf refactor(tests): update Resources include paths to new directory structure
- Updated 23 test files in tests/Resources/ to use new include paths:
  - Core/Asset: IResource, ResourceTypes, ResourceHandle, ResourceManager, ResourceCache, AsyncLoader, ResourceDependencyGraph
  - Core/IO: IResourceLoader, ResourceFileSystem, ResourcePackage, ResourcePath, FileArchive
  - Resources subdirs: Texture/*, Shader/*, Mesh/*, Material/*, AudioClip/*
2026-03-24 15:02:59 +08:00
f427699ac6 refactor: improve test infrastructure and fix OpenGL GLAD initialization
- Rename D3D12Enum.h to D3D12Enums.h for naming consistency
- Fix OpenGL unit test GLAD initialization by using gladLoadGL()
  instead of gladLoadGLLoader(wglGetProcAddress) for fallback support
- Migrate remaining tests to use gtest_discover_tests for granular
  test discovery (math, core, containers, memory, threading, debug,
  components, scene, resources, input, opengl)
- Remove obsolete TEST_RESOURCES_DIR and copy_directory commands
  from OpenGL unit test CMakeLists (minimal/Res doesn't exist)
- Update TEST_SPEC.md with performance metrics and per-module
  build/test commands for faster development workflow
- Update CMake path references to use lowercase paths
2026-03-23 00:43:02 +08:00
2432a646ce Fix audio module: implement WAV parsing and audio playback
- Implement ParseWAVData and ParseWAVHeader in AudioLoader to properly
  parse WAV file headers (sample rate, channels, bits per sample, duration)
- Modify Load() to call ParseWAVData for WAV files during loading
- Add DecodeAudioData() to AudioSourceComponent to decode PCM bytes to float
- Update SetClip() to trigger audio decoding
- Fix ProcessAudio() to read from decoded data instead of empty output buffer
- Add WAV parsing unit tests (ParseWAV_Mono44100_16bit, ParseWAV_Stereo48000_16bit)

Fixes issues:
- AudioLoader::ParseWAVData was a stub returning true without parsing
- AudioLoader::Load didn't extract audio metadata from WAV headers
- AudioSourceComponent::ProcessAudio read from empty m_outputBuffer

All 167 tests pass.
2026-03-22 02:03:51 +08:00
fc7c8f6797 feat: 完成资源系统导入设置类实现
- 新增 ImportSettings 基类
- 新增 TextureImportSettings 纹理导入设置类
- 新增 MeshImportSettings 网格导入设置类
- 新增 ResourcePath 资源路径类
- 完善 CMakeLists.txt 配置
- 新增对应单元测试 (45个测试用例)
2026-03-18 13:39:32 +08:00
d2585f14b3 feat(Resources): Add ResourceDependencyGraph for resource dependency tracking
- Implement dependency graph for resource management
- Add/remove nodes and dependencies
- Reference counting support
- Circular dependency detection
- Add unit tests
2026-03-18 01:13:02 +08:00
bd69c3e124 feat(Resources): Add ResourcePackage system for asset bundling
- Implement ResourcePackageBuilder for creating .xcp packages
- Implement ResourcePackage for reading packaged assets
- Add unit tests for package builder and package reader
2026-03-18 00:49:22 +08:00
02ca59edf6 test(Resources): Add comprehensive resource system tests (8 new test files, +48 test cases)
- Add Shader tests (8 test cases)
- Add Material tests (13 test cases)
- Add FileArchive tests (7 test cases)
- Add Loader tests for Texture, Mesh, Audio, Shader, Material (4 tests each)
- Implement IResourceLoader.cpp with ReadFileData and GetExtension
- Update CMakeLists.txt to include new test files and source
2026-03-18 00:09:06 +08:00
640557cbb5 test(Resources): Add ResourceFileSystem tests (4 test cases) 2026-03-17 23:46:46 +08:00
e71edc2f46 test(Resources): Add AudioClip tests (2 test cases) 2026-03-17 23:45:06 +08:00
8cc4322d22 test(Resources): Add Texture and Mesh tests (8 test cases) 2026-03-17 23:38:29 +08:00
2325b4ba7d test(Resources): Add IResourceLoader/LoadResult tests (4 test cases) 2026-03-17 23:36:12 +08:00
0b50a57239 test(Resources): Add ResourceCache tests (8 test cases) 2026-03-17 23:07:33 +08:00
6ca1487279 test(Resources): Add ResourceHandle tests (11 test cases) 2026-03-17 22:52:30 +08:00
0e31cd804b test(Resources): Add IResource tests (3 test cases) 2026-03-17 22:50:21 +08:00
4710e6ba60 feat: Implement resource system Phase 2 - Concrete resource types
- Add Material class with shader/texture bindings and property system
- Add MaterialLoader for .mat/.json format
- Add Shader class (Vertex/Fragment/Geometry/Compute)
- Add ShaderLoader for .vert/.frag/.glsl/.hlsl
- Add AudioClip class (WAV/OGG/MP3/FLAC support)
- Add AudioLoader for audio files
- Add Texture/Mesh classes and loaders (from design doc)
- Fix HashMap iterator and String API usage
- Fix Mutex compatibility with std::lock_guard
- Update CMakeLists.txt with new resource files
- All tests pass: 11 Resources + 51 Containers
2026-03-17 22:32:27 +08:00
94bf04f06c feat(Resources): 添加资源系统基础框架
- ResourceTypes: 资源类型枚举、ResourceGUID生成
- IResource: 资源基类接口
- ResourceHandle: 资源句柄智能指针
- IResourceLoader: 加载器接口
- ResourceManager: 资源管理器(单例模式)
- ResourceCache: LRU缓存实现
- AsyncLoader: 异步加载器
- 测试框架: test_resource_types, test_resource_guid

Note: 当前与现有容器API存在编译差异,需要后续修复
2026-03-17 19:38:27 +08:00