Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qrhiwidget_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QRHIWIDGET_P_H
5#define QRHIWIDGET_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qrhiwidget.h"
19#include <rhi/qrhi.h>
20#include <private/qwidget_p.h>
21#include <private/qbackingstorerhisupport_p.h>
22
24
25class Q_WIDGETS_EXPORT QRhiWidgetPrivate : public QWidgetPrivate
26{
27 Q_DECLARE_PUBLIC(QRhiWidget)
28public:
29 TextureData texture() const override;
30 QPlatformTextureList::Flags textureListFlags() override;
31 QPlatformBackingStoreRhiConfig rhiConfig() const override;
32 void endCompose() override;
33 QImage grabFramebuffer() override;
34
35 void init();
36 void ensureRhi();
37 void ensureTexture(bool *changed);
38 bool invokeInitialize(QRhiCommandBuffer *cb);
39 void resetColorBufferObjects();
40 void resetRenderTargetObjects();
41 void releaseResources();
42
43 QRhi *rhi = nullptr;
44 bool noSize = false;
45 QPlatformBackingStoreRhiConfig config;
46 QRhiWidget::TextureFormat widgetTextureFormat = QRhiWidget::TextureFormat::RGBA8;
47 QRhiTexture::Format rhiTextureFormat = QRhiTexture::RGBA8;
48 int samples = 1;
49 QSize fixedSize;
50 bool autoRenderTarget = true;
51 bool mirrorVertically = false;
52 QBackingStoreRhiSupport offscreenRenderer;
53 bool textureInvalid = false;
54 QRhiTexture *colorTexture = nullptr;
55 QRhiRenderBuffer *msaaColorBuffer = nullptr;
56 QRhiTexture *resolveTexture = nullptr;
57 QRhiRenderBuffer *depthStencilBuffer = nullptr;
58 QRhiTextureRenderTarget *renderTarget = nullptr;
59 QRhiRenderPassDescriptor *renderPassDescriptor = nullptr;
60 mutable QVector<QRhiResource *> pendingDeletes;
61};
62
63QT_END_NAMESPACE
64
65#endif
Combined button and popup list for selecting options.