Basic.vert 658 B

1234567891011121314151617181920212223
  1. // ----------------------------------------------------------------
  2. // From Game Programming in C++ by Sanjay Madhav
  3. // Copyright (C) 2017 Sanjay Madhav. All rights reserved.
  4. //
  5. // Released under the BSD License
  6. // See LICENSE in root directory for full details.
  7. // ----------------------------------------------------------------
  8. // Request GLSL 3.3
  9. #version 330
  10. // This should correspond to the data stored
  11. // for each vertex in the vertex buffer.
  12. // For now, just a position.
  13. in vec3 inPosition;
  14. void main()
  15. {
  16. // The vertex shader needs to output a 4D
  17. // coordinate.
  18. // For now set the 4th coordinate to 1.0
  19. gl_Position = vec4(inPosition, 1.0);
  20. }