fork download
  1. #version 400
  2.  
  3. layout(location=0) in vec4 in_Position;
  4. layout(location=1) in vec4 in_Color;
  5. out vec4 ex_Color;
  6.  
  7. uniform mat4 ModelMatrix;
  8. uniform mat4 ViewMatrix;
  9. uniform mat4 ProjectionMatrix;
  10.  
  11. void main(void)
  12. {
  13. gl_Position = (ProjectionMatrix * ViewMatrix * ModelMatrix) * in_Position;
  14. ex_Color = in_Color;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:2: error: invalid preprocessing directive #version
 #version 400
  ^
prog.cpp:3:7: error: expected constructor, destructor, or type conversion before ‘(’ token
 layout(location=0) in vec4 in_Position;
       ^
prog.cpp:4:7: error: expected constructor, destructor, or type conversion before ‘(’ token
 layout(location=1) in vec4 in_Color;
       ^
prog.cpp:5:1: error: ‘out’ does not name a type
 out vec4 ex_Color;
 ^
prog.cpp:7:1: error: ‘uniform’ does not name a type
 uniform mat4 ModelMatrix;
 ^
prog.cpp:8:1: error: ‘uniform’ does not name a type
 uniform mat4 ViewMatrix;
 ^
prog.cpp:9:1: error: ‘uniform’ does not name a type
 uniform mat4 ProjectionMatrix;
 ^
prog.cpp:11:15: error: ‘::main’ must return ‘int’
 void main(void)
               ^
prog.cpp: In function ‘int main()’:
prog.cpp:13:2: error: ‘gl_Position’ was not declared in this scope
  gl_Position = (ProjectionMatrix * ViewMatrix * ModelMatrix) * in_Position;
  ^
prog.cpp:13:17: error: ‘ProjectionMatrix’ was not declared in this scope
  gl_Position = (ProjectionMatrix * ViewMatrix * ModelMatrix) * in_Position;
                 ^
prog.cpp:13:36: error: ‘ViewMatrix’ was not declared in this scope
  gl_Position = (ProjectionMatrix * ViewMatrix * ModelMatrix) * in_Position;
                                    ^
prog.cpp:13:49: error: ‘ModelMatrix’ was not declared in this scope
  gl_Position = (ProjectionMatrix * ViewMatrix * ModelMatrix) * in_Position;
                                                 ^
prog.cpp:13:64: error: ‘in_Position’ was not declared in this scope
  gl_Position = (ProjectionMatrix * ViewMatrix * ModelMatrix) * in_Position;
                                                                ^
prog.cpp:14:2: error: ‘ex_Color’ was not declared in this scope
  ex_Color = in_Color;
  ^
prog.cpp:14:13: error: ‘in_Color’ was not declared in this scope
  ex_Color = in_Color;
             ^
stdout
Standard output is empty