18#include <QtQuick/private/qtquickglobal_p.h>
19#include <private/qobject_p.h>
42class Q_QUICK_EXPORT QSGTexturePlatformOpenGL :
public QNativeInterface::QSGOpenGLTexture
45 QSGTexturePlatformOpenGL(QSGTexture *t) : m_texture(t) { }
46 QSGTexture *m_texture;
48 GLuint nativeTexture()
const override;
53class Q_QUICK_EXPORT QSGTexturePlatformD3D11 :
public QNativeInterface::QSGD3D11Texture
56 QSGTexturePlatformD3D11(QSGTexture *t) : m_texture(t) { }
57 QSGTexture *m_texture;
59 void *nativeTexture()
const override;
61class Q_QUICK_EXPORT QSGTexturePlatformD3D12 :
public QNativeInterface::QSGD3D12Texture
64 QSGTexturePlatformD3D12(QSGTexture *t) : m_texture(t) { }
65 QSGTexture *m_texture;
67 int nativeResourceState()
const override;
68 void *nativeTexture()
const override;
73class Q_QUICK_EXPORT QSGTexturePlatformMetal :
public QNativeInterface::QSGMetalTexture
76 QSGTexturePlatformMetal(QSGTexture *t) : m_texture(t) { }
77 QSGTexture *m_texture;
79 QT_OBJC_PROTOCOL(MTLTexture) nativeTexture()
const override;
84class Q_QUICK_EXPORT QSGTexturePlatformVulkan :
public QNativeInterface::QSGVulkanTexture
87 QSGTexturePlatformVulkan(QSGTexture *t) : m_texture(t) { }
88 QSGTexture *m_texture;
90 VkImage nativeImage()
const override;
91 VkImageLayout nativeImageLayout()
const override;
97 Q_DECLARE_PUBLIC(QSGTexture)
99 QSGTexturePrivate(QSGTexture *t);
100 static QSGTexturePrivate *get(QSGTexture *t) {
return t->d_func(); }
101 void resetDirtySamplerOptions();
102 bool hasDirtySamplerOptions()
const;
104 uint wrapChanged : 1;
105 uint filteringChanged : 1;
106 uint anisotropyChanged : 1;
108 uint horizontalWrap : 2;
109 uint verticalWrap : 2;
112 uint anisotropyLevel: 3;
118 QSGTexturePlatformOpenGL m_openglTextureAccessor;
121 QSGTexturePlatformD3D11 m_d3d11TextureAccessor;
122 QSGTexturePlatformD3D12 m_d3d12TextureAccessor;
125 QSGTexturePlatformMetal m_metalTextureAccessor;
128 QSGTexturePlatformVulkan m_vulkanTextureAccessor;
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)