Files
MapLibreParticleLab/src/mln/gl/enum.hpp
Bart Louwers 2a8ebc4906 core: rename mbgl directories to mln (#4511)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-08-22 20:50:14 +02:00

27 lines
587 B
C++

#pragma once
#include <mln/platform/gl_functions.hpp>
#include <type_traits>
namespace mln {
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 mln