blob: 25b3a510558f987103e19512d529cb03cbfad813 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
|