Commit Graph

68 Commits

Author SHA1 Message Date
0921f2a459 Prepare script lifecycle and data layer 2026-03-26 20:14:58 +08:00
cb05472205 Add assimp-based mesh import 2026-03-26 02:53:34 +08:00
d018a4c82c feat(editor): unify component registration pipeline 2026-03-26 02:24:11 +08:00
0651666d8c Fix editor scene persistence and XC scene workflow 2026-03-26 01:26:26 +08:00
605ef56e16 Add pipeline layout support for graphics PSOs 2026-03-25 23:49:48 +08:00
81532983f0 refactor: Rename CompileShader to CreateShader in RHIDevice interface
- Update RHIDevice::CompileShader to CreateShader in base interface
- Add RHIScreenshot.h/cpp to CMakeLists.txt
2026-03-25 19:01:55 +08:00
cad6f586fb Editor: Fix InspectorPanel AddComponent popup crash
- Remove SeparatorText which causes PopStyleVar mismatch in ImGui
- Add stderr redirection for better error capture
- Add debug logging to InspectorPanel
- Fix EditorLayer commented out undefined functions
2026-03-25 12:56:51 +08:00
0948e0fdbe docs: Update RHI test refactoring status
- Mark P0-1 (Shader) and P0-2 (PipelineState) as completed
- Update test coverage matrix
- Add changelog v1.1
2026-03-25 12:30:05 +08:00
c6fe9547aa RHI: Add DescriptorSet abstraction for D3D12 and OpenGL backends
- Add RHIDescriptorSet base class with Update/UpdateSampler/GetNativeHandle
- Add RHIDescriptorPool with AllocateSet/FreeSet methods
- Add SetGraphicsDescriptorSets/SetComputeDescriptorSets to RHICommandList
- Implement D3D12DescriptorSet using descriptor heap allocation
- Implement OpenGLDescriptorSet using TextureUnitAllocator
- Add CreateDescriptorPool/CreateDescriptorSet factory methods to RHIDevice
- Fix unit test SetVertexBuffer -> SetVertexBuffers API
- Add SetVertexBuffer convenience method for D3D12 backward compatibility
- Update CMakeLists.txt with new source files
2026-03-25 00:26:16 +08:00
0f5d018c1a refactor(RHI): 完成 Shader uniform 设置迁移到 CommandList
- 删除 RHIShader 的 OpenGL 风格 SetMat4/SetVec3/SetInt 等方法
- 添加 UniformInfo 结构体和 GetUniformInfos/GetUniformInfo 接口
- D3D12Shader 和 OpenGLShader 实现 CacheUniformInfos
- RHICommandList 添加 SetUniform*/SetGlobal* 统一接口
- D3D12 实现 D3D12PipelineLayout 管理 root signature 映射
- 修复 D3D12CommandList::SetPipelineStateInternal 在 Reset 后未重新应用 root signature 的问题
- 更新 OpenGL 集成测试使用新的 SetUniform* API
- 所有单元测试和集成测试通过 (8/8 integration tests)
2026-03-24 19:47:22 +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
0a3fe842b9 Refactor RHI ResourceView abstraction layer for unified cross-platform interface
- Create unified RHIResourceView base interface with type-specific Initialize methods
- Implement D3D12ResourceView with RTV/DSV/SRV/UAV/CBV support
- Implement OpenGL ResourceView simulation layer using FBO, texture units, and UBO
- Add OpenGLTextureUnitAllocator for managing texture unit bindings
- Add OpenGLUniformBufferManager for UBO binding points
- Add OpenGLFramebuffer for FBO management
- Remove deprecated D3D12 view classes (RenderTargetView, DepthStencilView, etc.)
- Fix ExecuteCommandLists type confusion bug by adding GetNativeHandle to RHICommandList
- Fix test bug where Close() was called before ExecuteCommandLists
- Update all integration tests to use new D3D12ResourceView class
- All tests pass: 144 unit tests + 8 integration tests
2026-03-24 03:49:13 +08:00
067c82c3a9 refactor: RHI抽象层测试支持参数化
- 将RHITestFixture改为TestWithParam<RHIType>,支持D3D12和OpenGL双后端
- 重构RHIFactory.cpp的include结构,修复OpenGL设备创建
- 在CMakeLists.txt中添加XCENGINE_SUPPORT_OPENGL宏定义
- 更新engine/CMakeLists.txt和tests/RHI/unit/CMakeLists.txt
- 将所有TEST_F改为TEST_P以支持参数化测试

测试结果: 138 tests (D3D12: 58 passed / OpenGL: 48 passed)
2026-03-23 19:17:32 +08:00
81dc337262 feat: add RenderDocCapture to Debug module for frame capture debugging
- Add RenderDocCapture class for dynamic loading of renderdoc.dll
- Support BeginCapture/EndCapture/TriggerCapture APIs
- Add RenderDoc log category
- Add unit tests for RenderDocCapture in tests/debug
2026-03-23 17:11:01 +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
fa2d2713d7 feat: 实现 Window 与 InputModule 消息集成 2026-03-22 17:14:11 +08:00
36d3decef6 feat: 添加独立的输入系统和平台抽象层
- 新增 Platform 模块:PlatformTypes.h, Window.h, WindowsWindow
- 新增 Input 模块:InputTypes, InputEvent, InputAxis, InputModule, InputManager
- 新增 WindowsInputModule 处理 Win32 消息转换
- 将 RHI 集成测试从 render_model 迁移到 sphere
- 更新 CMakeLists.txt 添加 Platform 和 Input 模块
2026-03-22 15:21:52 +08:00
91291b2075 Add HRTF 3D spatialization audio effect 2026-03-21 12:25:42 +08:00
36119e62aa Add Equalizer DSP effect 2026-03-21 12:19:27 +08:00
00c2699542 Add Reverbation DSP effect and fix FFTFilter include paths 2026-03-21 12:16:19 +08:00
b68cde82b2 Add IAudioEffect interface and FFTFilter DSP effect using KissFFT 2026-03-21 12:08:16 +08:00
dfc948fc89 Move kissfft to engine/third_party and add AudioMixer class 2026-03-21 12:06:15 +08:00
d786914552 Engine: 添加 /FS 标志修复 MSVC PDB 冲突问题
- 在 CMakeLists.txt 中为 MSVC 编译选项添加 /FS 标志
- 添加 OpenGL Screenshot 模块支持
2026-03-21 11:56:59 +08:00
47808f5f90 Add audio module foundation: AudioTypes, AudioConfig, IAudioBackend, WASAPIBackend, AudioSystem, AudioSourceComponent, AudioListenerComponent, and third-party KissFFT library 2026-03-20 20:31:24 +08:00
00f70eccf1 Engine: 实现 Components 和 Scene 模块,包含完整单元测试
新增 Components 模块:
- Component 基类 (生命周期、启用状态管理)
- TransformComponent (本地/世界空间变换、矩阵缓存、父子层级)
- GameObject (组件管理、父子层级、激活状态、静态查找)

新增 Scene 模块:
- Scene (场景管理、对象创建销毁、查找、生命周期)
- SceneManager (单例模式、多场景管理、场景切换)

新增测试:
- test_component.cpp (12 个测试)
- test_transform_component.cpp (35 个测试)
- test_game_object.cpp (26 个测试)
- test_scene.cpp (20 个测试)
- test_scene_manager.cpp (17 个测试)

所有测试均已编译通过。
2026-03-20 20:22:04 +08:00
810b0861c5 Docs: Add audio module architecture design document
- Add XCEngine音频模块架构设计.md
- Design audio system following Unity-style architecture
- Include AudioSourceComponent, AudioListenerComponent, AudioClip, AudioMixer
- Document DSP effect system (FFT, Reverb, EQ, Compressor)
- Document 3D spatial audio with HRTF support
- Define IAudioBackend abstraction layer with WASAPI/OpenAL backends
- Outline 5-phase implementation priorities
2026-03-20 19:59:06 +08:00
fc7c8f6797 feat: 完成资源系统导入设置类实现
- 新增 ImportSettings 基类
- 新增 TextureImportSettings 纹理导入设置类
- 新增 MeshImportSettings 网格导入设置类
- 新增 ResourcePath 资源路径类
- 完善 CMakeLists.txt 配置
- 新增对应单元测试 (45个测试用例)
2026-03-18 13:39:32 +08:00
3196261e9b fix(RHI): 添加 OpenGL 源文件到 CMakeLists 并修复编译错误
- 添加 OpenGL RHI 所有源文件到 engine/CMakeLists.txt
- 修复 OpenGLPipelineState 结构体重定义问题
- 修复 BufferDesc/TextureDesc/ShaderCompileDesc API 不匹配
- 添加 OpenGLShader 缺少的基类纯虚函数实现
- 修复 HashMap 迭代器支持和 ResourceManager API 调用
2026-03-18 03:37:34 +08:00
a532cabf92 feat(RHI): 添加 RHIDescriptorPool 抽象类
- 新增 RHIDescriptorPool 抽象基类,定义描述符池统一接口
- D3D12DescriptorHeap 现在继承自 RHIDescriptorPool
- 添加 DescriptorPoolDesc 结构体,包含设备指针、类型、数量等信息
- 添加 Initialize(const DescriptorPoolDesc&) 统一初始化方法
2026-03-18 01:46:01 +08:00
70571316da feat(RHI): 添加 RHIFactory 工厂类
- 新增 RHIFactory 头文件和实现,支持通过 RHIType 或字符串创建设备
- 修复 D3D12Buffer 缺失的 Map/Unmap/SetData 实现
- 添加 RHI 工厂测试用例
- 更新 CMakeLists.txt 添加新文件
2026-03-18 01:33:15 +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
417477c2ca feat: Implement resource system Phase 4.5 - ResourceFileSystem (4 files, +305 lines) 2026-03-17 22:43:59 +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
e138fb2075 fix(RHI): 修复 OpenGL/D3D12 后端编译问题
- 修复 OpenGLCommandList 方法签名匹配 RHI 抽象接口
- 修复 OpenGLSwapChain Present/Resize 方法签名
- 添加 OpenGL 特有方法重载支持后端测试(底层逃逸)
- 暂时禁用不兼容的 Resources 模块
- 更新 OpenGL 测试 CMakeLists
2026-03-17 19:35:51 +08:00
8c6516183e test: 添加 D3D12 引擎测试框架
- 修复 engine/CMakeLists.txt 路径问题
- 在 tests/D3D12_engine/test/ 创建测试框架
- 添加基础测试夹具 D3D12TestFixture
- 添加 13 个基础测试用例
- 所有测试通过
2026-03-17 03:29:39 +08:00
988f94eb29 Add static helper methods to D3D12RootSignature and D3D12PipelineState 2026-03-17 00:57:35 +08:00
7874033379 Add RootSignatureBuilder and PipelineStateBuilder for cleaner RHI API 2026-03-17 00:52:24 +08:00
4a0f6d65d1 Remove OpenGLMesh (not needed, D3D12 has no Mesh) 2026-03-16 19:15:18 +08:00
801c563eb5 Add OpenGLMesh class to engine (not yet integrated in main.cpp) 2026-03-16 19:12:27 +08:00
bf98fa0b89 Add OpenGLRenderTargetView and OpenGLDepthStencilView 2026-03-16 19:06:21 +08:00
3cd47ea4c8 Add OpenGLSampler 2026-03-16 18:52:00 +08:00
aee4ae88db Add OpenGLFence 2026-03-16 18:48:12 +08:00
377f43260b Add OpenGLSwapChain 2026-03-16 18:41:05 +08:00
fce3d2421c Add OpenGLCommandList 2026-03-16 18:35:02 +08:00
0be91748c2 Add OpenGLPipelineState and integrate into main.cpp 2026-03-16 18:25:58 +08:00
fee738b0b9 Move OpenGL backend classes from tests/OpenGL to engine/
- Relocated OpenGLDevice, OpenGLShader, OpenGLBuffer, OpenGLVertexArray, OpenGLTexture to engine/
- Updated engine/CMakeLists.txt to include OpenGL backend source files
- Updated tests/OpenGL/CMakeLists.txt to use engine backend
- Added OpenGLTexture class implementation
2026-03-16 17:22:45 +08:00
dfbd218435 Move D3D12 cpp files to src/RHI/D3D12/ subdirectory 2026-03-15 20:50:06 +08:00
3959f74908 Add D3D12QueryHeap and D3D12UnorderedAccessView 2026-03-15 19:30:19 +08:00