diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-05-19 07:29:14 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-05-25 13:39:32 +0200 |
commit | 5d4d598354c85de7bf33412b42a5693b4ac27d78 (patch) | |
tree | 96e892cf15c6720db0c9aaf7060bde18ed8b44ca /examples/quick/scenegraph | |
parent | de41077a57313f67e330de5a60281be81b414a1d (diff) |
Adapt to changes in NativeTexture in qtbase
To make the API less error prone, we have changed the
void pointer to the texture handle to a 64-bit in
instead, since all handles are maximum 64-bit.
Task-number: QTBUG-78638
Change-Id: I9d995d6a883b3377f57d7c5b19d4bc4e15aa347b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'examples/quick/scenegraph')
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm index 61f5e7f8e1..e676ff2e5e 100644 --- a/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm +++ b/examples/quick/scenegraph/metaltextureimport/metaltextureimport.mm @@ -264,7 +264,7 @@ void CustomTextureNode::sync() [desc release]; QSGTexture *wrapper = m_window->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, - &m_texture, + quint64(m_texture), 0, m_size); diff --git a/examples/quick/scenegraph/opengltextureinthread/threadrenderer.cpp b/examples/quick/scenegraph/opengltextureinthread/threadrenderer.cpp index 8c07785926..6f6ec467dc 100644 --- a/examples/quick/scenegraph/opengltextureinthread/threadrenderer.cpp +++ b/examples/quick/scenegraph/opengltextureinthread/threadrenderer.cpp @@ -161,7 +161,7 @@ public: { // Our texture node must have a texture, so use the default 0 texture. GLuint id = 0; - m_texture = m_window->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, &id, 0, QSize(1, 1)); + m_texture = m_window->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, id, 0, QSize(1, 1)); setTexture(m_texture); setFiltering(QSGTexture::Linear); } @@ -202,7 +202,7 @@ public slots: delete m_texture; // note: include QQuickWindow::TextureHasAlphaChannel if the rendered content // has alpha. - m_texture = m_window->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, &newId, 0, QSize(1, 1)); + m_texture = m_window->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, newId, 0, QSize(1, 1)); setTexture(m_texture); markDirty(DirtyMaterial); diff --git a/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.cpp b/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.cpp index 964984085e..72833df7f5 100644 --- a/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.cpp +++ b/examples/quick/scenegraph/vulkantextureimport/vulkantextureimport.cpp @@ -717,7 +717,7 @@ void CustomTextureNode::sync() freeTexture(); buildTexture(m_size); QSGTexture *wrapper = m_window->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, - &m_texture, + quint64(m_texture), VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, m_size); setTexture(wrapper); |