Loading...
Searching...
No Matches
ImageNode.hpp
1#pragma once
2
3#include <Gfx/Graph/Node.hpp>
4
5namespace score::gfx
6{
7enum ImageMode
8{
9 Single,
10 Clamped,
11 Tiled,
12 Mirrored
13};
14
19{
20public:
21 explicit ImagesNode();
22 virtual ~ImagesNode();
23
24 score::gfx::NodeRenderer* createRenderer(RenderList& r) const noexcept override;
25
27 class OnTheFlyRenderer;
28
29#pragma pack(push, 1)
30 struct UBO
31 {
32 int currentImageIndex{};
33 float opacity{1.};
34 float position[2]{0.5, 0.5};
35 float scale[2]{1., 1.};
36 float imageSize[2]{1., 1.};
37 } ubo;
38#pragma pack(pop)
39
40 std::atomic_int imagesChanged{};
41 std::atomic<ImageMode> tile{};
42
43private:
44 void process(Message&& msg) override;
45
46 std::vector<score::gfx::Image> images;
47 std::vector<QImage*> linearImages;
48};
50{
51public:
52 explicit FullScreenImageNode(QImage dec);
53 virtual ~FullScreenImageNode();
54
55 score::gfx::NodeRenderer* createRenderer(RenderList& r) const noexcept override;
56
57 class Renderer;
58
59private:
60 QImage m_image;
61};
62}
Definition ImageNode.cpp:500
Definition ImageNode.cpp:298
Common base class for most single-pass, simple nodes.
Definition score-plugin-gfx/Gfx/Graph/Node.hpp:181
Renderer for a given node.
Definition NodeRenderer.hpp:11
List of nodes to be rendered to an output.
Definition RenderList.hpp:19
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:12
Definition ImageNode.hpp:50
score::gfx::NodeRenderer * createRenderer(RenderList &r) const noexcept override
Create a renderer in a given context for this node.
Definition ImageNode.cpp:816
Definition ImageNode.hpp:31
A node that renders an image to screen.
Definition ImageNode.hpp:19
score::gfx::NodeRenderer * createRenderer(RenderList &r) const noexcept override
Create a renderer in a given context for this node.
Definition ImageNode.cpp:683