| 1234567891011121314151617181920212223242526272829303132 |
- //
- // material.hpp
- // graphics
- //
- // Created by Sam Jaffe on 7/5/16.
- //
- #pragma once
- #include <vector>
- #include "game/graphics/graphics_fwd.h"
- #include "game/math/math_fwd.hpp"
- #include "vector/vector.hpp"
- namespace graphics {
- struct uniform {
- identity<texture> texture;
- int uniform_id; // TODO (sjaffe): use an enum and hide remapping?
- };
- struct material : public identity<material> {
- material(identity<shader_program> const & sp, math::vec2i size,
- std::vector<uniform> const & uniforms);
- void activate() const;
- identity<shader_program> program;
- math::vec2i size;
- std::vector<uniform> uniforms;
- };
- }
|