Skip to content

Commit 8bac84c

Browse files
author
Trond Kjernåsen
committed
Revert "Don't define highp/mediump/lowp if desktop GL has them"
This reverts commit 6155050. The GL_ARB_ES2_compatibility extension does not mention the lowp, mediump or highp keywords. Task-number: QTBUG-14384 Reviewed-by: Samuel Reviewed-by: Prasanth
1 parent b892a9a commit 8bac84c

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

dist/changes-4.6.4

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ QtOpenGL
6666
- QGLShaderProgram
6767
* [QTBUG-12478] Don't resolve GLSL extensions if no shaders.
6868
* [QTBUG-12591] setUniformValue(QSize) was setting (w,w) not (w,h).
69-
* [QTBUG-12862] Don't #define highp/mediump/lowp if the desktop OpenGL
70-
implementation has the GL_ARB_ES2_compatibility extension.
7169
* [QTBUG-12554] Wrong OpenGLVersionFlags on OpenGL 4.0 systems.
7270

7371
QtScript
@@ -109,7 +107,7 @@ Third party components
109107
Qt for Unix (X11 and Mac OS X)
110108
------------------------------
111109

112-
-
110+
-
113111

114112
Qt for Linux/X11
115113
----------------

src/opengl/qgl.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4933,8 +4933,6 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
49334933
glExtensions |= FragmentShader;
49344934
if (extensions.match("GL_ARB_shader_objects"))
49354935
glExtensions |= FragmentShader;
4936-
if (extensions.match("GL_ARB_ES2_compatibility"))
4937-
glExtensions |= ES2Compatibility;
49384936
if (extensions.match("GL_ARB_texture_mirrored_repeat"))
49394937
glExtensions |= MirroredRepeat;
49404938
if (extensions.match("GL_EXT_framebuffer_object"))
@@ -4953,7 +4951,6 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
49534951
glExtensions |= FramebufferObject;
49544952
glExtensions |= GenerateMipmap;
49554953
glExtensions |= FragmentShader;
4956-
glExtensions |= ES2Compatibility;
49574954
#endif
49584955
#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
49594956
if (extensions.match("GL_OES_framebuffer_object"))

src/opengl/qgl_p.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ class QGLExtensions {
291291
DDSTextureCompression = 0x00008000,
292292
ETC1TextureCompression = 0x00010000,
293293
PVRTCTextureCompression = 0x00020000,
294-
FragmentShader = 0x00040000,
295-
ES2Compatibility = 0x00080000
294+
FragmentShader = 0x00040000
296295
};
297296
Q_DECLARE_FLAGS(Extensions, Extension)
298297

src/opengl/qglshaderprogram.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ QT_BEGIN_NAMESPACE
9797
to just features that are present in GLSL/ES, and avoid
9898
standard variable names that only work on the desktop.
9999
100-
If the \c{GL_ARB_ES2_compatibility} extension is present,
101-
then the above prefix is not added because the desktop OpenGL
102-
implementation supports precision qualifiers.
103-
104100
\section1 Simple shader example
105101
106102
\snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 1
@@ -394,10 +390,8 @@ bool QGLShader::compileSourceCode(const char *source)
394390
srclen.append(GLint(headerLen));
395391
}
396392
#ifdef QGL_DEFINE_QUALIFIERS
397-
if (!(QGLExtensions::glExtensions() & QGLExtensions::ES2Compatibility)) {
398-
src.append(qualifierDefines);
399-
srclen.append(GLint(sizeof(qualifierDefines) - 1));
400-
}
393+
src.append(qualifierDefines);
394+
srclen.append(GLint(sizeof(qualifierDefines) - 1));
401395
#endif
402396
#ifdef QGL_REDEFINE_HIGHP
403397
if (d->shaderType == Fragment) {

0 commit comments

Comments
 (0)