19#include <QtQuick/private/qtquickglobal_p.h>
20#include <private/qobject_p.h>
43class Q_QUICK_EXPORT QSGTexturePlatformOpenGL :
public QNativeInterface::QSGOpenGLTexture
46 QSGTexturePlatformOpenGL(QSGTexture *t) : m_texture(t) { }
47 QSGTexture *m_texture;
49 GLuint nativeTexture()
const override;
54class Q_QUICK_EXPORT QSGTexturePlatformD3D11 :
public QNativeInterface::QSGD3D11Texture
57 QSGTexturePlatformD3D11(QSGTexture *t) : m_texture(t) { }
58 QSGTexture *m_texture;
60 void *nativeTexture()
const override;
62class Q_QUICK_EXPORT QSGTexturePlatformD3D12 :
public QNativeInterface::QSGD3D12Texture
65 QSGTexturePlatformD3D12(QSGTexture *t) : m_texture(t) { }
66 QSGTexture *m_texture;
68 int nativeResourceState()
const override;
69 void *nativeTexture()
const override;
74class Q_QUICK_EXPORT QSGTexturePlatformMetal :
public QNativeInterface::QSGMetalTexture
77 QSGTexturePlatformMetal(QSGTexture *t) : m_texture(t) { }
78 QSGTexture *m_texture;
80 QT_OBJC_PROTOCOL(MTLTexture) nativeTexture()
const override;
85class Q_QUICK_EXPORT QSGTexturePlatformVulkan :
public QNativeInterface::QSGVulkanTexture
88 QSGTexturePlatformVulkan(QSGTexture *t) : m_texture(t) { }
89 QSGTexture *m_texture;
91 VkImage nativeImage()
const override;
92 VkImageLayout nativeImageLayout()
const override;
98 Q_DECLARE_PUBLIC(QSGTexture)
100 QSGTexturePrivate(QSGTexture *t);
101 static QSGTexturePrivate *get(QSGTexture *t) {
return t->d_func(); }
102 void resetDirtySamplerOptions();
103 bool hasDirtySamplerOptions()
const;
105 uint wrapChanged : 1;
106 uint filteringChanged : 1;
107 uint anisotropyChanged : 1;
109 uint horizontalWrap : 2;
110 uint verticalWrap : 2;
113 uint anisotropyLevel: 3;
119 QSGTexturePlatformOpenGL m_openglTextureAccessor;
122 QSGTexturePlatformD3D11 m_d3d11TextureAccessor;
123 QSGTexturePlatformD3D12 m_d3d12TextureAccessor;
126 QSGTexturePlatformMetal m_metalTextureAccessor;
129 QSGTexturePlatformVulkan m_vulkanTextureAccessor;
Combined button and popup list for selecting options.
static void qt_debug_print_texture_count()
static void qt_debug_remove_texture(QSGTexture *texture)
static void qt_debug_add_texture(QSGTexture *texture)
size_t qHash(const QSGSamplerDescription &s, size_t seed=0) noexcept
Q_DECLARE_TYPEINFO(QSGSamplerDescription, Q_RELOCATABLE_TYPE)
bool operator!=(const QSGSamplerDescription &a, const QSGSamplerDescription &b) noexcept
Q_QUICK_EXPORT bool qsg_safeguard_texture(QSGTexture *)
bool operator==(const QSGSamplerDescription &a, const QSGSamplerDescription &b) noexcept
static QSGSamplerDescription fromTexture(QSGTexture *t)