30 MultisampleResolve = 0x01,
32 Q_DECLARE_FLAGS(Flags, Flag)
35 ~QQuickRenderTarget();
36 QQuickRenderTarget(
const QQuickRenderTarget &other);
37 QQuickRenderTarget &operator=(
const QQuickRenderTarget &other);
41 qreal devicePixelRatio()
const;
42 void setDevicePixelRatio(qreal ratio);
44 bool mirrorVertically()
const;
45 void setMirrorVertically(
bool enable);
47 QRhiTexture *depthTexture()
const;
48 void setDepthTexture(QRhiTexture *texture);
50#if QT_CONFIG(opengl) || defined(Q_QDOC)
51 static QQuickRenderTarget fromOpenGLTexture(uint textureId,
const QSize &pixelSize,
int sampleCount = 1);
52 static QQuickRenderTarget fromOpenGLTexture(uint textureId, uint format,
const QSize &pixelSize,
int sampleCount = 1);
53 static QQuickRenderTarget fromOpenGLTexture(uint textureId, uint format, QSize pixelSize,
int sampleCount,
int arraySize, Flags flags);
55 static QQuickRenderTarget fromOpenGLRenderBuffer(uint renderbufferId,
const QSize &pixelSize,
int sampleCount = 1);
58#if defined(Q_OS_WIN) || defined(Q_QDOC)
59 static QQuickRenderTarget fromD3D11Texture(
void *texture,
const QSize &pixelSize,
int sampleCount = 1);
60 static QQuickRenderTarget fromD3D11Texture(
void *texture, uint format,
const QSize &pixelSize,
int sampleCount = 1);
61 static QQuickRenderTarget fromD3D11Texture(
void *texture, uint format, QSize pixelSize,
int sampleCount, Flags flags);
63 static QQuickRenderTarget fromD3D12Texture(
void *texture,
int resourceState, uint format,
const QSize &pixelSize,
int sampleCount = 1);
64 static QQuickRenderTarget fromD3D12Texture(
void *texture,
int resourceState, uint format, uint viewFormat, QSize pixelSize,
int sampleCount,
int arraySize, Flags flags);
67#if QT_CONFIG(metal) || defined(Q_QDOC)
68 static QQuickRenderTarget fromMetalTexture(MTLTexture *texture,
const QSize &pixelSize,
int sampleCount = 1);
69 static QQuickRenderTarget fromMetalTexture(MTLTexture *texture, uint format,
const QSize &pixelSize,
int sampleCount = 1);
70 static QQuickRenderTarget fromMetalTexture(MTLTexture *texture, uint format, uint viewFormat, QSize pixelSize,
int sampleCount,
int arraySize, Flags flags);
73#if QT_CONFIG(vulkan) || defined(Q_QDOC)
74 static QQuickRenderTarget fromVulkanImage(VkImage image, VkImageLayout layout,
const QSize &pixelSize,
int sampleCount = 1);
75 static QQuickRenderTarget fromVulkanImage(VkImage image, VkImageLayout layout, VkFormat format,
const QSize &pixelSize,
int sampleCount = 1);
76 static QQuickRenderTarget fromVulkanImage(VkImage image, VkImageLayout layout, VkFormat format, VkFormat viewFormat, QSize pixelSize,
int sampleCount,
int arraySize, Flags flags);
79 static QQuickRenderTarget fromRhiRenderTarget(QRhiRenderTarget *renderTarget);
81 static QQuickRenderTarget fromPaintDevice(QPaintDevice *device);
85 bool isEqual(
const QQuickRenderTarget &other)
const noexcept;
86 QQuickRenderTargetPrivate *d;
87 friend class QQuickRenderTargetPrivate;
89 friend bool operator==(
const QQuickRenderTarget &lhs,
const QQuickRenderTarget &rhs)
noexcept
90 {
return lhs.isEqual(rhs); }
91 friend bool operator!=(
const QQuickRenderTarget &lhs,
const QQuickRenderTarget &rhs)
noexcept
92 {
return !lhs.isEqual(rhs); }
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
static bool createRhiRenderTargetMultiView(QRhiTexture *texture, QRhiTexture *maybeCustomDepthTexture, const QSize &pixelSize, int arraySize, int sampleCount, bool multisampleResolve, QRhi *rhi, QQuickWindowRenderTarget *dst)