Commit Graph

209 Commits

Author SHA1 Message Date
727b6ca249 Add Vulkan quad integration path 2026-03-27 13:52:56 +08:00
b06932724c feat(scripting): add mono csharp runtime foundation 2026-03-27 13:07:39 +08:00
134a80b334 Fix D3D12 pipeline format mapping and add transparent material scene test 2026-03-27 13:01:17 +08:00
79e7452245 Add Vulkan triangle integration path 2026-03-27 12:40:17 +08:00
9a5c187abc Add material render state and pipeline caching 2026-03-27 12:18:04 +08:00
c33404767e Add Vulkan RHI minimal backend path 2026-03-27 12:05:12 +08:00
90961f01aa Refactor renderer draw extraction to section-level items 2026-03-27 11:56:23 +08:00
f68da2e3f9 Add material render metadata and loader parsing 2026-03-27 00:30:49 +08:00
9a2d77b81d Add script runtime lifecycle skeleton 2026-03-26 20:45:41 +08:00
a78593e7e1 Add renderer phase A textured scene path 2026-03-26 20:43:17 +08:00
0921f2a459 Prepare script lifecycle and data layer 2026-03-26 20:14:58 +08:00
122495e581 Add backpack RHI integration test 2026-03-26 16:57:54 +08:00
e174862b8a Import material textures with mesh assets 2026-03-26 16:22:24 +08:00
733b573963 fix(rhi): make opengl descriptor binding set-aware 2026-03-26 15:10:03 +08:00
9218ea20b5 fix(rhi): honor firstSet in set-aware d3d12 bindings 2026-03-26 14:43:51 +08:00
476a56724f refactor(rhi): let pipeline layouts own set metadata 2026-03-26 12:40:49 +08:00
36d2f479cd refactor(rhi): untangle d3d12 descriptor bindings 2026-03-26 12:21:49 +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
d018a4c82c feat(editor): unify component registration pipeline 2026-03-26 02:24:11 +08:00
1ef3048da1 Fix OpenGL sampler and copy semantics 2026-03-26 02:14:21 +08:00
c47e871c5a Fix OpenGL device initialization and file shaders 2026-03-26 02:07:21 +08:00
5c3566774b docs: 更新 containers 和 threading 模块文档
- containers: 更新 string 类的多个方法文档
- threading: 更新 mutex 和 task-group 方法文档
2026-03-26 01:59:14 +08:00
2e17c0019c Fix OpenGL render target binding composition 2026-03-26 01:56:10 +08:00
0651666d8c Fix editor scene persistence and XC scene workflow 2026-03-26 01:26:26 +08:00
39edb0b497 Fix RHI constant binding and add sphere test 2026-03-26 01:23:29 +08:00
c5605c2a32 Align OpenGL textured integration baselines 2026-03-26 01:07:36 +08:00
9adac63b4c Fix RHI texture binding and add pure quad test 2026-03-26 00:47:12 +08:00
76c4c2ace2 Add RHI texture upload and descriptor set fixes 2026-03-26 00:04:51 +08:00
605ef56e16 Add pipeline layout support for graphics PSOs 2026-03-25 23:49:48 +08:00
2470451d96 Honor input layouts in OpenGL vertex bindings 2026-03-25 23:24:06 +08:00
1597181458 Add graphics shader support to RHI pipeline states 2026-03-25 23:19:18 +08:00
aaf9cce418 Add RHI vertex and index buffer views 2026-03-25 23:07:22 +08:00
30b5f93157 Fix RHI swap chain queue binding and restore minimal GT checks 2026-03-25 21:50:57 +08:00
04a80d10e7 refactor: Clean up RHI interface and implement descriptor set pooling
- Remove unnecessary inline keywords from RHICommandList
- Add TextureType enum for proper texture type classification
- Update DescriptorSet API to support binding with pipeline layout
- Simplify D3D12CommandList implementation
- Implement descriptor set binding with pipeline layout for both D3D12 and OpenGL
2026-03-25 20:50:40 +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
5ade399df2 refactor: Clean up D3D12 debug logging and rename CompileShader
- Remove debug OutputDebugStringA and file logging from D3D12Device
- Rename CompileShader to CreateShader for API consistency
2026-03-25 19:01:47 +08:00
712e975610 refactor: Refactor OpenGL backend to use OpenGLEnums
Use centralized OpenGLEnums.h for enum conversion:
- Remove local ToGL* functions from OpenGLCommandList
- Replace with ToOpenGL() and ToOpenGLClearBuffer() from OpenGLEnums
- Simplify OpenGLTexture, OpenGLBuffer, OpenGLSampler, etc.
2026-03-25 19:01:36 +08:00
e323b45595 feat: Add OpenGLEnums.h for unified enum conversion
Add OpenGLEnums.h providing centralized OpenGL enum conversion functions:
- ToOpenGL() for primitive types
- ToOpenGLClearBuffer() for clear buffer flags
- Simplifies OpenGL backend code by removing local enum mapping functions
2026-03-25 19:01:16 +08:00
b11f59e144 Fix RHI D3D12 RTV creation and GetFormat bug
1. Add ALLOW_RENDER_TARGET flag for color textures in CreateTexture
   - This was the root cause of 5 failing RTV-related tests
   - Without this flag, creating RTV caused device removal

2. Add FromD3D12() reverse conversion for Format enum
   - GetFormat() was incorrectly casting DXGI_FORMAT to Format
   - DXGI_FORMAT_R8G8B8A8_UNORM=28 but Format::R8G8B8A8_UNorm=3
   - Added FromD3D12() to properly convert back

3. Update RHITestFixture to pre-create CommandQueue and Fence
   - Prevents potential timing issues with GPU synchronization

4. Update RHITestFixture tests to pass correct format in ResourceViewDesc
   - Previously passed empty desc.format=0 which caused issues

All 234 RHI unit tests now pass (117 D3D12 + 117 OpenGL)
2026-03-25 18:12:50 +08:00
b0d0576763 Fix editor selection system: SelectionManager ID types and Scene lookup
- SelectionManager now implements ISelectionManager interface with uint64_t IDs
- Remove SelectionManager/SceneManager circular dependency via EventBus
- Add Scene::FindByID() for proper ID-based entity lookup
- SceneManager::GetEntity() now uses FindByID instead of name-based Find
- Fix editor CMakeLists.txt XCEngine.lib path
- EventBus now thread-safe with shared_mutex
2026-03-25 17:51:15 +08:00
295459067f Fix RHI format conversion and add debug logging for D3D12 tests 2026-03-25 17:30:16 +08:00
16e2065c6c Unified logging: Replace LogSystem with EditorConsoleSink
- Created EditorConsoleSink (implements ILogSink interface)
- EditorConsoleSink stores logs in memory buffer (max 1000 entries)
- Added to Debug::Logger in Application::Initialize()
- ConsolePanel now reads from EditorConsoleSink via static GetInstance()
- Removed separate LogSystem singleton
- Removed editor/src/Core/LogEntry.h (no longer needed)

Now Editor and Engine share the same Debug::Logger, with ConsolePanel
displaying logs via EditorConsoleSink.
2026-03-25 16:13:02 +08:00
008fb98dee refactor(editor): Complete architecture refactoring
- SceneManager: remove singleton, use dependency injection via EditorContext
- SelectionManager: already interface-based via ISelectionManager
- Panel: now receives IEditorContext for accessing managers
- HierarchyPanel: migrated to use IEditorContext instead of singletons
- Add ISceneManager interface and SceneManagerImpl
- EditorContextImpl: holds all editor subsystems

Architecture now follows dependency injection pattern:
Application -> EditorContext -> SceneManager/SelectionManager
EditorLayer -> Panels (receive context via SetContext)

All Manager singletons removed: EditorSceneManager::Get(), SelectionManager::Get()
2026-03-25 15:51:27 +08:00
2313124cc5 RHI: Add CreateRenderPass/CreateFramebuffer to RHIDevice interface 2026-03-25 13:02:57 +08:00
f808f8d197 RHI: Replace IsFinalized/Finalize with IsValid/EnsureValid
Unified PSO validation semantics across D3D12 and OpenGL backends:
- IsValid() returns whether PSO is ready to use
- EnsureValid() ensures PSO is valid (compiles if needed)

Behavior by backend:
- D3D12: IsValid=false after creation, true after EnsureValid() with shaders
- OpenGL: IsValid always=true (immediate model)

Also added test_pipeline_state.cpp with 10 tests for RHIPipelineState.
2026-03-25 12:28:33 +08:00
32c04b86b7 RHI: Add embedded shader source support via ShaderCompileDesc
- Add ShaderLanguage enum (HLSL, GLSL, SPIRV)
- Extend ShaderCompileDesc with source/sourceLanguage fields
- D3D12Device::CompileShader supports both file and embedded source
- OpenGLDevice::CompileShader supports embedded GLSL source
- Refactor test_shader.cpp to use embedded source for both backends

This enables consistent shader compilation across D3D12 and OpenGL
backends while maintaining backend-specific shader language support.
2026-03-25 12:00:26 +08:00
c9e459c179 Editor: UI panels and GameObject updates 2026-03-25 01:23:08 +08:00
dc970d215b RHI: Internalize OpenGL-specific methods in OpenGLDevice
- Remove GetTextureUnitAllocator/GetUniformBufferManager from public interface
- Remove SwapBuffers from public interface (friend OpenGLSwapChain can still access)
- Add MakeContextCurrent() and GetNativeContext() public methods
- Update integration tests to use MakeContextCurrent() instead of wglMakeCurrent
- Update RenderDoc calls to use GetNativeContext() instead of GetGLContext()
- Remove Device_SwapBuffers_NoErrors test (SwapBuffers no longer public)
- Mark Priority 7 as completed in RHI_Design_Issues.md
2026-03-25 01:20:38 +08:00
6328ac8d37 RHI: Add Compute Pipeline abstraction with D3D12 and OpenGL support
- Add SetComputeShader/GetComputeShader/HasComputeShader to RHIPipelineState
- Add m_computePipelineState for D3D12 compute PSO
- Add m_computeProgram/m_computeShader for OpenGL
- Fix OpenGLCommandList::DispatchCompute bug (was ignoring x,y,z params)
- Fix OpenGLShader::GetID usage in OpenGLPipelineState
- Mark Priority 8 as completed in RHI_Design_Issues.md
2026-03-25 01:05:03 +08:00