Files
MapLibreParticleLab/src/mbgl/gl/enum.hpp
Bart Louwers 71f6da2722 Add clang-format (#1086)
Co-authored-by: mwilsnd <mwilsnd@gmail.com>
2023-05-01 16:57:37 +02:00

27 lines
590 B
C++

#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_v<std::underlying_type_t<T>, bool>, platform::GLboolean, platform::GLint>;
using OutType =
std::conditional_t<std::is_same_v<std::underlying_type_t<T>, bool>, platform::GLboolean, platform::GLenum>;
static T from(InType);
static OutType to(T);
template <typename U>
static OutType sizedFor(T, U type);
};
} // namespace gl
} // namespace mbgl