std140 implementation
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "opengl/shading/sampler_uniform.hpp"
|
||||
#include <array>
|
||||
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
|
||||
namespace zgl::shading::mesh_sampler_uniforms
|
||||
{
|
||||
|
||||
enum class flags : std::uint16_t
|
||||
{
|
||||
none = 0,
|
||||
ambient_color_texture = 1 << 0,
|
||||
diffuse_color_texture = 1 << 1,
|
||||
specular_color_texture = 1 << 2,
|
||||
shininess_texture = 1 << 3,
|
||||
alpha_texture = 1 << 4,
|
||||
bump_texture = 1 << 5
|
||||
};
|
||||
|
||||
constexpr inline auto ambient_color_texture = sampler_uniform{ 0 };
|
||||
constexpr inline auto diffuse_color_texture = sampler_uniform{ 1 };
|
||||
constexpr inline auto specular_color_texture = sampler_uniform{ 2 };
|
||||
constexpr inline auto shininess_texture = sampler_uniform{ 3 };
|
||||
constexpr inline auto alpha_texture = sampler_uniform{ 4 };
|
||||
constexpr inline auto bump_texture = sampler_uniform{ 5 };
|
||||
|
||||
constexpr inline auto all = std::array{
|
||||
ambient_color_texture,
|
||||
diffuse_color_texture,
|
||||
specular_color_texture,
|
||||
shininess_texture,
|
||||
alpha_texture,
|
||||
bump_texture
|
||||
};
|
||||
|
||||
constexpr inline auto names = std::array{
|
||||
"ambient_color_texture",
|
||||
"diffuse_color_texture",
|
||||
"specular_color_texture",
|
||||
"shininess_texture",
|
||||
"alpha_texture",
|
||||
"bump_texture"
|
||||
};
|
||||
}
|
||||
|
||||
DEFINE_ENUM_BITFIELD_OPERATORS(zgl::shading::mesh_sampler_uniforms::flags)
|
||||
Reference in New Issue
Block a user