Welcome to mirror list, hosted at ThFree Co, Russian Federation.

uniforms_holder.cpp « graphics - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c965f2948d271c389581de873b674449799a27be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "uniforms_holder.hpp"

#include "../std/utility.hpp"

namespace graphics
{
  bool UniformsHolder::insertValue(ESemantic sem, float value)
  {
    return m_singleFloatHolder.insert(make_pair(sem, value)).second;
  }

  bool UniformsHolder::getValue(ESemantic sem, float & value) const
  {
    single_map_t::const_iterator it = m_singleFloatHolder.find(sem);
    if (it == m_singleFloatHolder.end())
      return false;

    value = it->second;
    return true;
  }
}