#ifndef debugdraw_hpp #define debugdraw_hpp #include "maths.hpp" #include "video.hpp" struct Camera; struct Line_Renderer { static constexpr int max_lines = 1024; Staged_Buffer vb, cb; Shader* shader; int vert_binding, cbuffer_binding; int cur; int w, h; v3f cur_col; struct Vertex { float x, y, z; float r, g, b; }* verts; struct CBuffer { m4f vp; }; void init(Device* dev, Asset_Arena* assets); void destroy(Device* dev); void begin(int wi, int he); void colour(const v3f& c); void add_line(const v3f& s, const v3f& e); void add_box(const AABB& b); void flush( const Camera& cam, Device* dev, Arena* a, Render_Pass& rp ); }; #endif