Commit Graph

14 Commits

Author SHA1 Message Date
6126404e3f Enhance OpenGLFence with proper synchronization
- Add FenceStatus enum for status query
- Add m_sync (GLsync) for OpenGL fence synchronization
- Add Signal(value) overload with fence value
- Add Wait(timeoutNs) with timeout support
- Add GetStatus() for async status check
- Add GetCompletedValue() and GetCurrentValue()
- Implement using glSync for proper GPU synchronization
- Replace glFinish blocking with glClientWaitSync
2026-03-17 02:17:41 +08:00
413f4c178f Enhance OpenGLCommandList with comprehensive rendering API
- Add ClearFlags, ClearColor, ClearDepth, ClearStencil, ClearDepthStencil
- Add SetVertexBuffers (multiple buffers)
- Add SetIndexBuffer with offset
- Add BindVertexArray with index buffer
- Add SetViewport with depth range, SetViewports
- Add SetScissor, SetScissorRects, EnableScissorTest
- Add depth test/write/func methods
- Add stencil test methods
- Add blending methods (enable, blend func, equation, color)
- Add culling methods (enable, cull face, front face, polygon mode)
- Add instanced drawing (DrawInstanced, DrawIndexedInstanced)
- Add indirect drawing (DrawIndirect, DrawIndexedIndirect)
- Add MultiDrawArrays, MultiDrawElements
- Add Dispatch and Compute Shader support
- Add MemoryBarrier and TextureBarrier
- Add texture/sampler binding methods
- Add buffer binding (BindBufferBase, BindBufferRange)
- Add Enable/Disable for OpenGL caps
- Add uniform setting methods
- Add query methods
- Add ReadPixels, BlitFramebuffer, CopyImageSubData
- Add framebuffer invalidation
- Add debug group push/pop
2026-03-17 02:13:02 +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
0ce312e648 Remove RHI interface inheritance from all D3D12 backend classes
- D3D12Device, D3D12CommandQueue, D3D12CommandAllocator, D3D12Fence
- D3D12DescriptorHeap, D3D12QueryHeap, D3D12RootSignature
- D3D12PipelineState, D3D12Sampler, D3D12Shader
- D3D12Buffer, D3D12Texture, D3D12SwapChain

All D3D12 backend classes now directly use D3D12 APIs without
going through RHI interface abstraction. This decouples the
D3D12 backend from the RHI abstraction layer.

Test: D3D12 rendering test passed (screenshot comparison 100% match)
2026-03-16 15:48:14 +08:00
11db594967 更新D3D12引擎日志和Unity RHI架构设计文档 2026-03-16 14:44:38 +08:00
2b3ac27243 Add OpenGL backend project and third phase plan 2026-03-16 13:18:53 +08:00
b2c7627a1b docs: 更新第二阶段计划,反映实际目录结构和已完成任务 2026-03-15 02:27:05 +08:00
f427eb2588 refactor: 删除旧的RHI实现,添加D3D12测试用例和第二阶段计划 2026-03-15 01:58:30 +08:00
d8882ab93f refactor: 移除HelloEarth示例,统一使用D3D12最小可行系统 2026-03-15 00:43:54 +08:00
6a0dfb150d docs: 添加第二阶段计划 - RHI抽象层封装 2026-03-13 21:24:02 +08:00
7c54a62f9e feat: 添加Math库和Google Test测试框架
- 新增Math库: Vector2/3/4, Matrix3/4, Quaternion, Transform, Color等
- 新增测试框架: Google Test (gtest)
- 新增140个单元测试,覆盖Vector, Matrix, Quaternion, Geometry
- VolumeRenderer支持vcpkg的NanoVDB
- 添加TESTING.md测试文档
2026-03-13 18:43:14 +08:00
faf99dfc68 docs: 添加架构设计文档 2026-03-13 01:35:46 +08:00
c992e3da24 添加开题报告和任务书文档 2026-03-12 02:36:17 +08:00
a6b73245e4 添加深入方向规划文档 2026-03-12 02:34:11 +08:00