Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Vertex shader test.
  3. * Uses all conventional attributes and 15 generic attributes to print
  4. * their values, using printMESA() extension function, to the debugger
  5. * to compare them with the actual passed-in values.
  6. * Use different types for generic attributes to check matrix handling.
  7. *
  8. * Author: Michal Krol
  9. */
  10. #version 110
  11. #extension MESA_shader_debug: require
  12. attribute vec4 Attribute1;
  13. attribute vec4 Attribute2;
  14. attribute vec4 Attribute3;
  15. attribute float Attribute4;
  16. attribute vec2 Attribute5;
  17. attribute vec3 Attribute6;
  18. attribute mat2 Attribute7;
  19. attribute mat3 Attribute9;
  20. attribute mat4 Attribute12;
  21. void main ()
  22. {
  23. //
  24. // Do some legal stuff.
  25. //
  26. gl_Position = gl_ModelViewMatrix * gl_Vertex;
  27. gl_FrontColor = vec4 (1.0);
  28. //
  29. // Conventional attributes - except for gl_Vertex.
  30. //
  31. printMESA (gl_Color);
  32. printMESA (gl_SecondaryColor);
  33. printMESA (gl_Normal);
  34. printMESA (gl_MultiTexCoord0);
  35. printMESA (gl_MultiTexCoord1);
  36. printMESA (gl_MultiTexCoord2);
  37. printMESA (gl_MultiTexCoord3);
  38. printMESA (gl_MultiTexCoord4);
  39. printMESA (gl_MultiTexCoord5);
  40. printMESA (gl_MultiTexCoord6);
  41. printMESA (gl_MultiTexCoord7);
  42. printMESA (gl_FogCoord);
  43. //
  44. // Generic attributes - attrib with index 0 is not used because it would
  45. // alias with gl_Vertex, which is not allowed.
  46. //
  47. printMESA (Attribute1);
  48. printMESA (Attribute2);
  49. printMESA (Attribute3);
  50. printMESA (Attribute4);
  51. printMESA (Attribute5);
  52. printMESA (Attribute6);
  53. printMESA (Attribute7);
  54. printMESA (Attribute9);
  55. printMESA (Attribute12);
  56. //
  57. // Vertex position goes last.
  58. //
  59. printMESA (gl_Vertex);
  60. }