From fb96109bbc2ec5d83171a70d6c164d79695d2ddd Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 29 Jun 2020 16:09:46 +0200 Subject: Add type safe native texture accessors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following the pattern from QtGui. Task-number: QTBUG-85239 Change-Id: I07b4456028d0f45223ad10e55ce65f423bab6a9b Reviewed-by: Tor Arne Vestbø --- examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm') diff --git a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm index e676ff2e5e..fa55a95ffd 100644 --- a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm +++ b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm @@ -263,10 +263,7 @@ void CustomTextureNode::sync() m_texture = [m_device newTextureWithDescriptor: desc]; [desc release]; - QSGTexture *wrapper = m_window->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, - quint64(m_texture), - 0, - m_size); + QSGTexture *wrapper = QPlatformInterface::QSGMetalTexture::fromNative((MTLTexture *) m_texture, m_window, m_size); qDebug() << "Got QSGTexture wrapper" << wrapper << "for an MTLTexture of size" << m_size; -- cgit v1.2.3