IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QRenderSurfaceSelector Class

Provides a way of specifying the render surface.

This class was introduced in Qt 5.7.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QRenderSurfaceSelector Class

  • Header: QRenderSurfaceSelector

  • Since: Qt 5.7

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3drender)

    target_link_libraries(mytarget PRIVATE Qt6::3drender)

  • qmake: QT += 3drender

  • Inherited By:

  • Instantiated By: qml-qt3d-render-rendersurfaceselector.xml

  • Inherits: Qt3DRender::QFrameGraphNode

Detailed Description

The Qt3DRender::QRenderSurfaceSelector can be used to select the surface, where Qt3D renders the content. The surface can either be window surface or offscreen surface. The externalRenderTargetSize is used to specify the actual size of the surface when offscreen surface is used.

When DPI scaling is used by the system, the logical surface size, which is used by mouse events, and the actual 'physical' size of the surface can differ. The surfacePixelRatio is the factor to convert the logical size to the physical size.

See Also

Property Documentation

 

externalRenderTargetSize : QSize

Holds the size of the external render target.

Access functions:

Notifier signal:

  • void externalRenderTargetSizeChanged(const &size)

surface : QObject*

Holds the surface

Access functions:

  • *surface() const

  • void setSurface( *surfaceObject)

Notifier signal:

  • void surfaceChanged( *surface)

surfacePixelRatio : float

Holds the surfacePixelRatio of the surface.

Access functions:

  • float surfacePixelRatio() const

  • void setSurfacePixelRatio(float ratio)

Notifier signal:

  • void surfacePixelRatioChanged(float ratio)

Member Function Documentation

 

[explicit] QRenderSurfaceSelector::QRenderSurfaceSelector(Qt3DCore::QNode *parent = nullptr)

Constructs QRenderSurfaceSelector with given parent.

void QRenderSurfaceSelector::setExternalRenderTargetSize(const QSize &size)

Sets render target size if different than underlying surface size. Tells picking the correct size.

Setter function for property externalRenderTargetSize.

See Also

void QRenderSurfaceSelector::setSurface(QObject *surfaceObject)

Sets surfaceObject.

Setter function for property surface.

See Also

See also surface()

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+