4#include <Gfx/Graph/RenderState.hpp>
6#include <score/gfx/OpenGL.hpp>
7#include <score/tools/Debug.hpp>
8#include <score/tools/std/StringHash.hpp>
10#include <ossia/detail/hash_map.hpp>
12#if __has_include(<QtShaderTools/rhi/qshaderbaker.h>)
13#include <QtShaderTools/rhi/qshaderbaker.h>
15#include <QtShaderTools/private/qshaderbaker_p.h>
41SCORE_PLUGIN_GFX_EXPORT
43SCORE_PLUGIN_GFX_EXPORT
44QByteArray renameHlslReservedIdentifiers(
const QByteArray& src);
45SCORE_PLUGIN_GFX_EXPORT
46QByteArray renameMslReservedIdentifiers(
const QByteArray& src);
47SCORE_PLUGIN_GFX_EXPORT
48QByteArray renameGlslReservedIdentifiers(
const QByteArray& src);
61 static const std::pair<QShader, QString>& get(
62 const RenderState& v,
const QByteArray& shader, QShader::Stage stage,
63 int multiViewCount = 0);
64 static const std::pair<QShader, QString>& get(
65 GraphicsApi api,
const QShaderVersion& v,
const QByteArray& shader,
66 QShader::Stage stage,
int multiViewCount = 0);
73 explicit Baker(
GraphicsApi api,
const QShaderVersion& v,
int multiViewCount);
76 QShaderVersion version;
89 static constexpr int stageCount = 6;
90 std::array<ossia::hash_map<QByteArray, std::pair<QShader, QString>>, stageCount>
93 auto& forStage(QShader::Stage s)
noexcept
96 SCORE_ASSERT(i >= 0 && i < stageCount);
101 std::vector<std::unique_ptr<Baker>> m_bakers;
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
GraphicsApi
Available graphics APIs to use.
Definition RenderState.hpp:25
QByteArray renameReservedIdentifiers(const QByteArray &src, GraphicsApi api)
Rename the identifiers of a GLSL source that the target language of a bake reserves,...
Definition ShaderCache.cpp:430
Global state associated to a rendering context.
Definition RenderState.hpp:40
Cache of baked QShader instances.
Definition ShaderCache.hpp:54