Hi,
I have a very weired error with the following simple vertex and fragment shader:
#version 430 core
layout(location = 1) in vec4 offset;
layout(location = 2) in vec4 color;
out VS_OUT
{
vec4 col;
} vs_out;
void main(void)
{
const vec4[3] vertices = vec4[3](
vec4(0.25f, 0.25f, 0.0f, 1.0f),
vec4(0.25f, -0.25f, 0.0f, 1.0f),
vec4(-0.25f, -0.25f, 0.0f, 1.0f)
);
vs_out.col = color;
gl_Position = vertices[gl_VertexID] + offset;
}
#version 430 core
out vec4 color;
in VS_OUT
{
vec4 col;
} vs_in;
void main(void)
{
color = vs_in.col;
}
With that combination I get a strange parse error (#132 Syntax error: “texID” parse error). But, when I change the interface block in der vertex shader (and only there) to the following (changing the brace style), then the program works:
out VS_OUT {
vec4 col;
} vs_out;
What is my mistake?
(I’m using the c++ wrapper oglplus)
Vaniax