|
@@ -23,28 +23,29 @@ class Material;
|
|
|
class PatchNode: public RenderableNode
|
|
class PatchNode: public RenderableNode
|
|
|
{
|
|
{
|
|
|
public:
|
|
public:
|
|
|
- typedef boost::array<const Vbo*, Mesh::VBOS_NUM> VboArray;
|
|
|
|
|
-
|
|
|
|
|
PatchNode(const ModelPatch& modelPatch, ulong flags,
|
|
PatchNode(const ModelPatch& modelPatch, ulong flags,
|
|
|
SceneNode& parent);
|
|
SceneNode& parent);
|
|
|
|
|
|
|
|
/// @name Accessors
|
|
/// @name Accessors
|
|
|
/// @{
|
|
/// @{
|
|
|
|
|
|
|
|
- /// Implements RenderableNode::getVao
|
|
|
|
|
- const Vao& getVao(PassType p) const {return vaos[p];}
|
|
|
|
|
-
|
|
|
|
|
- /// Implements RenderableNode::getVertIdsNum
|
|
|
|
|
- uint getVertIdsNum() const {return rsrc.getMesh().getVertIdsNum();}
|
|
|
|
|
-
|
|
|
|
|
/// Implements RenderableNode::getMaterial
|
|
/// Implements RenderableNode::getMaterial
|
|
|
- const Material& getMaterial() const {return rsrc.getMaterial();}
|
|
|
|
|
|
|
+ const Material& getMaterial() const
|
|
|
|
|
+ {
|
|
|
|
|
+ return rsrc.getMaterial();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/// Implements RenderableNode::getMaterialRuntime
|
|
/// Implements RenderableNode::getMaterialRuntime
|
|
|
- MaterialRuntime& getMaterialRuntime() {return *mtlRun;}
|
|
|
|
|
|
|
+ MaterialRuntime& getMaterialRuntime()
|
|
|
|
|
+ {
|
|
|
|
|
+ return *mtlRun;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/// Implements RenderableNode::getMaterialRuntime
|
|
/// Implements RenderableNode::getMaterialRuntime
|
|
|
- const MaterialRuntime& getMaterialRuntime() const {return *mtlRun;}
|
|
|
|
|
|
|
+ const MaterialRuntime& getMaterialRuntime() const
|
|
|
|
|
+ {
|
|
|
|
|
+ return *mtlRun;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
const ModelPatch& getModelPatchRsrc() const {return rsrc;}
|
|
const ModelPatch& getModelPatchRsrc() const {return rsrc;}
|
|
|
/// @}
|
|
/// @}
|
|
@@ -53,17 +54,7 @@ class PatchNode: public RenderableNode
|
|
|
/// The sub-resource
|
|
/// The sub-resource
|
|
|
const ModelPatch& rsrc;
|
|
const ModelPatch& rsrc;
|
|
|
|
|
|
|
|
- /// The VAOs. All VBOs could be attached except for the vertex weights
|
|
|
|
|
- boost::array<Vao, PASS_TYPES_NUM> vaos;
|
|
|
|
|
-
|
|
|
|
|
boost::scoped_ptr<MaterialRuntime> mtlRun; ///< Material runtime
|
|
boost::scoped_ptr<MaterialRuntime> mtlRun; ///< Material runtime
|
|
|
-
|
|
|
|
|
- /// Create a VAO given a material and an array of VBOs
|
|
|
|
|
- /// The location of the uniform variables are hard coded. See
|
|
|
|
|
- /// MaterialVertex.glsl
|
|
|
|
|
- static void createVao(const MaterialRuntime& material,
|
|
|
|
|
- const VboArray& vbos,
|
|
|
|
|
- Vao& vao);
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|