GLInstanceGraphicsShape.h 641 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef GL_INSTANCE_GRAPHICS_SHAPE_H
  2. #define GL_INSTANCE_GRAPHICS_SHAPE_H
  3. #include "Bullet3Common/b3AlignedObjectArray.h"
  4. struct GLInstanceVertex
  5. {
  6. float xyzw[4];
  7. float normal[3];
  8. float uv[2];
  9. };
  10. struct GLInstanceGraphicsShape
  11. {
  12. b3AlignedObjectArray<GLInstanceVertex>* m_vertices;
  13. int m_numvertices;
  14. b3AlignedObjectArray<int>* m_indices;
  15. int m_numIndices;
  16. float m_scaling[4];
  17. GLInstanceGraphicsShape()
  18. :m_vertices(0),
  19. m_indices(0)
  20. {
  21. }
  22. virtual ~GLInstanceGraphicsShape()
  23. {
  24. delete m_vertices;
  25. delete m_indices;
  26. }
  27. };
  28. #endif //GL_INSTANCE_GRAPHICS_SHAPE_H