2 #include <ossia/detail/variant.hpp>
12 class invalid_file :
public std::runtime_error
15 using std::runtime_error::runtime_error;
24 using value_type = bool;
25 using has_default = std::true_type;
31 using value_type = int64_t;
32 using has_minmax = std::true_type;
33 std::vector<int64_t> values;
34 std::vector<std::string> labels;
39 using value_type = double;
40 using has_minmax = std::true_type;
48 using value_type = std::array<double, 2>;
49 using has_minmax = std::true_type;
50 std::optional<value_type> def{};
51 std::optional<value_type> min{};
52 std::optional<value_type> max{};
57 using value_type = std::array<double, 3>;
58 using has_minmax = std::true_type;
59 std::optional<value_type> def{};
60 std::optional<value_type> min{};
61 std::optional<value_type> max{};
66 using value_type = std::array<double, 4>;
67 using has_minmax = std::true_type;
68 std::optional<value_type> def{};
69 std::optional<value_type> min{};
70 std::optional<value_type> max{};
89 using input_impl = ossia::variant<
90 float_input, long_input, event_input, bool_input, color_input, point2d_input,
91 point3d_input, image_input, audio_input, audioFFT_input>;
103 bool float_storage{};
104 std::string width_expression{};
105 std::string height_expression{};
110 std::string description;
112 std::vector<std::string> categories;
113 std::vector<input> inputs;
114 std::vector<pass> passes;
115 std::vector<std::string> pass_targets;
116 bool default_vertex_shader{};
121 std::string m_sourceVertex;
122 std::string m_sourceFragment;
123 std::string m_source_geometry_filter;
126 std::string m_vertex;
127 std::string m_fragment;
128 std::string m_geometry_filter;
133 enum class ShaderType
142 std::string vert, std::string frag,
int glslVersion = 450,
143 ShaderType = ShaderType::Autodetect);
144 explicit parser(std::string isf_geom_filter);
146 descriptor data()
const;
147 std::string vertex()
const;
148 std::string fragment()
const;
149 std::string geometry_filter()
const;
153 void parse_shadertoy();
154 void parse_glsl_sandbox();
155 void parse_geometry_filter();
157 std::string parse_isf_header(std::string_view source);