2#include <score_plugin_gfx_export.h>
9#include <unordered_map>
13class QRhiResourceUpdateBatch;
45SCORE_PLUGIN_GFX_EXPORT
46std::optional<DecodedImage> decodeImageFromPath(
const QString& path);
48SCORE_PLUGIN_GFX_EXPORT
49std::optional<DecodedImage> decodeImageFromMemory(
50 const QByteArray& bytes,
const QString& mime_hint);
60SCORE_PLUGIN_GFX_EXPORT
61QRhiTexture* uploadImageToTexture(
62 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QImage& img,
bool srgb,
63 const QString& debug_name = {});
70SCORE_PLUGIN_GFX_EXPORT
71QRhiTexture* loadAndUploadTexture(
72 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QString& path,
bool srgb);
74SCORE_PLUGIN_GFX_EXPORT
75QRhiTexture* loadAndUploadTexture(
76 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QByteArray& bytes,
77 const QString& mime_hint,
bool srgb);
103 QRhiTexture* acquireFromPath(
104 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QString& path,
bool srgb);
108 QRhiTexture* acquireFromMemory(
109 QRhi& rhi, QRhiResourceUpdateBatch& batch,
const QByteArray& bytes,
110 const QString& mime_hint, uint64_t content_hash,
bool srgb);
115 std::size_t size()
const noexcept {
return m_textures.size(); }
122 bool operator==(
const Key&)
const noexcept =
default;
126 std::size_t operator()(
const Key& k)
const noexcept;
129 std::unordered_map<Key, QRhiTexture*, KeyHash> m_textures;
Definition TextureLoader.hpp:91
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
Definition TextureLoader.hpp:31
Definition Uniforms.hpp:5