2022-03-05 03:36:54 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../common.hpp"
|
2022-03-06 20:58:06 +00:00
|
|
|
#include "../gx.hpp"
|
2022-03-05 03:36:54 +00:00
|
|
|
|
|
|
|
namespace aurora::gfx::stream {
|
|
|
|
struct DrawData {
|
|
|
|
PipelineRef pipeline;
|
|
|
|
Range vertRange;
|
|
|
|
Range uniformRange;
|
2022-03-19 17:30:25 +00:00
|
|
|
Range indexRange;
|
|
|
|
uint32_t indexCount;
|
2022-03-07 23:53:42 +00:00
|
|
|
gx::GXBindGroups bindGroups;
|
2022-05-02 23:42:59 +00:00
|
|
|
u32 dstAlpha;
|
2022-03-05 03:36:54 +00:00
|
|
|
};
|
|
|
|
|
2022-03-07 23:53:42 +00:00
|
|
|
struct PipelineConfig : public gx::PipelineConfig {};
|
2022-03-05 03:36:54 +00:00
|
|
|
|
2022-03-15 06:18:45 +00:00
|
|
|
struct State {};
|
2022-03-05 03:36:54 +00:00
|
|
|
|
|
|
|
State construct_state();
|
2022-05-03 05:32:06 +00:00
|
|
|
wgpu::RenderPipeline create_pipeline(const State& state, [[maybe_unused]] const PipelineConfig& config);
|
2022-03-05 03:36:54 +00:00
|
|
|
void render(const State& state, const DrawData& data, const wgpu::RenderPassEncoder& pass);
|
|
|
|
} // namespace aurora::gfx::stream
|