16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 00:09:18 +02:00

material work, use multibind and dsa in main texture binding

This commit is contained in:
milek7
2018-07-19 00:20:42 +02:00
parent ee16821509
commit a53224b47d
16 changed files with 128 additions and 178 deletions

View File

@@ -20,7 +20,7 @@ typedef int material_handle;
// for modern opengl this translates to set of attributes for shaders
struct opengl_material {
std::array<texture_handle, gl::MAX_TEXTURES> textures = { null_handle };
std::array<glm::vec4, gl::MAX_PARAMS> params = { glm::vec4(std::numeric_limits<float>::quiet_NaN()) };
std::array<glm::vec4, gl::MAX_PARAMS> params;
std::vector<gl::shader::param_entry> params_state;
std::shared_ptr<gl::program> shader;
@@ -30,7 +30,7 @@ struct opengl_material {
std::string name;
// constructors
opengl_material() = default;
opengl_material();
// methods
bool