dae540e97a
docs: 更新 D3D12 测试设计文档,标记已完成项
2026-03-17 03:30:19 +08:00
8c6516183e
test: 添加 D3D12 引擎测试框架
...
- 修复 engine/CMakeLists.txt 路径问题
- 在 tests/D3D12_engine/test/ 创建测试框架
- 添加基础测试夹具 D3D12TestFixture
- 添加 13 个基础测试用例
- 所有测试通过
2026-03-17 03:29:39 +08:00
d1c7c23527
test: 添加 D3D12 测试框架基础设施
...
- 创建 engine/src/RHI/D3D12/test/ 目录
- 添加 CMakeLists.txt 构建配置
- 添加基础测试夹具 D3D12TestFixture.h
- 添加各组件测试文件框架
- 更新 tests/CMakeLists.txt 集成新测试
2026-03-17 02:51:34 +08:00
05c4dfb5eb
docs: 完善 D3D12 测试设计文档,添加构建计划
2026-03-17 02:49:20 +08:00
5683b10e65
Rename RHI header files for clarity
...
- Rename Enums.h to RHIEnums.h
- Rename Types.h to RHITypes.h
- Update all include references in D3D12 headers and test files
2026-03-17 02:39:22 +08:00
2342e3fbfc
docs: 添加 D3D12 后端测试设计文档
2026-03-17 02:32:52 +08:00
0418c61db6
Enhance OpenGLShader with comprehensive shader support
2026-03-17 02:27:13 +08:00
d75780f8c4
Enhance OpenGLSwapChain with presentation control
...
- Add PresentMode enum (Immediate, VSync, Mailbox, Fifo)
- Add SurfaceFormat enum for color formats
- Add Initialize() overloads with vsync, width/height, PresentMode
- Add Resize(), SetVSync() for runtime control
- Add GetWidth/Height/FramebufferWidth/FramebufferHeight
- Add ShouldClose, SetShouldClose, PollEvents for window management
- Implement using GLFW for window/swap control
2026-03-17 02:25:18 +08:00
be72e2f4a7
Enhance OpenGL RTV and DSV with comprehensive framebuffer support
...
OpenGLRenderTargetView:
- Add RenderTargetType enum for different texture types
- Add RenderTargetViewDesc struct with mip level, array slice, layer info
- Add Initialize() with desc parameter for 2D/2DArray/3D/Cube
- Add InitializeCubemap() for cubemap faces
- Add Bind(count) overload for multiple framebuffers
- Add Clear() methods for color and depth-stencil
- Add static BindFramebuffer/UnbindFramebuffer methods
OpenGLDepthStencilView:
- Add DepthStencilType enum for different texture types
- Add DepthStencilViewDesc struct with mip level, array slice, layer info
- Add Initialize() with desc parameter for 2D/2DArray/Cube
- Add InitializeCubemap() for cubemap faces
- Add ClearDepth, ClearStencil, ClearDepthStencil methods
- Add static BindFramebuffer/UnbindFramebuffer methods
2026-03-17 02:20:56 +08:00
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
1de66b835d
Enhance OpenGLPipelineState with comprehensive state management
...
- Add BlendOp enum for blend operations
- Add PolygonMode enum for polygon rendering mode
- Add StencilOp enum for stencil operations
- Add ScissorState and LogicalOperation structs
- Add DepthStencilState: stencil enable, read/write mask, stencil ref, stencil func, stencil ops
- Add BlendState: blend equation, color write mask, blend factor
- Add RasterizerState: polygon mode, polygon offset, depth clip, scissor test, multisample
- Add ViewportState: float coordinates with min/max depth
- Add Apply methods for individual state groups
- Add AttachShader/DetachShader for program management
- Add getter methods for state structs
2026-03-17 02:15:48 +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
a54666df11
Enhance OpenGLTexture with more texture types
...
- Add OpenGLTextureType enum (1D, 2D, 2DArray, 3D, Cube, CubeArray)
- Add OpenGLFormat enum for texture formats
- Add Initialize() method for generic texture creation
- Add InitializeCubeMap() for cubemap textures
- Add BindImage() for image load/store
- Add GenerateMipmap(), SetFiltering(), SetWrapping() methods
- Add GetType(), GetMipLevels(), GetDepth() getters
2026-03-17 02:10:53 +08:00
56c32bfbde
Enhance OpenGLBuffer with more buffer types and features
...
- Add OpenGLBufferType enum (Vertex, Index, Uniform, CopyRead, CopyWrite, etc.)
- Add Initialize() method with buffer type parameter
- Add Map/Unmap for direct buffer access
- Add SetData for dynamic updates
- Add BindBase for buffer binding to indexed targets
- Add GetType and IsDynamic getters
2026-03-17 02:08:49 +08:00
4c9c03e1a7
Refactor: use engine enums for resource states and heap types
2026-03-17 01:38:57 +08:00
393a0c67f1
Add ResourceStates::GenericRead and HeapType enums
2026-03-17 01:37:38 +08:00
ac9a62082e
Refactor: use CreateDescriptorRange
2026-03-17 01:34:00 +08:00
312699e262
Add CreateDescriptorRange helper
2026-03-17 01:33:17 +08:00
271c05d8c7
Add CreateDesc for D3D12RenderTargetView
2026-03-17 01:32:22 +08:00
9fe79681fb
Refactor: use CreateDesc for SRV
2026-03-17 01:27:37 +08:00
f615a86aab
Add CreateDesc for D3D12ShaderResourceView
2026-03-17 01:26:40 +08:00
07450e76a4
Refactor: use CreateDesc for DSV
2026-03-17 01:23:50 +08:00
83e91b16c7
Add CreateDesc for D3D12DepthStencilView
2026-03-17 01:23:23 +08:00
97653041bd
Refactor: use CreateDesc for DescriptorHeap
2026-03-17 01:22:11 +08:00
9fda349fa1
Add CreateDesc helper for DescriptorHeap
2026-03-17 01:21:17 +08:00
f4db1eafea
Refactor: use CreateSamplerDesc for cleaner sampler creation
2026-03-17 01:20:00 +08:00
3d6787b6a4
Add CreateSamplerDesc helper method
2026-03-17 01:19:21 +08:00
64bd8c5074
Refactor: use engine helpers for RootSignature and PSO creation
2026-03-17 01:16:39 +08:00
73627f62f4
Fix CreateDescriptorTable: pass descriptor ranges array instead of using static
2026-03-17 01:03:13 +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
210bc450fa
Refactor: use engine封装 for Vertex/Index Buffer operations
2026-03-17 00:47:05 +08:00
4b41a4cca1
Fix D3D12 build: add missing headers and fix CMake paths
2026-03-17 00:40:29 +08:00
5bcf9d74a3
Remove legacy RHI header files
2026-03-16 22:25:37 +08:00
472f106a12
Refactor D3D12: remove ICommandQueue, IFence dependencies
2026-03-16 21:50:54 +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
430d23b719
Replace GLFW window management with OpenGLDevice from engine
2026-03-16 18:06:57 +08:00
220494c3c5
Replace local Shader class with OpenGLShader from engine
2026-03-16 17:29:20 +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
434ba0f336
Add OpenGL backend core classes: Buffer, VertexArray
...
- Added OpenGLBuffer class for VBO/IBO management
- Added OpenGLVertexArray class for VAO management
- Updated CMakeLists.txt to include new source files
2026-03-16 16:11:24 +08:00
170df5506b
Add OpenGLShader class
...
- Created OpenGLShader class for shader compilation
- Supports compiling from file or source code
- Provides uniform setting methods (SetInt, SetFloat, SetVec3, SetMat4)
- Integrated with GLAD for OpenGL function loading
2026-03-16 16:09:09 +08:00
6aaf89e603
Add OpenGL backend: OpenGLDevice class
...
- Created OpenGLDevice class for window and OpenGL context management
- Added CreateWindow() and InitializeWithExistingWindow() methods
- Integrated with GLFW and GLAD
- Added to tests/OpenGL as test target
This is the first step in building the OpenGL RHI backend parallel to D3D12.
2026-03-16 16:07:12 +08:00
9c29cfa0a6
Rename README.md to AGENT.md for both D3D12 and OpenGL tests
2026-03-16 15:57:32 +08:00