aurora/lib/gfx/model/shader.hpp

28 lines
684 B
C++
Raw Permalink Normal View History

2022-07-27 15:25:25 +00:00
#pragma once
#include "../common.hpp"
#include "../gx.hpp"
namespace aurora::gfx::model {
struct DrawData {
PipelineRef pipeline;
Range vertRange;
Range idxRange;
gx::BindGroupRanges dataRanges;
Range uniformRange;
uint32_t indexCount;
gx::GXBindGroups bindGroups;
u32 dstAlpha;
};
struct PipelineConfig : gx::PipelineConfig {};
struct State {};
State construct_state();
wgpu::RenderPipeline create_pipeline(const State& state, [[maybe_unused]] const PipelineConfig& config);
void render(const State& state, const DrawData& data, const wgpu::RenderPassEncoder& pass);
2022-07-27 15:25:25 +00:00
void queue_surface(const u8* dlStart, u32 dlSize) noexcept;
} // namespace aurora::gfx::model