fork download
  1. #version 330 core
  2.  
  3. in vec2 UV;
  4.  
  5. out vec3 color;
  6.  
  7. uniform sampler2D asteroidTextureSampler;
  8.  
  9. void main(){
  10.  
  11. color = texture2D(asteroidTextureSampler, UV).rgb;
  12.  
  13. }
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 330 core
  ^
prog.cpp:3:1: error: ‘in’ does not name a type
 in vec2 UV;
 ^
prog.cpp:5:1: error: ‘out’ does not name a type
 out vec3 color;
 ^
prog.cpp:7:1: error: ‘uniform’ does not name a type
 uniform sampler2D asteroidTextureSampler;
 ^
prog.cpp:9:11: error: ‘::main’ must return ‘int’
 void main(){
           ^
prog.cpp: In function ‘int main()’:
prog.cpp:11:2: error: ‘color’ was not declared in this scope
  color = texture2D(asteroidTextureSampler, UV).rgb;
  ^
prog.cpp:11:20: error: ‘asteroidTextureSampler’ was not declared in this scope
  color = texture2D(asteroidTextureSampler, UV).rgb;
                    ^
prog.cpp:11:44: error: ‘UV’ was not declared in this scope
  color = texture2D(asteroidTextureSampler, UV).rgb;
                                            ^
prog.cpp:11:46: error: ‘texture2D’ was not declared in this scope
  color = texture2D(asteroidTextureSampler, UV).rgb;
                                              ^
stdout
Standard output is empty