Add hash specialization for uniform buffer format

--HG--
branch : opengl3
hg/feature/opengl3
kaetemi 10 years ago
parent be428c4901
commit 660e72e756

@ -99,6 +99,7 @@ public:
inline const CEntry &get(sint i) const { return m_Entries[i]; }
inline size_t size() const { return m_Entries.size(); }
inline void clear() { m_Entries.clear(); m_Hash = 0; }
inline size_t hash() const { return m_Hash; }
private:
static const sint s_TypeAlignment[];
@ -114,6 +115,16 @@ void testUniformBufferFormat(CUniformBufferFormat &ubf);
} /* namespace NL3D */
namespace std {
template <>
struct hash<NL3D::CUniformBufferFormat>
{
size_t operator()(const NL3D::CUniformBufferFormat & v) const { return v.hash(); }
};
} /* namespace std */
#endif /* #ifndef NL_UNIFORM_BUFFER_FORMAT_H */
/* end of file */

Loading…
Cancel
Save