Loading...
Searching...
No Matches
ISFVisitors.hpp
1#pragma once
2#include <isf.hpp>
3
4namespace score::gfx
5{
7{
8 int sz{};
9 void operator()(const isf::float_input&) noexcept { sz += 4; }
10
11 void operator()(const isf::long_input&) noexcept { sz += 4; }
12
13 void operator()(const isf::event_input&) noexcept
14 {
15 sz += 4; // bool
16 }
17
18 void operator()(const isf::bool_input&) noexcept
19 {
20 sz += 4; // bool
21 }
22
23 void operator()(const isf::point2d_input&) noexcept
24 {
25 if(sz % 8 != 0)
26 sz += 4;
27 sz += 2 * 4;
28 }
29
30 void operator()(const isf::point3d_input&) noexcept
31 {
32 while(sz % 16 != 0)
33 {
34 sz += 4;
35 }
36 sz += 3 * 4;
37 }
38
39 void operator()(const isf::color_input&) noexcept
40 {
41 while(sz % 16 != 0)
42 {
43 sz += 4;
44 }
45 sz += 4 * 4;
46 }
47
48 void operator()(const isf::image_input&) noexcept { }
49
50 void operator()(const isf::audio_input&) noexcept { }
51 void operator()(const isf::audioFFT_input&) noexcept { }
52 void operator()(const isf::audioHist_input&) noexcept { }
53
54 // CSF-specific input handlers
55 void operator()(const isf::storage_input& in) noexcept
56 {
57 if(in.access.contains("write"))
58 {
59 (*this)(isf::long_input{});
60 }
61 }
62
63 void operator()(const isf::texture_input in) noexcept { }
64
65 void operator()(const isf::csf_image_input& in) noexcept
66 {
67 if(in.access.contains("write"))
68 {
69 (*this)(isf::point2d_input{});
70 (*this)(isf::long_input{});
71 }
72 }
73};
74}
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:12
Definition ISFVisitors.hpp:7