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>
This commit is contained in:
parent
7967cb4f48
commit
95427b0f40
@ -384,7 +384,7 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi
|
||||
{
|
||||
QOpenGLContext *ctx = QOpenGLContext::currentContext();
|
||||
|
||||
funcs.initializeGLFunctions();
|
||||
funcs.initializeOpenGLFunctions();
|
||||
|
||||
if (!funcs.hasOpenGLFeature(QOpenGLFunctions::Framebuffers))
|
||||
return;
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user