| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- //
- // manager.hpp
- // graphics
- //
- // Created by Sam Jaffe on 5/25/19.
- // Copyright © 2019 Sam Jaffe. All rights reserved.
- //
- #pragma once
- #include <unordered_map>
- #include "game/util/identity.hpp"
- namespace graphics {
- namespace shaders {
- enum class type : unsigned int;
- }
- class material;
- class shader;
- class shader_program;
- class texture;
- class manager {
- public:
- manager();
- ~manager();
- identity<material> get(identity<shader_program> program,
- std::string const & texture,
- std::string const & uniform) const;
- identity<shader> get(shaders::type type, std::string const & path) const;
- identity<shader_program> get(std::string const & fragment,
- std::string const & vertex) const;
- identity<texture> get(std::string const & path) const;
- material const & get(identity<material> identity) const;
- private:
- identity<texture> texture_or_uniform(std::string const & path,
- std::string const & uniform) const;
- std::unique_ptr<struct manager_impl> pimpl_;
- };
- }
|