- Refactor ShaderManager to use RHI abstraction (no bgfx:: exposed) - Implement Option E: inject ShaderHandle via pass constructors - SpritePass/DebugPass now receive shader in constructor - RenderPass::execute() takes IRHIDevice& for dynamic buffer updates - SpritePass::execute() updates instance buffer from FramePacket - Integrate ShaderManager lifecycle in BgfxRendererModule - Add test_22_bgfx_sprites.cpp (visual test with SDL2) - Add test_22_bgfx_sprites_headless.cpp (headless data structure test) - Update PLAN_BGFX_RENDERER.md with Phase 4 completion and Phase 6.5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
769 B
C++
27 lines
769 B
C++
#include "ClearPass.h"
|
|
#include "../RHI/RHIDevice.h"
|
|
|
|
namespace grove {
|
|
|
|
void ClearPass::setup(rhi::IRHIDevice& device) {
|
|
// No resources needed for clear pass
|
|
}
|
|
|
|
void ClearPass::shutdown(rhi::IRHIDevice& device) {
|
|
// Nothing to clean up
|
|
}
|
|
|
|
void ClearPass::execute(const FramePacket& frame, rhi::IRHIDevice& device, rhi::RHICommandBuffer& cmd) {
|
|
(void)device; // Unused
|
|
// Clear is handled via view setup in bgfx
|
|
// The clear color is set in BgfxRendererModule before frame execution
|
|
|
|
// For command buffer approach, we'd record:
|
|
// cmd.setClear(frame.clearColor);
|
|
|
|
// But bgfx handles clear through setViewClear, which is called
|
|
// at the beginning of each frame in the main module
|
|
}
|
|
|
|
} // namespace grove
|