blob: d5e1c3a15387863425047286a37be7bc12936ac3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef SHADERS_SHADERS_HPP
#define SHADERS_SHADERS_HPP
#include <concepts>
#include "math/vector.hpp"
#include "o3d/vertex.hpp"
#include "fb/fb.hpp"
namespace engine::shaders {
template<typename T>
concept ShadersConcept =
requires {
typename T::fb_type;
requires engine::fb::FrameBufferConcept<typename T::fb_type>;
} &&
requires (T shaders, int x, int y, engine::math::Vector3 v3_1, engine::math::Vector3 v3_2, engine::math::Vector2 v2) {
{ shaders.vertex(v3_1, v3_2, v2) } -> std::same_as<engine::o3d::Vertex>;
{ shaders.fragment(x, y, v3_1, v3_2, v2) } -> std::same_as<engine::math::Vector4>;
};
}
#endif // SHADERS_SHADERS_HPP
|