material.hpp 655 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // material.hpp
  3. // graphics
  4. //
  5. // Created by Sam Jaffe on 7/5/16.
  6. //
  7. #pragma once
  8. #include <vector>
  9. #include "game/graphics/graphics_fwd.h"
  10. #include "game/math/math_fwd.hpp"
  11. #include "vector/vector.hpp"
  12. namespace graphics {
  13. struct uniform {
  14. identity<texture> texture;
  15. materials::uniform
  16. uniform_id; // TODO (sjaffe): use an enum and hide remapping?
  17. };
  18. struct material : public identity<material> {
  19. material(identity<shader_program> const & sp, math::vec2i size,
  20. std::vector<uniform> const & uniforms);
  21. identity<shader_program> program;
  22. math::vec2i size;
  23. std::vector<uniform> uniforms;
  24. };
  25. }