X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fvertexformat.h;h=3561292245fc640deb2859629cbf8f39c1776e5b;hp=7edca1f3dcf74782d8fd5a94c7bfb25cd079c72d;hb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;hpb=3b159edbe4e80a2bc19c4c2fcd42cb996b9fbfe0 diff --git a/source/vertexformat.h b/source/vertexformat.h index 7edca1f3..35612922 100644 --- a/source/vertexformat.h +++ b/source/vertexformat.h @@ -6,9 +6,9 @@ namespace Msp { namespace GL { -/** A single vertex component. Nvidia drivers have aliasing between the -fixed-functions and generic vertex attributes, despite the standard not -allowing it. We use the same attribute indices here to avoid problems. */ +/** A single vertex component. Symbolic names are provided for commonly used +attributes. These are aliased with with generic attributes, so be careful when +picking your attribute indices. */ enum VertexComponent { VERTEX2 = 1, @@ -44,6 +44,8 @@ public: VertexFormat operator,(VertexComponent c) const; VertexFormat operator,(unsigned i) const; + bool operator==(const VertexFormat &) const; + bool operator!=(const VertexFormat &other) const { return !(*this==other); } bool empty() const { return !count; } const unsigned char *begin() const { return components; }