| 1234567891011121314151617181920212223242526272829 |
- //
- // texture.hpp
- // graphics
- //
- // Created by Sam Jaffe on 7/5/16.
- //
- #pragma once
- #include "game/math/math_fwd.hpp"
- #include "game/util/flyweight.hpp"
- #include "vector/vector.hpp"
- namespace graphics {
- class texture : public identity<texture> {
- public:
- static texture const WHITE();
- static texture const DARK_YELLOW();
- static texture const LIGHT_BLUE();
- math::vec2i const size;
- public:
- static flyweight<texture> create(std::string const & imagefile);
- private:
- static texture create(char const *, math::vec2i);
- texture(unsigned int, math::vec2i = math::vec2i{{0, 0}});
- };
- }
|