]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexformat.h
Add a helper function for making indexed vertex components
[libs/gl.git] / source / vertexformat.h
index fb47484b35940b7e873b6d2586d333df0edda802..018d21f00e5176a322b8cbe262da5d355b762bb1 100644 (file)
@@ -44,7 +44,7 @@ public:
        const unsigned char *begin() const { return data ? data+1 : 0; }
        const unsigned char *end() const { return data ? data+1+data[0] : 0; }
        unsigned stride() const;
-       int offset(VertexComponent, unsigned = 0) const;
+       int offset(VertexComponent) const;
 };
 
 inline VertexFormat operator,(VertexComponent c1, VertexComponent c2)
@@ -53,6 +53,8 @@ inline VertexFormat operator,(VertexComponent c1, VertexComponent c2)
 inline VertexFormat operator,(VertexComponent c, unsigned i)
 { return (VertexFormat(c), i); }
 
+VertexComponent make_indexed_component(VertexComponent, unsigned);
+
 inline unsigned get_component_type(unsigned char c)
 { return c>>2; }