/* $Id$
This file is part of libmspgl
-Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2010 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
delete[] data;
}
+unsigned VertexFormat::stride() const
+{
+ uint s=0;
+ for(const unsigned char *i=begin(); i!=end(); ++i)
+ s+=(*i&3)+1;
+ return s;
+}
+
VertexFormat operator,(const VertexFormat &f, VertexComponent c)
{
VertexFormat r=f;
return r;
}
-uint get_stride(const VertexFormat &f)
-{
- uint stride=0;
- for(const unsigned char *i=f.begin(); i!=f.end(); ++i)
- stride+=(*i&3)+1;
- return stride;
-}
-
istream &operator>>(istream &in, VertexFormat &f)
{
string str;