Fix custommaterial example with OpenGL

The member names in the "uniform block" (which is in practice
mapped to a struct uniform with GLSL) must match between the
vertex and fragment shaders, even if the member is not used in
one of the shaders. This is because OpenGL/GLSL's interface
matching rules, which would cause the shader program fail to
link due to a mismatch in the structs in the two shaders.

Pick-to: 6.1 6.0
Change-Id: I9a928b4b20fdff14530c16a93a52967ce6c328a3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Laszlo Agocs 2021-02-18 19:21:28 +01:00
parent b1ae151acc
commit 21d9cd844e
3 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ layout(location = 0) out vec2 vTexCoord;
layout(std140, binding = 0) uniform buf {
mat4 qt_Matrix;
float qt_Opacity;
float scale;
float zoom;
vec2 center;
int limit;
} ubuf;