Loading...
Searching...
No Matches
RenderedISFUtils.hpp
1#pragma once
2
3#include <Gfx/Graph/Utils.hpp>
4
5#include <ossia/audio/fft.hpp>
6#include <ossia/detail/small_flat_map.hpp>
7#include <ossia/detail/variant.hpp>
8#include <ossia/math/math_expression.hpp>
9
10namespace score::gfx
11{
12struct Pass
13{
14 TextureRenderTarget renderTarget;
15 Pipeline p;
16 QRhiBuffer* processUBO{};
17};
18
20{
21 QRhiSampler* sampler{};
22 QRhiTexture* textures[2]{nullptr, nullptr};
23};
24using PassOutput = ossia::variant<PersistSampler, TextureRenderTarget>;
25
27{
28 explicit AudioTextureUpload();
29
30 void
31 process(AudioTexture& audio, QRhiResourceUpdateBatch& res, QRhiTexture* rhiTexture);
32
33 void processTemporal(
34 AudioTexture& audio, QRhiResourceUpdateBatch& res, QRhiTexture* rhiTexture);
35
36 void processHistogram(
37 AudioTexture& audio, QRhiResourceUpdateBatch& res, QRhiTexture* rhiTexture);
38
39 void processSpectral(
40 AudioTexture& audio, QRhiResourceUpdateBatch& res, QRhiTexture* rhiTexture);
41
42 [[nodiscard]] std::optional<Sampler> updateAudioTexture(
43 AudioTexture& audio, RenderList& renderer, char* materialData,
44 QRhiResourceUpdateBatch& res);
45
46private:
47 std::vector<float> m_scratchpad;
48 ossia::fft m_fft;
49};
50
51}
List of nodes to be rendered to an output.
Definition RenderList.hpp:19
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:12
Data model for audio data being sent to the GPU.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:34
Definition RenderedISFUtils.hpp:27
Definition RenderedISFUtils.hpp:13
Definition RenderedISFUtils.hpp:20
Useful abstraction for storing a graphics pipeline and associated resource bindings.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:97
Useful abstraction for storing all the data related to a render target.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:115