Commit Graph

13 Commits

Author SHA1 Message Date
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
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
722b6b86ba Add OpenGL test framework with logging and screenshot comparison
- Unified resolution to 1280x720 (same as D3D12)
- Added XCEngine Logger integration for debug output
- Added screenshot capture at frame 30 (glReadPixels -> PPM)
- Added run.bat test script
- Added compare_ppm.py for screenshot comparison
- Added GT.ppm reference image
- Added README.md documentation
- Updated CMakeLists.txt to link XCEngine library

Test: OpenGL rendering test passed (screenshot comparison 100% match)
2026-03-16 15:55:49 +08:00
77a121fc4f 精简 OpenGL 测试代码,移除冗余功能 2026-03-16 14:31:21 +08:00
d2d45bd973 Add OpenGL test project with backpack model and textures 2026-03-16 14:19:32 +08:00
2b3ac27243 Add OpenGL backend project and third phase plan 2026-03-16 13:18:53 +08:00