Commit e18075b1 authored by Eric Bruneton's avatar Eric Bruneton
Browse files

patch #13239 from Clement Menier

This patch simply adds to MeshBuffers the possibility to add its own AttributeBuffer to the list. This allows for supporting any layout for attributes (not only interleaved or separate buffers). This avoids subclassing MeshBuffers to access to this genericity.


git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/ork/trunk@29 28599a00-4e59-401b-b2d8-d34d4661a6c9
parent 45250579
......@@ -84,6 +84,11 @@ void MeshBuffers::addAttributeBuffer(int index, int size, int vertexsize, Attrib
attributeBuffers.push_back(a);
}
void MeshBuffers::addAttributeBuffer(ptr<AttributeBuffer> buffer)
{
attributeBuffers.push_back(buffer);
}
void MeshBuffers::setIndicesBuffer(ptr<AttributeBuffer> indices)
{
indicesBuffer = indices;
......
......@@ -133,6 +133,14 @@ public:
*/
void addAttributeBuffer(int index, int size, int vertexsize, AttributeType type, bool norm);
/**
* Adds a vertex attribute buffer to this mesh. This method does not rely
* on any storage assumption.
*
* @param buffer a vertex attribute buffer.
*/
void addAttributeBuffer(ptr<AttributeBuffer> buffer);
/**
* Sets the indices array buffer of this mesh.
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment