Further shader compilation development.
This commit is contained in:
52
include/opengl/shading/uniforms/point_cloud_uniforms.hpp
Normal file
52
include/opengl/shading/uniforms/point_cloud_uniforms.hpp
Normal file
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include "opengl/shader_program_variable.hpp"
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
#include <array>
|
||||
|
||||
namespace zgl::shading::uniforms::point_cloud
|
||||
{
|
||||
|
||||
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 = shader_program_variable({ GL_FLOAT_MAT4, 0 }, "mvp_matrix");
|
||||
constexpr inline auto point_size = shader_program_variable({ GL_FLOAT, 1 }, "point_size");
|
||||
constexpr inline auto color = shader_program_variable({ GL_FLOAT_VEC4, 2 }, "color");
|
||||
constexpr inline auto model_matrix = shader_program_variable({ GL_FLOAT_MAT4, 3 }, "model_matrix");
|
||||
constexpr inline auto camera_position = shader_program_variable({ GL_FLOAT_VEC3, 4 }, "camera_position");
|
||||
constexpr inline auto rainbow_offset_y = shader_program_variable({ GL_FLOAT, 5 }, "rainbow_offset_y");
|
||||
constexpr inline auto rainbow_scale_y = shader_program_variable({ GL_FLOAT, 6 }, "rainbow_scale_y");
|
||||
|
||||
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::uniforms::point_cloud::flags)
|
||||
Reference in New Issue
Block a user