X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fvertexformat.h;h=132d0b95a88a0b36411b70a55ade9a48c5c19c15;hp=a503aff83f84f19bcbbb1d9e3009c77fd526d4bb;hb=e92de029768eef5f0fd744329e589161b46d0762;hpb=9904aa3d09458098541fdce0114785d6bce1777f diff --git a/source/core/vertexformat.h b/source/core/vertexformat.h index a503aff8..132d0b95 100644 --- a/source/core/vertexformat.h +++ b/source/core/vertexformat.h @@ -20,8 +20,9 @@ are doing. The values are bitfields laid as follows: -nnnn nn_f gsss _ccc - │ │ │ │ └╴Number of components +nnnn nn_f gsss iccc + │ │ │ │ │ └╴Number of components + │ │ │ │ └───╴Integer attribute flag │ │ │ └─────╴Size of one component │ │ └────────╴Signed flag │ └──────────╴Floating-point flag @@ -55,10 +56,18 @@ enum VertexAttribute GENERIC2 = 0x29C2, GENERIC3 = 0x29C3, GENERIC4 = 0x29C4, + GENERIC_I1 = 0x28C9, + GENERIC_I2 = 0x28CA, + GENERIC_I3 = 0x28CB, + GENERIC_I4 = 0x28CC, RAW_ATTRIB1 = 0xFDC1, RAW_ATTRIB2 = 0xFDC2, RAW_ATTRIB3 = 0xFDC3, - RAW_ATTRIB4 = 0xFDC4 + RAW_ATTRIB4 = 0xFDC4, + RAW_ATTRIB_I1 = 0xFCC9, + RAW_ATTRIB_I2 = 0xFCCA, + RAW_ATTRIB_I3 = 0xFCCB, + RAW_ATTRIB_I4 = 0xFCCC }; class VertexFormat @@ -111,6 +120,9 @@ inline unsigned get_attribute_component_count(UInt16 a) inline unsigned get_attribute_size(UInt16 a) { return get_attribute_component_count(a)*get_type_size(get_attribute_source_type(a)); } +inline bool is_integer_attribute(UInt16 a) +{ return a&8; } + void operator>>(const LexicalConverter &, VertexAttribute &); } // namespace GL