summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-04-10 11:49:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-17 10:59:03 +0200
commit7aac93b6ce4e88c8e47c4b2cd8c283daeac5cdb3 (patch)
tree40a5eda5e056be7ad4a3740d91ba3b223daff491 /src/gui/opengl
parent8b0fd78caa8e257757d3eb84732e38cf735b2136 (diff)
Remove internal public function from QOpenGLFunctions
QOpenGLContext uses glGetTexLevelParameteriv on desktop OpenGL and so it got recently added to QOpenGLFunctions as part of the dynamic GL loading support. This is unnecessary since such desktop-only code can use the versioned wrappers (QOpenGLFunction_1_0 for example). In related upcoming changes in 5.4 the function is removed. This change has to be backported to 5.3 to prevent introducing this public API unnecessarily. Change-Id: I6fc331091e4e6416e430bf985afcc17a392fc2e3 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp25
-rw-r--r--src/gui/opengl/qopenglfunctions.h24
2 files changed, 2 insertions, 47 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index eb2c98e1f5..af536fa927 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -2012,12 +2012,6 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
*/
/*!
- \fn void QOpenGLFunctions::glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
-
- \internal
-*/
-
-/*!
\fn bool QOpenGLFunctions::isInitialized(const QOpenGLFunctionsPrivate *d)
\internal
*/
@@ -3174,15 +3168,7 @@ static void QOPENGLF_APIENTRY qopenglfResolveGetBufferSubData(GLenum target, qop
(target, offset, size, data);
}
-#ifndef QT_OPENGL_ES_2
-// Desktop only
-
-static void QOPENGLF_APIENTRY qopenglfResolveGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
-{
- RESOLVE_FUNC_VOID(0, GetTexLevelParameteriv)(target, level, pname, params);
-}
-
-#ifndef QT_OPENGL_DYNAMIC
+#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_DYNAMIC)
// Special translation functions for ES-specific calls on desktop GL
static void QOPENGLF_APIENTRY qopenglfTranslateClearDepthf(GLclampf depth)
@@ -3194,10 +3180,7 @@ static void QOPENGLF_APIENTRY qopenglfTranslateDepthRangef(GLclampf zNear, GLcla
{
::glDepthRange(zNear, zFar);
}
-
-#endif // QT_OPENGL_DYNAMIC
-
-#endif // QT_OPENGL_ES2
+#endif // !ES && !DYNAMIC
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *)
{
@@ -3256,8 +3239,6 @@ QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *)
TexParameteriv = qopenglfResolveTexParameteriv;
TexSubImage2D = qopenglfResolveTexSubImage2D;
Viewport = qopenglfResolveViewport;
-
- GetTexLevelParameteriv = qopenglfResolveGetTexLevelParameteriv;
} else {
#ifndef QT_OPENGL_DYNAMIC
// Use the functions directly. This requires linking QtGui to an OpenGL implementation.
@@ -3308,8 +3289,6 @@ QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *)
TexParameteriv = ::glTexParameteriv;
TexSubImage2D = ::glTexSubImage2D;
Viewport = ::glViewport;
-
- GetTexLevelParameteriv = ::glGetTexLevelParameteriv;
#else // QT_OPENGL_DYNAMIC
// This should not happen.
qFatal("QOpenGLFunctions: Dynamic OpenGL builds do not support platforms with insufficient function resolving capabilities");
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 03c12200d5..de1de39db2 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -407,9 +407,6 @@ public:
void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
- // OpenGL1, not GLES2
- void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params);
-
protected:
QOpenGLFunctionsPrivate *d_ptr;
static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != 0; }
@@ -565,9 +562,6 @@ struct QOpenGLFunctionsPrivate
void (QOPENGLF_APIENTRYP VertexAttrib4fv)(GLuint indx, const GLfloat* values);
void (QOPENGLF_APIENTRYP VertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
- // OpenGL1 only, not GLES2
- void (QOPENGLF_APIENTRYP GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
-
// Special non-ES OpenGL variants, not to be called directly
void (QOPENGLF_APIENTRYP ClearDepth)(GLdouble depth);
void (QOPENGLF_APIENTRYP DepthRange)(GLdouble zNear, GLdouble zFar);
@@ -2154,24 +2148,6 @@ inline void QOpenGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLe
Q_OPENGL_FUNCTIONS_DEBUG
}
-// OpenGL1, not GLES2
-
-inline void QOpenGLFunctions::glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
-{
-#ifdef QT_OPENGL_ES_2
- Q_UNUSED(target);
- Q_UNUSED(level);
- Q_UNUSED(pname);
- Q_UNUSED(params);
- // Cannot get here.
- qFatal("QOpenGLFunctions: glGetTexLevelParameteriv not available with OpenGL ES");
-#else
- Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
- d_ptr->GetTexLevelParameteriv(target, level, pname, params);
-#endif
- Q_OPENGL_FUNCTIONS_DEBUG
-}
-
QT_END_NAMESPACE
#endif // QT_NO_OPENGL