Checkpoint 1: implement native subsystems and begin the gameplay manual
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
namespace faset::render {
|
||||
// Ordered single-queue graph. Reads must be imported or produced by an earlier pass.
|
||||
// The Vulkan executor performs barriers at each resource state transition.
|
||||
class RenderGraph {
|
||||
public:
|
||||
using Callback = std::function<void()>;
|
||||
void import(std::string resource);
|
||||
void add(std::string name, std::vector<std::string> reads, std::vector<std::string> writes, Callback execute);
|
||||
void execute() const;
|
||||
std::vector<std::string> pass_names() const;
|
||||
private:
|
||||
struct Pass {std::string name; std::vector<std::string> reads, writes; Callback callback;};
|
||||
std::vector<std::string> imports_;
|
||||
std::vector<Pass> passes_;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user