+void VertexSetup::set_format(const VertexFormat &vfmt)
+{
+ if(!verify_format(vfmt))
+ throw invalid_argument("VertexSetup::set_format");
+ if(!vertex_format.empty())
+ throw invalid_operation("VertexSetup::set_format");
+
+ vertex_format = vfmt;
+}
+
+void VertexSetup::set_format_instanced(const VertexFormat &vfmt, const VertexFormat &ifmt)
+{
+ if(!verify_format(vfmt) || !verify_format(ifmt))
+ throw invalid_argument("VertexSetup::set_format");
+ if(!vertex_format.empty())
+ throw invalid_operation("VertexSetup::set_format");
+
+ vertex_format = vfmt;
+ inst_format = ifmt;
+}
+