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 void operator()(const isf::cubemap_input&) noexcept { }
50
51 void operator()(const isf::audio_input&) noexcept { }
52 void operator()(const isf::audioFFT_input&) noexcept { }
53 void operator()(const isf::audioHist_input&) noexcept { }
54
55 // CSF-specific input handlers
56 void operator()(const isf::storage_input& in) noexcept
57 {
58 if(in.access.contains("write"))
59 {
60 (*this)(isf::long_input{});
61 }
62 }
63
64 void operator()(const isf::texture_input in) noexcept { }
65
66 void operator()(const isf::csf_image_input& in) noexcept
67 {
68 if(in.access.contains("write"))
69 {
70 (*this)(isf::point2d_input{});
71 (*this)(isf::long_input{});
72 }
73 }
74};
75}
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:12
Definition ISFVisitors.hpp:7