我的应用程序返回错误:
Fragment shader failed to compile with the following errors:
ERROR: 0:5: error(#132) Syntax error: 'out' parse error
ERROR: error(#273) 1 compilation errors. No code generated
每当我执行以下代码时:
片段.fs
#version 330
in vec4 color
out vec4 fragColor;
void main() {
fragColor = color;
}
顶点.vs
#version 330
layout (location = 0) in vec3 position;
out vec4 color;
uniform float uniformFloat;
void main() {
color = vec4(clamp(position, 0.0, 1.0), 1.0);
gl_Position = vec4(position, 1.0);
}
我该如何解决这个问题?