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

49 lines
1.2 KiB
C++

#pragma once
#include "RenderPass.h"
#include <memory>
#include <vector>
namespace grove {
namespace rhi { class IRHIDevice; }
// ============================================================================
// Render Graph - Manages pass ordering and execution
// ============================================================================
class RenderGraph {
public:
RenderGraph() = default;
~RenderGraph() = default;
// Non-copyable
RenderGraph(const RenderGraph&) = delete;
RenderGraph& operator=(const RenderGraph&) = delete;
// Pass registration
void addPass(std::unique_ptr<RenderPass> pass);
// Setup all passes
void setup(rhi::IRHIDevice& device);
// Compile the graph (order, dependencies)
void compile();
// Execute all passes for a frame
void execute(const FramePacket& frame, rhi::IRHIDevice& device);
// Shutdown all passes
void shutdown(rhi::IRHIDevice& device);
// Accessors
size_t getPassCount() const { return m_passes.size(); }
private:
std::vector<std::unique_ptr<RenderPass>> m_passes;
std::vector<size_t> m_sortedIndices;
bool m_compiled = false;
};
} // namespace grove