aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-08-10 12:22:56 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-08-13 07:59:32 +0200
commitcf9b3c334d70d5018b438f37518b057ead9199c0 (patch)
tree7d692ca59e460ac04eecae2586ba7e1cfb5a2f61 /src
parenta111b1b108f2d3344cb2b2b677e738fd9dd68945 (diff)
Remove QQuickWindow::glslVersion & glslIsCoreProfile
Superceded by the OpenGLInfo attached type => remove the API before it gets released Change-Id: I7511fd28eb375eb3cd3cdd4bda6d82c1883e3094 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickwindow.cpp81
-rw-r--r--src/quick/items/qquickwindow.h5
2 files changed, 0 insertions, 86 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 1971c0a14e..a06f41c045 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -3623,87 +3623,6 @@ void QQuickWindow::resetOpenGLState()
}
/*!
- \brief QQuickWindow::glslVersion
- \since 5.4
- \return The OpenGL Shading Language version for this window.
-
- QML components that need to be usable on different platforms and environments may need
- to deal with different OpenGL versions if they include ShaderEffect items. The source
- code for a given shader may not be compatible with an OpenGL context that targets a
- different OpenGL version or profile, hence it might be necessary to provide multiple
- versions of the shader. This property helps in deciding which shader source should be
- chosen.
-
- The value corresponds to GLSL version declarations, for example an OpenGL 4.2 core
- profile context will result in the value \e{420 core}, while an OpenGL ES 3.0 context
- gives \e{300 es}. For OpenGL (ES) 2 the value will be an empty string since the
- corresponding shading language does not use version declarations.
-
- \note The value does not necessarily indicate that the shader source must target that
- specific version. For example, compatibility profiles and ES 3.x all allow using
- OpenGL 2 style shaders. The most important for reusable components is to check for
- core profiles since these do not accept shaders with the old syntax.
-
- \sa setFormat(), glslIsCoreProfile()
- */
-QString QQuickWindow::glslVersion() const
-{
- QString ver;
- QOpenGLContext *ctx = openglContext();
- if (ctx) {
- const QSurfaceFormat fmt = ctx->format();
- if (fmt.renderableType() == QSurfaceFormat::OpenGLES
- && fmt.majorVersion() >= 3) {
- ver += QLatin1Char(fmt.majorVersion() + '0');
- ver += QLatin1Char(fmt.minorVersion() + '0');
- ver += QLatin1String("0 es");
- } else if (fmt.renderableType() == QSurfaceFormat::OpenGL
- && fmt.majorVersion() >= 3) {
- if (fmt.version() == qMakePair(3, 0)) {
- ver = QStringLiteral("130");
- } else if (fmt.version() == qMakePair(3, 1)) {
- ver = QStringLiteral("140");
- } else if (fmt.version() == qMakePair(3, 2)) {
- ver = QStringLiteral("150");
- } else {
- ver += QLatin1Char(fmt.majorVersion() + '0');
- ver += QLatin1Char(fmt.minorVersion() + '0');
- ver += QLatin1Char('0');
- }
- if (fmt.version() >= qMakePair(3, 2)) {
- if (fmt.profile() == QSurfaceFormat::CoreProfile)
- ver += QStringLiteral(" core");
- else if (fmt.profile() == QSurfaceFormat::CompatibilityProfile)
- ver += QStringLiteral(" compatibility");
- }
- }
- }
- return ver;
-}
-
-/*!
- \brief QQuickWindow::glslIsCoreProfile
- \since 5.4
- \return True if the window is rendering using OpenGL core profile.
-
- This is convenience function to check if the window's OpenGL context is a core profile
- context. It is more efficient to perform the check via this function than parsing the
- string returned from glslVersion().
-
- Resusable QML components will typically use this function in bindings in order to
- choose between core and non core profile compatible shader sources.
-
- To retrieve more information about the shading language, use glslVersion().
-
- \sa glslVersion(), setFormat()
- */
-bool QQuickWindow::glslIsCoreProfile() const
-{
- QOpenGLContext *ctx = openglContext();
- return ctx ? ctx->format().profile() == QSurfaceFormat::CoreProfile : false;
-}
-
-/*!
\qmlproperty string Window::title
The window's title in the windowing system.
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h
index 7757168aa3..89780e4b75 100644
--- a/src/quick/items/qquickwindow.h
+++ b/src/quick/items/qquickwindow.h
@@ -70,8 +70,6 @@ class Q_QUICK_EXPORT QQuickWindow : public QWindow
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
Q_PROPERTY(QQuickItem* contentItem READ contentItem CONSTANT)
Q_PROPERTY(QQuickItem* activeFocusItem READ activeFocusItem NOTIFY activeFocusItemChanged REVISION 1)
- Q_PROPERTY(QString glslVersion READ glslVersion CONSTANT REVISION 2)
- Q_PROPERTY(bool glslIsCoreProfile READ glslIsCoreProfile CONSTANT REVISION 2)
Q_CLASSINFO("DefaultProperty", "data")
Q_DECLARE_PRIVATE(QQuickWindow)
public:
@@ -150,9 +148,6 @@ public:
QOpenGLContext *openglContext() const;
- QString glslVersion() const;
- bool glslIsCoreProfile() const;
-
void scheduleRenderJob(QRunnable *job, RenderStage schedule);
static QQuickWindowAttached *qmlAttachedProperties(QObject *object);