From 0d10b77f77459333c5549711334f417623ab1f3e Mon Sep 17 00:00:00 2001 From: vimene Date: Sat, 17 Jan 2026 00:06:31 +0100 Subject: improved software shaders - unified terminal and graphical software renderer shaders - added vertex shaders for software renderers - removed VertexData - moved shaders from frame buffers to their own class - added FrameBufferConcept and ShadersConcept --- src/fb/fb.hpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/fb/fb.hpp (limited to 'src/fb/fb.hpp') diff --git a/src/fb/fb.hpp b/src/fb/fb.hpp new file mode 100644 index 0000000..25b3a51 --- /dev/null +++ b/src/fb/fb.hpp @@ -0,0 +1,21 @@ +#ifndef FB_FB_HPP +#define FB_FB_HPP + +#include +#include "math/vector.hpp" + +namespace engine::fb { + +template +concept FrameBufferConcept = + requires (T fb, int x, int y, unsigned w, unsigned h, engine::math::Vector4 point) { + { fb.resize(w, h) } -> std::same_as; + { fb.clear() } -> std::same_as; + { fb.draw_point(x, y, point) } -> std::same_as; + { fb.width() } -> std::same_as; + { fb.height() } -> std::same_as; + }; + +} + +#endif // FB_FB_HPP -- cgit v1.2.3