| 1234567891011121314151617181920212223242526 |
- //
- // material.cpp
- // graphics
- //
- // Created by Sam Jaffe on 7/5/16.
- //
- #include "game/graphics/material.hpp"
- #include "game/graphics/texture.hpp"
- #include "game/util/hash.hpp"
- #include "helper.hpp"
- using namespace graphics;
- static math::vec2i ZERO{{0, 0}};
- static unsigned int next_id() {
- static unsigned int id{0};
- return ++id;
- }
- material::material(identity<shader_program> const & sp, math::vec2i size,
- std::vector<uniform> const & uniforms)
- : identity<material>(next_id()), program(sp), size(size),
- uniforms(uniforms) {}
|