GroveEngine/modules/BgfxRenderer/RenderGraph/RenderPass.h
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

41 lines
1.1 KiB
C++

#pragma once
#include "../RHI/RHICommandBuffer.h"
#include "../Frame/FramePacket.h"
#include <vector>
namespace grove {
namespace rhi { class IRHIDevice; }
// ============================================================================
// Render Pass Interface
// ============================================================================
class RenderPass {
public:
virtual ~RenderPass() = default;
// Unique identifier
virtual const char* getName() const = 0;
// Render order (lower = earlier)
virtual uint32_t getSortOrder() const = 0;
// Dependencies (names of passes that must execute before)
virtual std::vector<const char*> getDependencies() const { return {}; }
// Execution - MUST be thread-safe
// frame: read-only
// cmd: write-only, thread-local
virtual void execute(const FramePacket& frame, rhi::RHICommandBuffer& cmd) = 0;
// Initial setup (load shaders, create buffers)
virtual void setup(rhi::IRHIDevice& device) = 0;
// Cleanup
virtual void shutdown(rhi::IRHIDevice& device) = 0;
};
} // namespace grove