How to figure out which GLSL (ESSL) version Qt uses on my PC?
-
I'm using ESSL (OpenGL ES Shading language) via Canvas3D in Qt. On my machine I run Windows and have set the following:
QGuiApplication::setAttribute(Qt::AA_UseOpenGLES);
in
main()
, which means that GL calls get translated by Qt to GL ES calls, which get translated by ANGLE to Direct3D calls. At least I believe that's what it means. I'm using the following test QML code to see what OpenGL version is used:Text { text: OpenGLInfo.majorVersion + "." + OpenGLInfo.minorVersion }
This displays "2.0". I'm not sure if that's the GL API version or the GL ES API version. Also I'm not sure which ESSL version this GL/GLES version maps to. I found a table mapping the versions here but that's not a reliable enough source for me. Also unlike the ESSL docs it lists ESSL versions in a decimal-point-free format, e.g. version "330" rather than "3.3", and it lacks e.g. version 3.00 (aka 300) which the ESSL docs mention.
So the question is:
How to figure out which ESSL version Qt uses on my PC?Side note - what prompted my question:
I want to use the
textureSize
ESSL function, but I'm getting the following error:ERROR: 0:4: 'textureSize' : no matching overloaded function found ERROR: 0:4: '=' : cannot convert from 'const float' to 'highp 2-component vector of int'
My test shader looks like this:
uniform sampler2D uSampler; void main(void) { highp ivec2 texSize = textureSize(uSampler, 0); gl_FragColor = vec4(0.0); }