diff options
| author | vimene <vincent.menegaux@gmail.com> | 2026-01-17 00:06:31 +0100 |
|---|---|---|
| committer | vimene <vincent.menegaux@gmail.com> | 2026-01-17 00:06:31 +0100 |
| commit | 0d10b77f77459333c5549711334f417623ab1f3e (patch) | |
| tree | 6584ab5d09fa72c93a70ac916bfdf401c7617157 /src/fb/fb.hpp | |
| parent | 175c71637b6bea6dcdd0faf3d614339983809bb1 (diff) | |
| download | engine-0d10b77f77459333c5549711334f417623ab1f3e.tar.gz | |
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
Diffstat (limited to 'src/fb/fb.hpp')
| -rw-r--r-- | src/fb/fb.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
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 <concepts> +#include "math/vector.hpp" + +namespace engine::fb { + +template<typename T> +concept FrameBufferConcept = + requires (T fb, int x, int y, unsigned w, unsigned h, engine::math::Vector4 point) { + { fb.resize(w, h) } -> std::same_as<void >; + { fb.clear() } -> std::same_as<void >; + { fb.draw_point(x, y, point) } -> std::same_as<void >; + { fb.width() } -> std::same_as<unsigned>; + { fb.height() } -> std::same_as<unsigned>; + }; + +} + +#endif // FB_FB_HPP |
