Euphoria
linebatch.h
Go to the documentation of this file.
1#pragma once
2
3#include "eu/render/shader.h"
4
5namespace eu::render
6{
7
8struct CompiledCamera;
9// struct Lin_rgb; // in base/colors.h
10
14{
15 static constexpr int max_lines = 100;
16
25
26 std::vector<float> data;
27 int lines = 0;
31
34
35 LineDrawer(const LineDrawer&) = delete;
36 void operator=(const LineDrawer&) = delete;
38 void operator=(LineDrawer&&) = delete;
39
40 void set_camera(const CompiledCamera& cc);
41 void set_line_to_dash(const v2& resolution, float dash_size, float gap_size);
43 void line(const v3& world_from, const v3& world_to, const Lin_rgb& color);
44 void submit();
45
46 [[nodiscard]] bool is_loaded() const;
47};
48
49} // namespace eu::render
std::vector< VertexElementDescription > ShaderVertexAttributes
Describes all vertex inputs a shader requires like [vec3 position, vec3 normal, vec2 uv].
Definition ui.h:4
uint32_t u32
Definition ints.h:14
Represents a linear sRGB color.
Definition colors.h:29
A list of CompiledVertexElement (for shader).
A "compiled" camera for use in rendering.
Definition camera.h:51
LineDrawer(LineDrawer &&)=delete
core::CompiledShaderVertexAttributes layout
Definition linebatch.h:18
void set_camera(const CompiledCamera &cc)
Uniform view_from_world_uni
Definition linebatch.h:21
void operator=(LineDrawer &&)=delete
void operator=(const LineDrawer &)=delete
std::vector< float > data
Definition linebatch.h:26
LineDrawer(const LineDrawer &)=delete
core::ShaderVertexAttributes description
Definition linebatch.h:17
bool is_loaded() const
void set_line_to_dash(const v2 &resolution, float dash_size, float gap_size)
static constexpr int max_lines
Definition linebatch.h:15
void line(const v3 &world_from, const v3 &world_to, const Lin_rgb &color)
ShaderProgram shader
Definition linebatch.h:19
RAII representation of a open gl shader program.
Definition shader.h:28
Represents a found shader uniform and created via ShaderProgram::GetUniform().
Definition uniform.h:9
a 2d vector
Definition vec2.h:17
a 3d vector
Definition vec3.h:27