blob: 9780be55af0c1648ceb28246e65f53721844c820 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#pragma once
#include <mbgl/platform/gl_functions.hpp>
#include <type_traits>
namespace mbgl {
namespace gl {
template <typename T>
class Enum {
public:
using InType = std::conditional_t<std::is_same<std::underlying_type_t<T>, bool>::value, platform::GLboolean, platform::GLint>;
using OutType = std::conditional_t<std::is_same<std::underlying_type_t<T>, bool>::value, platform::GLboolean, platform::GLenum>;
static T from(InType);
static OutType to(T);
};
} // namespace gl
} // namespace mbgl
|