aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-04 21:32:01 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-08 09:55:53 +0200
commit3f5e21a0cc9f41f1747e5c431695e7798ee489db (patch)
treeccd9f02554d16f68fb66a8f2dd59368dd1a43c30 /src/quick/items/qquickwindow.cpp
parentc8dd51333f14941d9a5c2d3798768df342aa48d4 (diff)
Remove OpenGL dependency from QSGTexture
The QSGTexture API is now clean, the OpenGL-specific functions are removed. Docs are to be updated in a separate patch. QSGPlainTexture, and a number of texture related places have to follow suit. The OpenGL atlas texture implementation is now removed. Task-number: QTBUG-84717 Task-number: QTBUG-84623 Change-Id: I1aab3b8b9145bb74ad39ef836ce540fc851292c5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index e86bd02335..7cdfde44de 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -4846,59 +4846,6 @@ QSGTexture *QQuickWindow::createTextureFromImage(const QImage &image, CreateText
return d->context->createTexture(image, flags);
}
-
-#if QT_DEPRECATED_SINCE(5, 15)
-/*!
- Creates a new QSGTexture object from an existing OpenGL texture \a id and \a size.
-
- The caller of the function is responsible for deleting the returned texture.
-
- The returned texture will be using \c GL_TEXTURE_2D as texture target and
- assumes that internal format is \c {GL_RGBA}. Reimplement QSGTexture to
- create textures with different parameters.
-
- Use \a options to customize the texture attributes. The TextureUsesAtlas
- option is ignored.
-
- \warning This function will return null if the scenegraph has not yet been
- initialized or OpenGL is not in use.
-
- \note This function only has an effect when using the default OpenGL scene graph
- adaptation.
-
- \note This function has no effect when running on the RHI graphics
- abstraction. Use createTextureFromNativeObject() instead.
-
- \obsolete
-
- \sa sceneGraphInitialized(), QSGTexture
- */
-QSGTexture *QQuickWindow::createTextureFromId(uint id, const QSize &size, CreateTextureOptions options) const
-{
-#if QT_CONFIG(opengl)
- Q_D(const QQuickWindow);
- if (!d->rhi) {
- if (openglContext()) {
- QSGPlainTexture *texture = new QSGPlainTexture();
- texture->setTextureId(id);
- texture->setHasAlphaChannel(options & TextureHasAlphaChannel);
- texture->setOwnsTexture(options & TextureOwnsGLTexture);
- texture->setTextureSize(size);
- return texture;
- }
- } else {
- qWarning("createTextureFromId() must not be called when running on the RHI. "
- "Use createTextureFromNativeObject() instead.");
- }
-#else
- Q_UNUSED(id)
- Q_UNUSED(size)
- Q_UNUSED(options)
-#endif
- return nullptr;
-}
-#endif
-
/*!
\enum QQuickWindow::NativeObjectType
\since 5.14
@@ -4972,13 +4919,6 @@ QSGTexture *QQuickWindow::createTextureFromNativeObject(NativeObjectType type,
texture->setOwnsTexture(true); // texture meaning the QRhiTexture here, not the native object
texture->setTextureSize(size);
return texture;
- } else if (openglContext()) {
- QSGPlainTexture *texture = new QSGPlainTexture;
- texture->setTextureId(uint(nativeObjectHandle));
- texture->setHasAlphaChannel(options & TextureHasAlphaChannel);
- texture->setOwnsTexture(options & TextureOwnsGLTexture);
- texture->setTextureSize(size);
- return texture;
}
#else
Q_UNUSED(nativeObjectHandle);