e2050e35ec
【关键节点】RHICommandList添加RHIResourceView*方法重载实现统一资源绑定接口
...
- 在RHICommandList.h中添加7个RHIResourceView*方法重载:
- TransitionBarrier(RHIResourceView*, ...)
- SetRenderTargets(count, RHIResourceView**, RHIResourceView*)
- SetVertexBuffer(slot, RHIResourceView*, ...)
- SetIndexBuffer(RHIResourceView*, ...)
- ClearRenderTarget(RHIResourceView*, ...)
- ClearDepthStencil(RHIResourceView*, ...)
- CopyResource(RHIResourceView*, RHIResourceView*)
- D3D12CommandList完整实现:
- 通过D3D12ResourceView::GetResource()获取底层资源
- 通过D3D12ResourceView::GetCPUHandle()获取RTV/DSV句柄
- OpenGLCommandList添加stub实现保持接口一致
- 验证: 144个单元测试全部通过, 4个D3D12集成测试全部通过
2026-03-24 05:11:47 +08:00
254f794cdc
feat(RHI): add rendering state abstraction to RHICommandList
...
- Add DepthStencilState and BlendState structs to RHICommandList
- Add SetPrimitiveTopology, SetDepthStencilState, SetStencilRef,
SetBlendState, SetBlendFactor virtual methods
- Implement new methods in OpenGL backend with full state control
- Implement stub methods in D3D12 backend (states controlled via PSO)
2026-03-17 23:17:43 +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