GroveEngine/modules/BgfxRenderer/Passes/ClearPass.cpp
StillHammer d63d8d83fa feat: Add BgfxRenderer module skeleton
- Add complete BgfxRenderer module structure (24 files)
- RHI abstraction layer (no bgfx:: exposed outside BgfxDevice.cpp)
- Frame system with lock-free allocator
- RenderGraph with ClearPass, SpritePass, DebugPass
- SceneCollector for IIO message parsing (render:* topics)
- ResourceCache with thread-safe texture/shader caching
- Full IModule integration (config via IDataNode, comm via IIO)
- CMake with FetchContent for bgfx
- Windows build script (build_renderer.bat)
- Documentation (README.md, USER_GUIDE.md, PLAN_BGFX_RENDERER.md)
- Updated .gitignore for Windows builds

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 00:41:55 +08:00

26 lines
715 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::RHICommandBuffer& cmd) {
// 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