diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-24 13:54:14 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-24 13:54:14 +0200 |
commit | 61b2725ef174e4cec734e29bce4f69d6fcd2a813 (patch) | |
tree | b17b0ae285976f3f6762ae470c176c04e4d63228 /include | |
parent | 17254ca13ce7985e87a413df1d8546779734f05e (diff) |
Vertices: fix alpha blending when window background is transparent, add uniform for color, add position for vertices draw
Diffstat (limited to 'include')
-rw-r--r-- | include/mglpp/graphics/Shader.hpp | 2 | ||||
-rw-r--r-- | include/mglpp/window/Window.hpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/mglpp/graphics/Shader.hpp b/include/mglpp/graphics/Shader.hpp index 2d1336d..e2bb1ad 100644 --- a/include/mglpp/graphics/Shader.hpp +++ b/include/mglpp/graphics/Shader.hpp @@ -2,6 +2,7 @@ #define MGLPP_SHADER_HPP #include "../system/vec.hpp" +#include "../graphics/Color.hpp" extern "C" { #include <mgl/graphics/shader.h> @@ -24,6 +25,7 @@ namespace mgl { bool load_from_file(const char *filepath, Type type); bool set_uniform(const char *name, float value); bool set_uniform(const char *name, vec2f value); + bool set_uniform(const char *name, Color color); bool is_valid() const; diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp index f25e63e..d355db7 100644 --- a/include/mglpp/window/Window.hpp +++ b/include/mglpp/window/Window.hpp @@ -66,7 +66,7 @@ namespace mgl { void clear(Color color = Color(0, 0, 0, 255)); void draw(Drawable &drawable, Shader *shader = nullptr); - void draw(const Vertex *vertices, size_t vertex_count, PrimitiveType primitive_type, Shader *shader = nullptr); + void draw(const Vertex *vertices, size_t vertex_count, PrimitiveType primitive_type, mgl::vec2f position, Shader *shader = nullptr); void display(); void set_visible(bool visible); |