QSGD3D11Texture Struct
struct QNativeInterface::QSGD3D11TextureProvides access to and enables adopting Direct3D 11 texture objects. More...
Header: | #include <QSGD3D11Texture> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
qmake: | QT += quick |
Since: | Qt 6.0 |
- List of all members, including inherited members
- QSGD3D11Texture is part of Native Interfaces and .
Public Functions
QSGD3D11Texture(QNativeInterface::QSGD3D11Texture &&) | |
QSGD3D11Texture(const QNativeInterface::QSGD3D11Texture &) | |
QSGD3D11Texture() | |
QNativeInterface::QSGD3D11Texture & | operator=(QNativeInterface::QSGD3D11Texture &&) |
QNativeInterface::QSGD3D11Texture & | operator=(const QNativeInterface::QSGD3D11Texture &) |
virtual void * | nativeTexture() const = 0 |
Static Public Members
QSGTexture * | fromNative(void *texture, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {}) |
Protected Functions
virtual | ~QSGD3D11Texture() |
Related Non-Members
bool | hasTypeInfo() |
Member Function Documentation
QSGD3D11Texture::QSGD3D11Texture(QNativeInterface::QSGD3D11Texture &&)
Default constructs an instance of QSGD3D11Texture.
QSGD3D11Texture::QSGD3D11Texture(const QNativeInterface::QSGD3D11Texture &)
Default constructs an instance of QSGD3D11Texture.
QSGD3D11Texture::QSGD3D11Texture()
Default constructs an instance of QSGD3D11Texture.
QNativeInterface::QSGD3D11Texture &QSGD3D11Texture::operator=(QNativeInterface::QSGD3D11Texture &&)
Move-assignment operator.
QNativeInterface::QSGD3D11Texture &QSGD3D11Texture::operator=(const QNativeInterface::QSGD3D11Texture &)
Copy-assignment operator.
[virtual protected]
QSGD3D11Texture::~QSGD3D11Texture()
Destroys the instance of QSGD3D11Texture. The destructor is virtual.
[static, since 6.0]
QSGTexture *QSGD3D11Texture::fromNative(void *texture, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {})
Creates a new QSGTexture wrapping an existing Direct 3D 11 texture object for window.
The native object is wrapped, but not owned, by the resulting QSGTexture. The caller of the function is responsible for deleting the returned QSGTexture, but that will not destroy the underlying native object.
This function is currently suitable for 2D RGBA textures only.
Warning: This function will return null if the scene graph has not yet been initialized.
Use options to customize the texture attributes. Only the TextureHasAlphaChannel and TextureHasMipmaps are taken into account here.
size specifies the size in pixels.
Note: This function must be called on the scene graph rendering thread.
This function was introduced in Qt 6.0.
See also QQuickWindow::sceneGraphInitialized(), QSGTexture, Scene Graph - Metal Texture Import, and Scene Graph - Vulkan Texture Import.
[pure virtual]
void *QSGD3D11Texture::nativeTexture() const
Returns the ID3D11Texture2D object.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.