Files
MapLibreParticleLab/include/mbgl/gl/gl_helper.hpp
Konstantin Käfer e74987b07f [core] move GL value objects from gl_config.hpp to gl_values.hpp
Also removes duplicate code from gl_helper.hpp by reusing the GL values that we already have anyway.
2016-02-08 12:50:00 +01:00

24 lines
326 B
C++

#ifndef MBGL_GL_GL_HELPER
#define MBGL_GL_GL_HELPER
namespace mbgl {
namespace gl {
template <typename T>
class Preserve {
public:
inline Preserve() : data(T::Get()) {
}
inline ~Preserve() {
T::Set(data);
}
private:
const typename T::Type data;
};
} // namespace gl
} // namespace mbgl
#endif