summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-06-12 10:21:37 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-18 21:58:30 +0200
commit95427b0f40857c42ccf87e66d7bbf6fd2cc3ab83 (patch)
tree4086aeb2c3bda09f8286b804771f01455b2bf518 /src
parent7967cb4f4860df436dc2e7e21c4eaca6a9b05f70 (diff)
Fixed QOpenGLFunctions API.
We don't use the GL short term in the new API. Change-Id: I73a51f65f5f4216c1763b95dcddf68fe8fc229d1 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp2
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp4
-rw-r--r--src/gui/opengl/qopenglfunctions.h6
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp2
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp2
5 files changed, 10 insertions, 6 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index ea75dd4cdf..2fc45fd2c9 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -384,7 +384,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi
{
QOpenGLContext *ctx = QOpenGLContext::currentContext();
- funcs.initializeGLFunctions();
+ funcs.initializeOpenGLFunctions();
if (!funcs.hasOpenGLFeature(QOpenGLFunctions::Framebuffers))
return;
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index f19d4735e1..3c77e92fed 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -446,10 +446,10 @@ bool QOpenGLExtensions::hasOpenGLExtension(QOpenGLExtensions::OpenGLExtension ex
After calling this function, the QOpenGLFunctions object can only be
used with the current context and other contexts that share with it.
- Call initializeGLFunctions() again to change the object's context
+ Call initializeOpenGLFunctions() again to change the object's context
association.
*/
-void QOpenGLFunctions::initializeGLFunctions()
+void QOpenGLFunctions::initializeOpenGLFunctions()
{
d_ptr = qt_gl_functions();
}
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 87029849e3..fc55a6b384 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -224,7 +224,11 @@ public:
QOpenGLFunctions::OpenGLFeatures openGLFeatures() const;
bool hasOpenGLFeature(QOpenGLFunctions::OpenGLFeature feature) const;
- void initializeGLFunctions();
+ void initializeOpenGLFunctions();
+
+#if QT_DEPRECATED_SINCE(5, 0)
+ QT_DEPRECATED void initializeGLFunctions() { initializeOpenGLFunctions(); }
+#endif
void glActiveTexture(GLenum texture);
void glAttachShader(GLuint program, GLuint shader);
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 73be87bc1d..138a11a469 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -1924,7 +1924,7 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->ctx = QOpenGLContext::currentContext();
d->ctx->d_func()->active_engine = this;
- d->funcs.initializeGLFunctions();
+ d->funcs.initializeOpenGLFunctions();
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i)
d->vertexAttributeArraysEnabledState[i] = false;
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index e9973be2ab..264a1985b6 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -594,7 +594,7 @@ bool QOpenGLShaderProgram::init()
QOpenGLContext *context = const_cast<QOpenGLContext *>(QOpenGLContext::currentContext());
if (!context)
return false;
- d->glfuncs->initializeGLFunctions();
+ d->glfuncs->initializeOpenGLFunctions();
GLuint program = d->glfuncs->glCreateProgram();
if (!program) {
qWarning() << "QOpenGLShaderProgram: could not create shader program";