]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/tag.cpp
Use Tag to identify uniforms in Program and ProgramData
[libs/gl.git] / source / render / tag.cpp
diff --git a/source/render/tag.cpp b/source/render/tag.cpp
deleted file mode 100644 (file)
index b5f8603..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <cstring>
-#include <map>
-#include <msp/core/hash.h>
-#include <msp/strings/format.h>
-#include "tag.h"
-
-using namespace std;
-
-namespace {
-
-#ifdef DEBUG
-map<Msp::GL::Tag, string> tag_names;
-#endif
-
-}
-
-namespace Msp {
-namespace GL {
-
-Tag::Tag(const char *s):
-       id((s && *s) ? hash32(s, strlen(s)) : 0)
-{
-#ifdef DEBUG
-       if(s)
-               tag_names.insert(make_pair(*this, string(s)));
-#endif
-}
-
-Tag::Tag(const std::string &s):
-       id(s.empty() ? 0 : hash32(s))
-{
-#ifdef DEBUG
-       if(!s.empty())
-               tag_names.insert(make_pair(*this, s));
-#endif
-}
-
-string Tag::str() const
-{
-#ifdef DEBUG
-       map<Tag, string>::const_iterator i=tag_names.find(*this);
-       if(i!=tag_names.end())
-               return i->second;
-#endif
-       return format("Tag(%d)", id);
-}
-
-void operator<<(LexicalConverter &conv, Tag tag)
-{
-       conv.result(tag.str());
-}
-
-} // namespace GL
-} // namespace Msp