60 lines
1.8 KiB
C++
60 lines
1.8 KiB
C++
#pragma once
|
|
|
|
#include <tuple>
|
|
#include "../dynamic_read_buffers"
|
|
#include "assets/data/surface_properties.hpp"
|
|
#include "util/enum_bitfield_operators.hpp"
|
|
|
|
namespace components::material
|
|
{
|
|
using surface_properties = ::surface_properties;
|
|
using transparency = float;
|
|
using ambient_color_texture = ::dynamic_texture_data;
|
|
using diffuse_color_texture = ::dynamic_texture_data;
|
|
using specular_color_texture = ::dynamic_texture_data;
|
|
using shininess_texture = ::dynamic_texture_data;
|
|
using alpha_texture = ::dynamic_texture_data;
|
|
using bump_texture = ::dynamic_texture_data;
|
|
|
|
namespace indices
|
|
{
|
|
using type = std::size_t;
|
|
inline constexpr type surface_properties = 0;
|
|
inline constexpr type transparency = 1;
|
|
inline constexpr type ambient_color_texture = 2;
|
|
inline constexpr type diffuse_color_texture = 3;
|
|
inline constexpr type specular_color_texture = 4;
|
|
inline constexpr type shininess_texture = 5;
|
|
inline constexpr type alpha_texture = 6;
|
|
inline constexpr type bump_texture = 7;
|
|
}
|
|
|
|
enum class flags : std::uint8_t
|
|
{
|
|
none = 0,
|
|
surface_properties = 1 << indices::surface_properties,
|
|
transparency = 1 << indices::transparency,
|
|
ambient_filter_texture = 1 << indices::ambient_color_texture,
|
|
diffuse_filter_texture = 1 << indices::diffuse_color_texture,
|
|
specular_filter_texture = 1 << indices::specular_color_texture,
|
|
shininess_texture = 1 << indices::shininess_texture,
|
|
alpha_texture = 1 << indices::alpha_texture,
|
|
bump_texture = 1 << indices::bump_texture
|
|
};
|
|
|
|
using all = std::tuple<
|
|
surface_properties,
|
|
transparency,
|
|
ambient_color_texture,
|
|
diffuse_color_texture,
|
|
specular_color_texture,
|
|
shininess_texture,
|
|
alpha_texture,
|
|
bump_texture
|
|
>;
|
|
constexpr inline auto count = std::tuple_size_v<all>;
|
|
|
|
} // namespace material_component
|
|
|
|
DEFINE_ENUM_BITFIELD_OPERATORS(components::material::flags)
|