View Full Version : ERROR: 0:17:'f' : syntax error parse error

08-23-2010, 10:13 AM
I get the follwing error when I tried to compile .vert file.

ERROR: 0:17:'f' : syntax error parse error

The code is shown as follws.

#version 110

uniform mat4 projection_matrix;
uniform mat4 modelview_matrix;
uniform mat3 normal_matrix;

attribute vec3 a_Vertex;
attribute vec2 a_TexCoord0;

varying vec4 color;
varying vec2 texCoord0;

void main(void)
vec4 pos = modelview_matrix * vec4(a_Vertex, 1.0);

color = vec4(0.8f, 0.8f, 1.0f, 0.95f);
texCoord0 = a_TexCoord0;
gl_Position = projection_matrix * pos;

I had worked with it for a long time and still cannot find the solution.
Can someone figure out if there is anything wrong?

08-23-2010, 12:05 PM
f as a suffix isn't valid in glsl before version 1.2. From version 4.0 onwards, you can also use lf or LF to specify a double.