]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/vertexformat.cpp
Add support for padding in vertex formats
[libs/gl.git] / source / core / vertexformat.cpp
index 8e358acd2d0394992925f05b26acd632b4427845..3db7542f4da68ab240ed17d7773299908dbcc7d9 100644 (file)
@@ -1,8 +1,4 @@
-#include <algorithm>
-#include <msp/io/print.h>
 #include <msp/strings/format.h>
-#include <msp/strings/lexicalcast.h>
-#include <msp/strings/utils.h>
 #include "error.h"
 #include "vertexformat.h"
 
@@ -11,10 +7,6 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
-VertexFormat::VertexFormat():
-       count(0)
-{ }
-
 VertexFormat::VertexFormat(VertexAttribute a):
        count(1)
 {
@@ -196,7 +188,8 @@ void operator>>(const LexicalConverter &conv, VertexAttribute &a)
                        convert_attribute(str, "GROUP", 1, 4, a, GROUP1) ||
                        convert_attribute(str, "WEIGHT", 1, 4, a, WEIGHT1) ||
                        convert_attribute(str, "TEXCOORD", 1, 4, a, TEXCOORD1) ||
-                       convert_attribute(str, "GENERIC", 1, 4, a, GENERIC1))
+                       convert_attribute(str, "GENERIC", 1, 4, a, GENERIC1) ||
+                       convert_attribute(str, "PADDING", 1, 4, a, PADDING1))
                        return;
        }
        catch(...)