diff options
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 |
