My project was running fine using Qt 5.1 or 5.4 (can't remember which old version I was on). Then I upgraded to Qt 5.6.1 and now when my program runs QOpenGLShader throws these errors (note that none of these are my shaders, but are internal to Qt). I get the same errors for these named shaders: simpleShaderProg and blitShaderProg and also for Fragment shader: main=MainFragmentShader

I'm not really sure how to fix this as I'm not sure what changed. I'm on Windows 8 (Bootcamp), VS2013.
Thank you for the help!


Qt Code:
  1. QOpenGLShader::compile(Vertex): Vertex shader failed to compile with the followi
  2. ng errors:
  3. ERROR: error(#272) Implicit version number 110 not supported by GL3 forward comp
  4. atible context
  5. ERROR: error(#273) 1 compilation errors. No code generated
  6.  
  7.  
  8. *** Problematic Vertex shader source code ***
  9. #define lowp
  10. #define mediump
  11. #define highp
  12. #line 1
  13.  
  14. void setPosition();
  15. void main(void)
  16. {
  17. setPosition();
  18. }
  19.  
  20. attribute highp vec2 vertexCoordsArray;
  21. attribute highp vec3 pmvMatrix1;
  22. attribute highp vec3 pmvMatrix2;
  23. attribute highp vec3 pmvMatrix3;
  24. void setPosition(void)
  25. {
  26. highp mat3 pmvMatrix = mat3(pmvMatrix1, pmvMatrix2, pmvMatrix3);
  27. vec3 transformedPos = pmvMatrix * vec3(vertexCoordsArray.xy, 1.0);
  28. gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z);
  29. }
  30.  
  31. ***
  32. Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader)
  33. failed to compile
  34. QOpenGLShader::compile(Fragment): Fragment shader failed to compile with the fol
  35. lowing errors:
  36. ERROR: error(#272) Implicit version number 110 not supported by GL3 forward comp
  37. atible context
  38. ERROR: error(#273) 1 compilation errors. No code generated
  39.  
  40.  
  41. *** Problematic Fragment shader source code ***
  42. #define lowp
  43. #define mediump
  44. #define highp
  45. #line 1
  46.  
  47. lowp vec4 srcPixel();
  48. void main()
  49. {
  50. gl_FragColor = srcPixel();
  51. }
  52.  
  53. lowp vec4 srcPixel()
  54. {
  55. return vec4(0.98, 0.06, 0.75, 1.0);
  56. }
  57.  
  58. ***
  59. Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragme
  60. ntShader) failed to compile
  61. QOpenGLShader::link: "Vertex and Fragment shader(s) were not successfully compil
  62. ed before glLinkProgram() was called. Link failed. \n"
  63. Errors linking simple shader: Vertex and Fragment shader(s) were not successfull
  64. y compiled before glLinkProgram() was called. Link failed.
  65.  
  66. QOpenGLShader::compile(Vertex): Vertex shader failed to compile with the followi
  67. ng errors:
  68. ERROR: error(#272) Implicit version number 110 not supported by GL3 forward comp
  69. atible context
  70. ERROR: error(#273) 1 compilation errors. No code generated
  71.  
  72.  
  73. *** Problematic Vertex shader source code ***
  74. #define lowp
  75. #define mediump
  76. #define highp
  77. #line 1
  78.  
  79. attribute highp vec2 textureCoordArray;
  80. varying highp vec2 textureCoords;
  81. void setPosition();
  82. void main(void)
  83. {
  84. setPosition();
  85. textureCoords = textureCoordArray;
  86. }
  87.  
  88. attribute highp vec4 vertexCoordsArray;
  89. void setPosition(void)
  90. {
  91. gl_Position = vertexCoordsArray;
  92. }
  93.  
  94. ***
  95. Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader & UntransformedP
  96. ositionVertexShader) failed to compile
  97. QOpenGLShader::compile(Fragment): Fragment shader failed to compile with the fol
  98. lowing errors:
  99. ERROR: error(#272) Implicit version number 110 not supported by GL3 forward comp
  100. atible context
  101. ERROR: error(#273) 1 compilation errors. No code generated
  102.  
  103.  
  104. *** Problematic Fragment shader source code ***
  105. #define lowp
  106. #define mediump
  107. #define highp
  108. #line 1
  109.  
  110. lowp vec4 srcPixel();
  111. void main()
  112. {
  113. gl_FragColor = srcPixel();
  114. }
  115.  
  116. varying highp vec2 textureCoords;
  117. uniform sampler2D imageTexture;
  118. lowp vec4 srcPixel()
  119. {
  120. return texture2D(imageTexture, textureCoords);
  121. }
  122.  
  123. ***
  124. Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader)
  125. failed to compile
  126. QOpenGLShader::link: "Vertex and Fragment shader(s) were not successfully compil
  127. ed before glLinkProgram() was called. Link failed. \n"
  128. Errors linking blit shader: Vertex and Fragment shader(s) were not successfully
  129. compiled before glLinkProgram() was called. Link failed.
  130.  
  131. libpng warning: iCCP: known incorrect sRGB profile
  132. libpng warning: iCCP: known incorrect sRGB profile
  133. QOpenGLShader::compile(Fragment)[Fragment shader: main=MainFragmentShader, srcPi
  134. xel=ImageSrcFragmentShader, composition=NoCompositionModeFragmentShader, mask=No
  135. MaskFragmentShader]: Fragment shader failed to compile with the following errors
  136. :
  137. ERROR: error(#272) Implicit version number 110 not supported by GL3 forward comp
  138. atible context
  139. ERROR: error(#273) 1 compilation errors. No code generated
  140.  
  141.  
  142. *** Problematic Fragment shader source code ***
  143. #define lowp
  144. #define mediump
  145. #define highp
  146. #line 1
  147.  
  148. lowp vec4 srcPixel();
  149. void main()
  150. {
  151. gl_FragColor = srcPixel();
  152. }
  153.  
  154. varying highp vec2 textureCoords;
  155. uniform sampler2D imageTexture;
  156. lowp vec4 srcPixel()
  157. {
  158. return texture2D(imageTexture, textureCoords);
  159. }
  160.  
  161. ***
  162. Warning: "Fragment shader: main=MainFragmentShader, srcPixel=ImageSrcFragmentSha
  163. der, composition=NoCompositionModeFragmentShader, mask=NoMaskFragmentShader" fai
  164. led to compile!
  165. QOpenGLShader::compile(Fragment)[Fragment shader: main=MainFragmentShader, srcPi
  166. xel=ImageSrcFragmentShader, composition=NoCompositionModeFragmentShader, mask=No
  167. MaskFragmentShader]: Fragment shader failed to compile with the following errors
  168. :
  169. ERROR: error(#272) Implicit version number 110 not supported by GL3 forward comp
  170. atible context
  171. ERROR: error(#273) 1 compilation errors. No code generated
  172.  
  173.  
  174. *** Problematic Fragment shader source code ***
  175. #define lowp
  176. #define mediump
  177. #define highp
  178. #line 1
  179.  
  180. lowp vec4 srcPixel();
  181. void main()
  182. {
  183. gl_FragColor = srcPixel();
  184. }
  185.  
  186. varying highp vec2 textureCoords;
  187. uniform sampler2D imageTexture;
  188. lowp vec4 srcPixel()
  189. {
  190. return texture2D(imageTexture, textureCoords);
  191. }
  192.  
  193. ***
  194. Warning: "Fragment shader: main=MainFragmentShader, srcPixel=ImageSrcFragmentSha
  195. der, composition=NoCompositionModeFragmentShader, mask=NoMaskFragmentShader" fai
  196. led to compile!
  197. QOpenGLShader::compile(Fragment)[Fragment shader: main=MainFragmentShader, srcPi
  198. xel=ImageSrcFragmentShader, composition=NoCompositionModeFragmentShader, mask=No
  199. MaskFragmentShader]: Fragment shader failed to compile with the following errors
  200. :
  201. ERROR: error(#272) Implicit version number 110 not supported by GL3 forward comp
  202. atible context
  203. ERROR: error(#273) 1 compilation errors. No code generated
  204.  
  205.  
  206. *** Problematic Fragment shader source code ***
  207. #define lowp
  208. #define mediump
  209. #define highp
  210. #line 1
  211.  
  212. lowp vec4 srcPixel();
  213. void main()
  214. {
  215. gl_FragColor = srcPixel();
  216. }
  217.  
  218. varying highp vec2 textureCoords;
  219. uniform sampler2D imageTexture;
  220. lowp vec4 srcPixel()
  221. {
  222. return texture2D(imageTexture, textureCoords);
  223. }
  224.  
  225. ***
  226. Warning: "Fragment shader: main=MainFragmentShader, srcPixel=ImageSrcFragmentSha
  227. der, composition=NoCompositionModeFragmentShader, mask=NoMaskFragmentShader" fai
  228. led to compile!
To copy to clipboard, switch view to plain text mode