Do more QRhiWidget cleanups based on API review
Change-Id: I339fb2ac2546b9d7b4b88cba89191e7a4311017f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 80e7bcd3688619b7394c9e2ce2cd61c72143f0bf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
98831dea76
commit
b375dac923
@ -145,12 +145,12 @@ QT_BEGIN_NAMESPACE
|
|||||||
\enum QRhiWidget::Api
|
\enum QRhiWidget::Api
|
||||||
Specifies the 3D API and QRhi backend to use
|
Specifies the 3D API and QRhi backend to use
|
||||||
|
|
||||||
|
\value Null
|
||||||
\value OpenGL
|
\value OpenGL
|
||||||
\value Metal
|
\value Metal
|
||||||
\value Vulkan
|
\value Vulkan
|
||||||
\value Direct3D11
|
\value Direct3D11
|
||||||
\value Direct3D12
|
\value Direct3D12
|
||||||
\value Null
|
|
||||||
|
|
||||||
\sa QRhi
|
\sa QRhi
|
||||||
*/
|
*/
|
||||||
@ -727,7 +727,7 @@ QRhiWidget::Api QRhiWidget::api() const
|
|||||||
backend to render. Attempting to set another value, or to add another
|
backend to render. Attempting to set another value, or to add another
|
||||||
QRhiWidget with a different \a api will not function as expected.
|
QRhiWidget with a different \a api will not function as expected.
|
||||||
|
|
||||||
\sa setColorBufferFormat(), setDebugLayer(), api()
|
\sa setColorBufferFormat(), setDebugLayerEnabled(), api()
|
||||||
*/
|
*/
|
||||||
void QRhiWidget::setApi(Api api)
|
void QRhiWidget::setApi(Api api)
|
||||||
{
|
{
|
||||||
@ -758,7 +758,7 @@ void QRhiWidget::setApi(Api api)
|
|||||||
\return true if a debug or validation layer will be requested if applicable
|
\return true if a debug or validation layer will be requested if applicable
|
||||||
to the graphics API in use.
|
to the graphics API in use.
|
||||||
|
|
||||||
\sa setDebugLayer()
|
\sa setDebugLayerEnabled()
|
||||||
*/
|
*/
|
||||||
bool QRhiWidget::isDebugLayerEnabled() const
|
bool QRhiWidget::isDebugLayerEnabled() const
|
||||||
{
|
{
|
||||||
@ -781,7 +781,7 @@ bool QRhiWidget::isDebugLayerEnabled() const
|
|||||||
|
|
||||||
\sa setApi(), isDebugLayerEnabled()
|
\sa setApi(), isDebugLayerEnabled()
|
||||||
*/
|
*/
|
||||||
void QRhiWidget::setDebugLayer(bool enable)
|
void QRhiWidget::setDebugLayerEnabled(bool enable)
|
||||||
{
|
{
|
||||||
Q_D(QRhiWidget);
|
Q_D(QRhiWidget);
|
||||||
d->config.setDebugLayer(enable);
|
d->config.setDebugLayer(enable);
|
||||||
|
@ -25,16 +25,16 @@ class Q_WIDGETS_EXPORT QRhiWidget : public QWidget
|
|||||||
Q_PROPERTY(bool mirrorVertically READ isMirrorVerticallyEnabled WRITE setMirrorVertically NOTIFY mirrorVerticallyChanged)
|
Q_PROPERTY(bool mirrorVertically READ isMirrorVerticallyEnabled WRITE setMirrorVertically NOTIFY mirrorVerticallyChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QRhiWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {});
|
explicit QRhiWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {});
|
||||||
~QRhiWidget();
|
~QRhiWidget() override;
|
||||||
|
|
||||||
enum class Api {
|
enum class Api {
|
||||||
|
Null,
|
||||||
OpenGL,
|
OpenGL,
|
||||||
Metal,
|
Metal,
|
||||||
Vulkan,
|
Vulkan,
|
||||||
Direct3D11,
|
Direct3D11,
|
||||||
Direct3D12,
|
Direct3D12,
|
||||||
Null
|
|
||||||
};
|
};
|
||||||
Q_ENUM(Api)
|
Q_ENUM(Api)
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ public:
|
|||||||
RGBA8,
|
RGBA8,
|
||||||
RGBA16F,
|
RGBA16F,
|
||||||
RGBA32F,
|
RGBA32F,
|
||||||
RGB10A2
|
RGB10A2,
|
||||||
};
|
};
|
||||||
Q_ENUM(TextureFormat)
|
Q_ENUM(TextureFormat)
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ public:
|
|||||||
void setApi(Api api);
|
void setApi(Api api);
|
||||||
|
|
||||||
bool isDebugLayerEnabled() const;
|
bool isDebugLayerEnabled() const;
|
||||||
void setDebugLayer(bool enable);
|
void setDebugLayerEnabled(bool enable);
|
||||||
|
|
||||||
int sampleCount() const;
|
int sampleCount() const;
|
||||||
void setSampleCount(int samples);
|
void setSampleCount(int samples);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user