]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/vertexarray.cpp
Make VertexFormat capable of storing type information
[libs/gl.git] / source / core / vertexarray.cpp
index b3bcb48118b291a114024bd86f7d9016d22a26b0..a13d79cc6b0abd3e0c42362b24dc56fc14e05d27 100644 (file)
@@ -40,7 +40,7 @@ void VertexArray::reserve(unsigned n)
        data.reserve(n*stride);
 }
 
-float *VertexArray::append()
+char *VertexArray::append()
 {
        if(format.empty())
                throw invalid_operation("VertexArray::append");
@@ -50,7 +50,7 @@ float *VertexArray::append()
        return &*(data.end()-stride);
 }
 
-float *VertexArray::modify(unsigned i)
+char *VertexArray::modify(unsigned i)
 {
        if(format.empty())
                throw invalid_operation("VertexArray::modify");
@@ -60,7 +60,7 @@ float *VertexArray::modify(unsigned i)
 
 unsigned VertexArray::get_data_size() const
 {
-       return data.size()*sizeof(float);
+       return data.size();
 }