67 lines
1.9 KiB
C++
67 lines
1.9 KiB
C++
#pragma once
|
|
|
|
#include "assets/components/point_cloud_vertex_components.hpp"
|
|
#include "shading/features/point_cloud_features.hpp"
|
|
|
|
#include <array>
|
|
#include "util/enum_bitfield_operators.hpp"
|
|
|
|
namespace rendering::requirements::point_cloud
|
|
{
|
|
|
|
struct type
|
|
{
|
|
shading::features::point_cloud::indices::type shader_program_requirement_index{};
|
|
point_cloud_vertex_components::flags vertex_requirements{
|
|
point_cloud_vertex_components::flags::none
|
|
};
|
|
};
|
|
|
|
|
|
enum class flags : std::uint8_t
|
|
{
|
|
none = 0,
|
|
position = 1 << 0,
|
|
vertex_color = 1 << 1,
|
|
uniform_color = 1 << 2,
|
|
normal = 1 << 3,
|
|
reflectance = 1 << 4,
|
|
rainbow = 1 << 5
|
|
};
|
|
|
|
|
|
constexpr inline auto position = type{
|
|
.shader_program_requirement_index = shading::features::point_cloud::indices::position,
|
|
.vertex_requirements = point_cloud_vertex_components::flags::position
|
|
};
|
|
|
|
constexpr inline auto rainbow = type{
|
|
.shader_program_requirement_index = shading::features::point_cloud::indices::rainbow
|
|
};
|
|
|
|
constexpr inline auto vertex_color = type{
|
|
.shader_program_requirement_index = shading::features::point_cloud::indices::vertex_color,
|
|
.vertex_requirements = point_cloud_vertex_components::flags::color
|
|
};
|
|
|
|
constexpr inline auto uniform_color = type{
|
|
.shader_program_requirement_index = shading::features::point_cloud::indices::uniform_color
|
|
};
|
|
|
|
constexpr inline auto normal = type{
|
|
.shader_program_requirement_index = shading::features::point_cloud::indices::normal,
|
|
.vertex_requirements = point_cloud_vertex_components::flags::normal
|
|
};
|
|
|
|
constexpr inline auto reflectance = type{
|
|
.shader_program_requirement_index = shading::features::point_cloud::indices::reflectance,
|
|
.vertex_requirements = point_cloud_vertex_components::flags::reflectance
|
|
};
|
|
|
|
constexpr inline auto all = std::array{
|
|
position, vertex_color, uniform_color, normal, reflectance, rainbow
|
|
};
|
|
}
|
|
|
|
DEFINE_ENUM_BITFIELD_OPERATORS(rendering::requirements::point_cloud::flags)
|