QRhiWidget: Use QRhiRenderTarget as the return type for renderTarget
There is no point in using the more specialized derived class (QRhiTextureRenderTarget), even though that is what the rt always is. None of the example and test code needs changes since relying on QRhiTextureRenderTarget specifics is very rare in practice (now it will need a static_cast), whereas in the majority of cases the return value is passed on to other functions, for example, beginPass(), that take a QRhiRenderTarget. Change-Id: Ifaebb6320a156ec6a9013e72fede04e520aa9aaf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
parent
39b39f0d5f
commit
735a864360
@ -1259,7 +1259,7 @@ QRhiRenderBuffer *QRhiWidget::depthStencilBuffer() const
|
|||||||
|
|
||||||
\sa colorTexture(), depthStencilBuffer()
|
\sa colorTexture(), depthStencilBuffer()
|
||||||
*/
|
*/
|
||||||
QRhiTextureRenderTarget *QRhiWidget::renderTarget() const
|
QRhiRenderTarget *QRhiWidget::renderTarget() const
|
||||||
{
|
{
|
||||||
Q_D(const QRhiWidget);
|
Q_D(const QRhiWidget);
|
||||||
return d->renderTarget;
|
return d->renderTarget;
|
||||||
|
@ -12,7 +12,7 @@ class QRhiWidgetPrivate;
|
|||||||
class QRhi;
|
class QRhi;
|
||||||
class QRhiTexture;
|
class QRhiTexture;
|
||||||
class QRhiRenderBuffer;
|
class QRhiRenderBuffer;
|
||||||
class QRhiTextureRenderTarget;
|
class QRhiRenderTarget;
|
||||||
class QRhiCommandBuffer;
|
class QRhiCommandBuffer;
|
||||||
|
|
||||||
class Q_WIDGETS_EXPORT QRhiWidget : public QWidget
|
class Q_WIDGETS_EXPORT QRhiWidget : public QWidget
|
||||||
@ -80,7 +80,7 @@ public:
|
|||||||
QRhiRenderBuffer *msaaColorBuffer() const;
|
QRhiRenderBuffer *msaaColorBuffer() const;
|
||||||
QRhiTexture *resolveTexture() const;
|
QRhiTexture *resolveTexture() const;
|
||||||
QRhiRenderBuffer *depthStencilBuffer() const;
|
QRhiRenderBuffer *depthStencilBuffer() const;
|
||||||
QRhiTextureRenderTarget *renderTarget() const;
|
QRhiRenderTarget *renderTarget() const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void frameSubmitted();
|
void frameSubmitted();
|
||||||
|
Loading…
Reference in New Issue
Block a user