Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Texture.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Window.hpp"
4 
8 class Texture
9 {
10  string m_name;
11  uvec2 m_size;
12  GLuint m_id;
14  public:
19  GLuint & getId() { return m_id; }
24  uvec2 & getSize() { return m_size; }
29  string & getName() { return m_name; }
30 
31  public:
37  Texture(string const & name);
41  ~Texture();
42 
47  void bind(uint target = 0);
48 };
49 
54 class Textures
55 {
56  map<string, unique_ptr<Texture>> m_textures;
58  public:
62  Textures();
66  virtual ~Textures();
67 
74  Texture* get(string const & name);
75 };
GLuint & getId()
Definition: Texture.hpp:19
string & getName()
Definition: Texture.hpp:29
string m_name
Definition: Texture.hpp:10
uvec2 & getSize()
Definition: Texture.hpp:24
uvec2 m_size
Definition: Texture.hpp:11
GLuint m_id
Definition: Texture.hpp:12
Textures()
Definition: Texture.cpp:63
virtual ~Textures()
Definition: Texture.cpp:67
Texture(string const &name)
Definition: Texture.cpp:4
map< string, unique_ptr< Texture > > m_textures
Definition: Texture.hpp:56
void bind(uint target=0)
Definition: Texture.cpp:54
~Texture()
Definition: Texture.cpp:49