16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 00:09:18 +02:00
This commit is contained in:
milek7
2018-07-15 00:46:01 +02:00
parent 4566375faa
commit 794093dad4
17 changed files with 346 additions and 184 deletions

View File

@@ -19,11 +19,9 @@ typedef int material_handle;
// a collection of parameters for the rendering setup.
// for modern opengl this translates to set of attributes for shaders
struct opengl_material {
static const size_t MAX_TEXTURES = 4;
// primary texture, typically diffuse+apha
// secondary texture, typically normal+reflection
std::array<texture_handle, MAX_TEXTURES> textures = { null_handle };
std::array<texture_handle, gl::MAX_TEXTURES> textures = { null_handle };
std::array<glm::vec4, gl::MAX_PARAMS> params = { glm::vec4() };
std::shared_ptr<gl::program> shader;
@@ -50,7 +48,7 @@ private:
int m_shader_priority = -1;
int m_opacity_priority = -1;
int m_selfillum_priority = -1;
std::array<int, MAX_TEXTURES> m_texture_priority = { -1 };
std::array<int, gl::MAX_TEXTURES> m_texture_priority = { -1 };
std::array<int, gl::MAX_PARAMS> m_param_priority = { -1 };
};