Unsolved Fragment shader seems to fail to compile but the problematic fragment shader code is not mine
-
The Qt opengl\cube example project works but it is output'ing the following message to DbgView:
[1996] QOpenGLShader::compile(Fragment): ERROR: 4:1: 'textureSampler' : syntax error syntax error [1996] [1996] [1996] *** Problematic Fragment shader source code *** [1996] #version 110 [1996] #ifdef GL_KHR_blend_equation_advanced [1996] #extension GL_ARB_fragment_coord_conventions : enable [1996] #extension GL_KHR_blend_equation_advanced : enable [1996] #endif [1996] #define lowp [1996] #define mediump [1996] #define highp [1996] #line 1 [1996] varying highp vec2 uv;uniform sampler2DRect textureSampler;uniform bool swizzle;uniform highp float opacity;void main() { highp vec4 tmpFragColor = texture2DRect(textureSampler,uv); tmpFragColor.a *= opacity; gl_FragColor = swizzle ? tmpFragColor.bgra : tmpFragColor;} [1996] ***
I am using Qt 5.15.8. The platform is Windows 7.
The computer is supposed to support OpenGL4.4:
-
Hi,
Which version of Qt are you using ?
Do you have the same issue if you run Qt's OpenGL examples ? -
This post is deleted!