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

QQuickGraphicsDevice Class

The QQuickGraphicsDevice class provides an opaque container for native graphics objects representing graphics devices or contexts.

This class was introduced in Qt 6.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QQuickGraphicsDevice Class

  • Header: QQuickGraphicsDevice

  • Since: Qt 6.0

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Quick)

    target_link_libraries(mytarget PRIVATE Qt6::Quick)

  • qmake: QT += quick

Detailed Description

Member Function Documentation

 

QQuickGraphicsDevice::QQuickGraphicsDevice()

Constructs a default QQuickGraphicsDevice that does not reference any native objects.

QQuickGraphicsDevice::~QQuickGraphicsDevice()

Destructor.

[static] QQuickGraphicsDevice QQuickGraphicsDevice::fromAdapter(quint32 adapterLuidLow, qint32 adapterLuidHigh, int featureLevel = 0)

Returns a new QQuickGraphicsDevice describing a DXGI adapter and D3D feature level.

This factory function is suitable for Direct3D 11, particularly in combination with OpenXR. adapterLuidLow and adapterLuidHigh together specify a LUID, while a featureLevel specifies a D3D_FEATURE_LEVEL_ value. featureLevel can be set to 0 if it is not intended to be specified, in which case the scene graph's defaults will be used.

[static] QQuickGraphicsDevice QQuickGraphicsDevice::fromDeviceAndCommandQueue(MTLDevice *device, MTLCommandQueue *commandQueue)

Returns a new QQuickGraphicsDevice referencing an existing device and commandQueue object.

This factory function is suitable for Metal.

the resulting QQuickGraphicsDevice does not own any native resources, it merely contains references. It is the caller's responsibility to ensure that the native resource exists as long as necessary.

[static] QQuickGraphicsDevice QQuickGraphicsDevice::fromDeviceAndContext(void *device, void *context)

Returns a new QQuickGraphicsDevice referencing a native device and context object.

This factory function is suitable for Direct3D 11. device is expected to be a ID3D11Device*, context is expected to be a ID3D11DeviceContext*.

the resulting QQuickGraphicsDevice does not own any native resources, it merely contains references. It is the caller's responsibility to ensure that the native resource exists as long as necessary.

[static] QQuickGraphicsDevice QQuickGraphicsDevice::fromDeviceObjects(VkPhysicalDevice physicalDevice, VkDevice device, int queueFamilyIndex, int queueIndex = 0)

Returns a new QQuickGraphicsDevice referencing an existing device object.

This factory function is suitable for Vulkan. physicalDevice, device and queueFamilyIndex must always be provided. queueIndex is optional since the default value of 0 is often suitable.

the resulting QQuickGraphicsDevice does not own any native resources, it merely contains references. It is the caller's responsibility to ensure that the native resource exists as long as necessary.

[static] QQuickGraphicsDevice QQuickGraphicsDevice::fromOpenGLContext(QOpenGLContext *context)

Returns a new QQuickGraphicsDevice referencing an existing OpenGL context.

This factory function is suitable for OpenGL.

It is up the caller to ensure that context is going to be compatible and usable with the QQuickWindow. Platform-specific mismatches in the associated QSurfaceFormat, or threading issues due to attempting to use context on multiple threads are up to the caller to avoid.

[static] QQuickGraphicsDevice QQuickGraphicsDevice::fromPhysicalDevice(VkPhysicalDevice physicalDevice)

Returns a new QQuickGraphicsDevice referencing an existing physicalDevice.

This factory function is suitable for Vulkan, particularly in combination with OpenXR.

the resulting QQuickGraphicsDevice does not own any native resources, it merely contains references. It is the caller's responsibility to ensure that the native resource exists as long as necessary.

bool QQuickGraphicsDevice::isNull() const

Returns true if this is a default constructed graphics device that does not reference any native objects.

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