1
1

draw.d 614 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. module three.gl.draw;
  2. public import derelict.opengl3.gl3;
  3. import three.mesh;
  4. struct GlDrawElementsIndirectCommand {
  5. GLuint vertexCount;
  6. GLuint instanceCount;
  7. GLuint firstIndex;
  8. GLuint baseVertex;
  9. GLuint baseInstance;
  10. }
  11. struct GlDrawParameter {
  12. Matrix4 transformationMatrix;
  13. }
  14. struct Position {
  15. float x, y, z;
  16. }
  17. struct Normal {
  18. float x, y, z;
  19. }
  20. struct Color {
  21. float r, g, b, a;
  22. }
  23. struct TextureCoordinate {
  24. float u, v;
  25. }
  26. struct Matrix4 {
  27. float[4*4] data;
  28. }
  29. struct VertexData {
  30. Position position;
  31. Normal normal;
  32. Color color;
  33. TextureCoordinate textureCoordinate;
  34. }
  35. alias IndexData = uint;