2022-03-06 20:58:06 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../common.hpp"
|
|
|
|
#include "../gx.hpp"
|
|
|
|
|
|
|
|
namespace aurora::gfx::model {
|
|
|
|
struct DrawData {
|
|
|
|
PipelineRef pipeline;
|
|
|
|
Range vertRange;
|
2022-03-08 05:28:31 +00:00
|
|
|
Range idxRange;
|
2022-03-15 06:18:45 +00:00
|
|
|
gx::BindGroupRanges dataRanges;
|
2022-03-06 20:58:06 +00:00
|
|
|
Range uniformRange;
|
2022-03-08 05:28:31 +00:00
|
|
|
uint32_t indexCount;
|
|
|
|
gx::GXBindGroups bindGroups;
|
2022-05-02 23:42:59 +00:00
|
|
|
u32 dstAlpha;
|
2022-03-06 20:58:06 +00:00
|
|
|
};
|
|
|
|
|
2022-03-08 08:52:36 +00:00
|
|
|
struct PipelineConfig : gx::PipelineConfig {};
|
2022-03-08 05:28:31 +00:00
|
|
|
|
2022-03-08 08:52:36 +00:00
|
|
|
struct State {};
|
2022-03-06 20:58:06 +00:00
|
|
|
|
|
|
|
State construct_state();
|
|
|
|
wgpu::RenderPipeline create_pipeline(const State& state, [[maybe_unused]] PipelineConfig config);
|
|
|
|
void render(const State& state, const DrawData& data, const wgpu::RenderPassEncoder& pass);
|
|
|
|
} // namespace aurora::gfx::model
|