ModelNodePatch.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef MODEL_NODE_PATCH_H
  2. #define MODEL_NODE_PATCH_H
  3. #include "Vao.h"
  4. #include "Vbo.h"
  5. #include "Mesh.h" // For the Vbos enum
  6. #include "RsrcPtr.h"
  7. #include "ModelPatch.h"
  8. #include "Properties.h"
  9. #include "SceneNodePatch.h"
  10. class Material;
  11. class ModelNode;
  12. /// A fragment of the ModelNode
  13. class ModelNodePatch: public SceneNodePatch
  14. {
  15. /// VAO for MS and BS. All VBOs could be attached except for the vert weights
  16. PROPERTY_R(Vao, cpVao, getCpVao)
  17. /// VAO for depth passes. All VBOs could be attached except for the vert weights
  18. PROPERTY_R(Vao, dpVao, getDpVao)
  19. public:
  20. ModelNodePatch(const ModelNode& modelNode, const ModelPatch& modelPatch);
  21. /// @name Accessors
  22. /// @{
  23. const Material& getCpMtl() const {return modelPatchRsrc.getCpMtl();}
  24. const Material& getDpMtl() const {return modelPatchRsrc.getDpMtl();}
  25. const ModelPatch& getModelPatchRsrc() const {return modelPatchRsrc;}
  26. /// @}
  27. protected:
  28. const ModelPatch& modelPatchRsrc;
  29. static void createVao(const Material& material, const boost::array<const Vbo*, Mesh::VBOS_NUM>& vbos, Vao& vao);
  30. };
  31. #endif