X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fvertexformat.h;h=e8ba702db1746c4c4b0ec5357f0f13fe6bf4fc77;hb=3efe3bab1c8290bd49a957ebec0ad97e58a35fcf;hp=64c89e13166abae491fa2a50d30785cddd7a86cc;hpb=08e74e913d80693c79c00c18da1130cc5604952c;p=libs%2Fgl.git diff --git a/source/core/vertexformat.h b/source/core/vertexformat.h index 64c89e13..e8ba702d 100644 --- a/source/core/vertexformat.h +++ b/source/core/vertexformat.h @@ -61,6 +61,10 @@ enum VertexAttribute: std::uint16_t GENERIC_I2 = 0x28CA, GENERIC_I3 = 0x28CB, GENERIC_I4 = 0x28CC, + PADDING1 = 0xF811, + PADDING2 = 0xF812, + PADDING3 = 0xF813, + PADDING4 = 0xF814, RAW_ATTRIB1 = 0xFDC1, RAW_ATTRIB2 = 0xFDC2, RAW_ATTRIB3 = 0xFDC3, @@ -93,6 +97,7 @@ public: bool operator==(const VertexFormat &) const; bool operator!=(const VertexFormat &other) const { return !(*this==other); } + unsigned size() const { return count; } bool empty() const { return !count; } const VertexAttribute *begin() const { return attributes; } const VertexAttribute *end() const { return attributes+count; } @@ -134,9 +139,14 @@ inline unsigned get_attribute_size(VertexAttribute a) inline bool is_integer_attribute(VertexAttribute a) { return a&8; } +inline bool is_padding(VertexAttribute a) +{ return get_attribute_semantic(a)==get_attribute_semantic(PADDING1); } + void operator>>(const LexicalConverter &, VertexAttribute &); } // namespace GL } // namespace Msp +#include "vertexformat_backend.h" + #endif