53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "opengl/shading/uniform_types/uniform.hpp"
|
|
#include "util/enum_bitfield_operators.hpp"
|
|
#include <array>
|
|
|
|
namespace zgl::shading::point_cloud_uniforms
|
|
{
|
|
|
|
enum class flags : std::uint8_t
|
|
{
|
|
none = 0,
|
|
mvp_matrix = 1 << 0,
|
|
point_size = 1 << 1,
|
|
color = 1 << 2,
|
|
model_matrix = 1 << 3,
|
|
camera_position = 1 << 4,
|
|
rainbow_offset_y = 1 << 5,
|
|
rainbow_scale_y = 1 << 6
|
|
};
|
|
|
|
constexpr inline auto mvp_matrix = uniform{ GL_FLOAT_MAT4, 0 };
|
|
constexpr inline auto point_size = uniform{ GL_FLOAT, 1 };
|
|
constexpr inline auto color = uniform{ GL_FLOAT_VEC4, 2 };
|
|
constexpr inline auto model_matrix = uniform{ GL_FLOAT_MAT4, 3 };
|
|
constexpr inline auto camera_position = uniform{ GL_FLOAT_VEC3, 4 };
|
|
constexpr inline auto rainbow_offset_y = uniform{ GL_FLOAT, 5 };
|
|
constexpr inline auto rainbow_scale_y = uniform{ GL_FLOAT, 6 };
|
|
|
|
constexpr inline auto all = std::array{
|
|
mvp_matrix,
|
|
point_size,
|
|
color,
|
|
model_matrix,
|
|
camera_position,
|
|
rainbow_offset_y,
|
|
rainbow_scale_y
|
|
};
|
|
|
|
constexpr inline auto names = std::array{
|
|
"mvp_matrix",
|
|
"point_size",
|
|
"color",
|
|
"model_matrix",
|
|
"camera_position",
|
|
"rainbow_offset_y",
|
|
"rainbow_scale_y"
|
|
};
|
|
|
|
}
|
|
|
|
DEFINE_ENUM_BITFIELD_OPERATORS(zgl::shading::point_cloud_uniforms::flags)
|