mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
add in-world lines renderer
This commit is contained in:
parent
e0123f85ea
commit
70c5c67bd1
4 changed files with 44 additions and 0 deletions
22
src/graphics/render/LinesRenderer.hpp
Normal file
22
src/graphics/render/LinesRenderer.hpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <glm/vec3.hpp>
|
||||
#include <glm/vec4.hpp>
|
||||
#include <vector>
|
||||
|
||||
class LineBatch;
|
||||
|
||||
class LinesRenderer {
|
||||
public:
|
||||
struct Line {
|
||||
glm::vec3 a;
|
||||
glm::vec3 b;
|
||||
glm::vec4 color;
|
||||
};
|
||||
|
||||
void draw(LineBatch& batch);
|
||||
|
||||
void pushLine(const glm::vec3& a, const glm::vec3& b, const glm::vec4& color);
|
||||
private:
|
||||
std::vector<Line> queue;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue