]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexformat.cpp
Load VertexFormat for Mesh as an array of VertexComponents
[libs/gl.git] / source / vertexformat.cpp
index 146fc68095be688e4c974c3aefbccf89c71b0b7e..1de430870d6a328d363b169f0fb53125bde2614a 100644 (file)
@@ -165,25 +165,5 @@ void operator>>(const LexicalConverter &conv, VertexComponent &c)
                throw lexical_error(format("conversion of '%s' to VertexComponent", str));
 }
 
-// XXX This will go away eventually
-void operator>>(const LexicalConverter &conv, VertexFormat &f)
-{
-       vector<string> parts = split(conv.get(), '_');
-       for(vector<string>::iterator i=parts.begin(); i!=parts.end(); ++i)
-       {
-               if(*i=="COLOR4UB")
-                       *i = "COLOR4_UBYTE";
-               else if(i->size()==7 && !i->compare(0, 5, "COLOR") && (*i)[6]=='F')
-                       *i = i->substr(0, 6)+"_FLOAT";
-               else if(i->size()>=10 && !i->compare(0, 8, "TEXCOORD"))
-                       *i = i->substr(0, 9)+"_"+i->substr(9);
-               else if(i->size()>=8 && !i->compare(0, 6, "ATTRIB"))
-                       *i = i->substr(0, 7)+"_"+i->substr(7);
-       }
-
-       for(vector<string>::iterator i=parts.begin(); i!=parts.end(); ++i)
-               f = (f, lexical_cast<VertexComponent>(*i));
-}
-
 } // namespace GL
 } // namespace Msp