Normal_cameraspace =( V * M * vec4(vertexNormal_modelspace,0)).xyz;// Only correct if ModelMatrix does not scale the model ! Use its inverse transpose if not.
// UV of the vertex. No special space for this one.
prog.cpp:2:2: error: invalid preprocessing directive #version
#version 330 core
^~~~~~~
prog.cpp:5:7: error: expected constructor, destructor, or type conversion before ‘(’ token
layout(location = 0) in vec3 vertexPosition_modelspace;
^
prog.cpp:6:7: error: expected constructor, destructor, or type conversion before ‘(’ token
layout(location = 1) in vec2 vertexUV;
^
prog.cpp:7:7: error: expected constructor, destructor, or type conversion before ‘(’ token
layout(location = 2) in vec3 vertexNormal_modelspace;
^
prog.cpp:10:1: error: ‘out’ does not name a type
out vec2 UV;
^~~
prog.cpp:11:1: error: ‘out’ does not name a type
out vec3 Position_worldspace;
^~~
prog.cpp:12:1: error: ‘out’ does not name a type
out vec3 Normal_cameraspace;
^~~
prog.cpp:13:1: error: ‘out’ does not name a type
out vec3 EyeDirection_cameraspace;
^~~
prog.cpp:14:1: error: ‘out’ does not name a type
out vec3 LightDirection_cameraspace;
^~~
prog.cpp:17:1: error: ‘uniform’ does not name a type
uniform mat4 MVP;
^~~~~~~
prog.cpp:18:1: error: ‘uniform’ does not name a type
uniform mat4 V;
^~~~~~~
prog.cpp:19:1: error: ‘uniform’ does not name a type
uniform mat4 M;
^~~~~~~
prog.cpp:20:1: error: ‘uniform’ does not name a type
uniform vec3 LightPosition_worldspace;
^~~~~~~
prog.cpp:22:11: error: ‘::main’ must return ‘int’
void main(){
^
prog.cpp: In function ‘int main()’:
prog.cpp:25:2: error: ‘gl_Position’ was not declared in this scope
gl_Position = MVP * vec4(vertexPosition_modelspace,1);
^~~~~~~~~~~
prog.cpp:25:17: error: ‘MVP’ was not declared in this scope
gl_Position = MVP * vec4(vertexPosition_modelspace,1);
^~~
prog.cpp:25:28: error: ‘vertexPosition_modelspace’ was not declared in this scope
gl_Position = MVP * vec4(vertexPosition_modelspace,1);
^~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:25:55: error: ‘vec4’ was not declared in this scope
gl_Position = MVP * vec4(vertexPosition_modelspace,1);
^
prog.cpp:28:2: error: ‘Position_worldspace’ was not declared in this scope
Position_worldspace = (M * vec4(vertexPosition_modelspace,1)).xyz;
^~~~~~~~~~~~~~~~~~~
prog.cpp:28:25: error: ‘M’ was not declared in this scope
Position_worldspace = (M * vec4(vertexPosition_modelspace,1)).xyz;
^
prog.cpp:32:2: error: ‘vec3’ was not declared in this scope
vec3 vertexPosition_cameraspace = ( V * M * vec4(vertexPosition_modelspace,1)).xyz;
^~~~
prog.cpp:33:9: error: ‘EyeDirection_cameraspace’ was not declared in this scope
EyeDirection_cameraspace = vec3(0,0,0) - vertexPosition_cameraspace;
^~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:33:50: error: ‘vertexPosition_cameraspace’ was not declared in this scope
EyeDirection_cameraspace = vec3(0,0,0) - vertexPosition_cameraspace;
^~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:36:7: error: expected ‘;’ before ‘LightPosition_cameraspace’
vec3 LightPosition_cameraspace = ( V * vec4(LightPosition_worldspace,1)).xyz;
^~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:37:2: error: ‘LightDirection_cameraspace’ was not declared in this scope
LightDirection_cameraspace = LightPosition_cameraspace + EyeDirection_cameraspace;
^~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:37:31: error: ‘LightPosition_cameraspace’ was not declared in this scope
LightDirection_cameraspace = LightPosition_cameraspace + EyeDirection_cameraspace;
^~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:40:2: error: ‘Normal_cameraspace’ was not declared in this scope
Normal_cameraspace = ( V * M * vec4(vertexNormal_modelspace,0)).xyz; // Only correct if ModelMatrix does not scale the model ! Use its inverse transpose if not.
^~~~~~~~~~~~~~~~~~
prog.cpp:40:25: error: ‘V’ was not declared in this scope
Normal_cameraspace = ( V * M * vec4(vertexNormal_modelspace,0)).xyz; // Only correct if ModelMatrix does not scale the model ! Use its inverse transpose if not.
^
prog.cpp:40:38: error: ‘vertexNormal_modelspace’ was not declared in this scope
Normal_cameraspace = ( V * M * vec4(vertexNormal_modelspace,0)).xyz; // Only correct if ModelMatrix does not scale the model ! Use its inverse transpose if not.
^~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:43:2: error: ‘UV’ was not declared in this scope
UV = vertexUV;
^~
prog.cpp:43:7: error: ‘vertexUV’ was not declared in this scope
UV = vertexUV;
^~~~~~~~