1#ifndef TATOOINE_RENDERING_INTERACTIVE_SHADERS_H
2#define TATOOINE_RENDERING_INTERACTIVE_SHADERS_H
12 "layout (location = 0) in vec2 position;\n"
14 " gl_Position = vec4(position, 0, 1);\n"
19 "uniform vec4 color;\n"
20 "out vec4 out_color;\n"
22 " out_color = color;\n"
25 static auto get() ->
auto& {
41 auto set_color(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1) ->
void {
50 "uniform mat4 projection_matrix;\n"
51 "uniform mat4 model_view_matrix;\n"
52 "layout (location = 0) in vec2 position;\n"
54 " gl_Position = projection_matrix * \n"
55 " model_view_matrix * \n"
56 " vec4(position, 0, 1);\n"
61 "uniform vec4 color;\n"
62 "out vec4 out_color;\n"
64 " out_color = color;\n"
67 static auto get() ->
auto& {
85 auto set_color(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1) ->
void {
DLL_API void set_uniform(const std::string &, GLfloat)
DLL_API void set_uniform_mat4(const std::string &, GLfloat const *)
Definition: shadersource.h:8
static constexpr std::string_view fragment_shader
Definition: shaders.h:17
static auto get() -> auto &
Definition: shaders.h:25
static constexpr std::string_view vertex_shader
Definition: shaders.h:10
auto set_color(GLfloat r, GLfloat g, GLfloat b, GLfloat a=1) -> void
Definition: shaders.h:41
colored_pass_through_2d_without_matrices()
Definition: shaders.h:32
static auto get() -> auto &
Definition: shaders.h:67
auto set_model_view_matrix(Mat4< GLfloat > const &MV) -> void
Definition: shaders.h:89
static constexpr std::string_view fragment_shader
Definition: shaders.h:59
static constexpr std::string_view vertex_shader
Definition: shaders.h:48
auto set_projection_matrix(Mat4< GLfloat > const &P) -> void
Definition: shaders.h:93
auto set_color(GLfloat r, GLfloat g, GLfloat b, GLfloat a=1) -> void
Definition: shaders.h:85
colored_pass_through_2d()
Definition: shaders.h:74