Hi!
I want to change the origin lower left to the origin upper left corner like it’s explained in the documentation :
https://www.opengl.org/sdk/docs/man/html/gl_FragCoord.xhtml
But I have an error when I try to compiler the shader :
"#version 330 core
"
"layout(origin_upper_left) in vec4 gl_FragCoord;"
"layout(pixel_center_integer);"
"layout(location = 0) in vec3 vertex_position;"
"layout(location = 1) in vec4 vertex_color;"
"layout(location = 2) in vec2 vertex_texCoords0;"
"layout(location = 3) in vec3 vertex_normal;"
"uniform mat4 mvp;"
"out vec2 texCoords;"
"out vec4 color;"
"void main () {"
"gl_Position = mvp * vec4(vertex_position.xyz, 1);"
"texCoords = vertex_texCoords0;"
"color = vertex_color;"
"}";
It tells me that there is an unespected ; at then end of line 2.
How can I change gl_FragCoord to upper_left_corner ?
PS : (whithout this two lines : )
“layout(origin_upper_left) in vec4 gl_FragCoord;”
“layout(pixel_center_integer);”
it compiles without any problems.