410.geom 853 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #version 410 core
  2. void main()
  3. {
  4. gl_ViewportIndex = 7;
  5. }
  6. in gl_PerVertex {
  7. float gl_PointSize;
  8. } myIn[]; // ERROR, can't redeclare a different name
  9. in gl_PerVertex {
  10. float gl_PointSize;
  11. } gl_myIn[]; // ERROR, can't redeclare a different name
  12. in gl_PerVertex {
  13. float gl_PointSize;
  14. } gl_in[];
  15. in gl_PerVertex {
  16. float gl_PointSize;
  17. } gl_in[]; // ERROR, can't do it again
  18. out gl_PerVertex {
  19. float gl_PointSize;
  20. };
  21. void foo()
  22. {
  23. float p = gl_in[1].gl_PointSize; // use of redeclared
  24. gl_PointSize = p; // use of redeclared
  25. vec4 v = gl_in[1].gl_Position; // ERROR, not included in the redeclaration
  26. gl_Position = vec4(1.0); // ERROR, not included in the redeclaration
  27. }
  28. float foo5()
  29. {
  30. return 4; // implicit conversion of return type
  31. }