opengl

Sample code from LearnOpenGL.com
Log | Files | Refs

vertex.sl (267B)


      1 #version 330 core
      2 layout (location = 0) in vec3 aPos;
      3 layout (location = 1) in vec2 aTexCoord;
      4 out vec2 texCoord;
      5 
      6 uniform mat4 model;
      7 uniform mat4 view;
      8 uniform mat4 proj;
      9 
     10 void
     11 main()
     12 {
     13 	gl_Position = proj * view * model * vec4(aPos, 1.0);
     14 	texCoord = aTexCoord;
     15 }