avoid deprecation warnings
This commit is contained in:
parent
32b638a2eb
commit
89b8321ed7
|
@ -10,7 +10,7 @@
|
|||
|
||||
QskGraphicImageProvider::QskGraphicImageProvider(
|
||||
const QString& providerId, ImageType type )
|
||||
: QQuickImageProvider( type, 0 )
|
||||
: QQuickImageProvider( type )
|
||||
, m_providerId( providerId )
|
||||
{
|
||||
}
|
||||
|
|
|
@ -32,7 +32,15 @@ QSGTexture* QskGraphicTextureFactory::createTexture( QQuickWindow* window ) cons
|
|||
const auto flags = static_cast< QQuickWindow::CreateTextureOptions >(
|
||||
QQuickWindow::TextureHasAlphaChannel | QQuickWindow::TextureOwnsGLTexture );
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
|
||||
const int nativeLayout = 0; // VkImageLayout in case of Vulkan
|
||||
|
||||
return window->createTextureFromNativeObject(
|
||||
QQuickWindow::NativeObjectTexture, &textureId, nativeLayout,
|
||||
m_size, flags );
|
||||
#else
|
||||
return window->createTextureFromId( textureId, m_size, flags );
|
||||
#endif
|
||||
}
|
||||
|
||||
QSize QskGraphicTextureFactory::textureSize() const
|
||||
|
|
Loading…
Reference in New Issue