Loading...
Searching...
No Matches
Uniforms.hpp
1#pragma once
2namespace score::gfx
3{
4struct image
5{
6};
7struct geometry
8{
9};
10enum class Types : int8_t
11{
12 Empty,
13 Int,
14 Float,
15 Vec2,
16 Vec3,
17 Vec4,
18 Image,
19 Audio,
20 Camera,
21 Geometry,
22 Buffer,
23 Scene,
24};
25
26enum class Flag : uint32_t
27{
28 // Grabs texture at the source instead of
29 // asking it to render. Used for instance to get cubemap textures.
30 GrabsFromSource = (1 << 0),
31 SamplableDepth = (1 << 1),
32
33 // Sink expects a sampler2DArray (texture carries multiple layers).
34 TextureArray = (1 << 2),
35
36 // Sink expects imageLoad/imageStore (storage image) rather than sampledTexture.
37 StorageImage = (1 << 3),
38
39 // Buffer port carries indirect-draw arguments (QRhiDrawIndirectCommand[]).
40 IndirectDraw = (1 << 4),
41
42 // Image port is a multiview texture array (one layer per view).
43 MultiView = (1 << 5),
44
45 // Output port produces only depth (no color attachment).
46 DepthOnly = (1 << 6),
47
48 // Buffer port is bound as a uniform buffer (UBO, std140) rather than as a
49 // storage buffer (SSBO, std430). Used for `uniform_input` from upstream.
50 UniformBuffer = (1 << 7),
51
52 // Sink expects a sampler3D (texture is a 3D volume).
53 ThreeDimensional = (1 << 8),
54
55 // Sink expects a samplerCube.
56 Cubemap = (1 << 9),
57};
58
59static constexpr inline Flag operator&(Flag lhs, Flag rhs)
60{
61 return (Flag)(((uint32_t)lhs) & ((uint32_t)rhs));
62}
63static constexpr inline Flag operator|(Flag lhs, Flag rhs)
64{
65 return (Flag)(((uint32_t)lhs) | ((uint32_t)rhs));
66}
67static constexpr inline Flag operator^(Flag lhs, Flag rhs)
68{
69 return (Flag)(((uint32_t)lhs) ^ ((uint32_t)rhs));
70}
71}
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
Image data and metadata.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:283
Definition Uniforms.hpp:8
Definition Uniforms.hpp:5