Face3d
Texture.hpp
Go to the documentation of this file.
1 #ifndef MISHUNGERSTANDING_TEXTURES_TEXTURE
2 #define MISHUNGERSTANDING_TEXTURES_TEXTURE
3 
4 #include <stb_image.h>
5 #include <map>
6 #include <string>
7 #include "GLHeader.hpp"
8 
9 namespace Face3D
10 {
12  class Texture
13  {
14  public:
15  static Texture& Instance();
16  GLuint Texture::loadFromImage(const std::string& fileName);
17  GLuint getSamplerID();
18 
22 
23  private:
24  Texture();
25  std::map<std::string, GLuint> m_TextureCache;
26  GLuint samplerID = 0;
28  };
29 
30 }
31 
32 #endif
Definition: Texture.hpp:19
GLuint samplerID
Definition: Texture.hpp:26
static Texture & Instance()
Definition: Texture.cpp:14
Definition: Texture.hpp:19
void changeTextureSettings(TextureSetting setting)
Definition: Texture.cpp:85
Definition: Texture.hpp:19
std::map< std::string, GLuint > m_TextureCache
Definition: Texture.hpp:25
TextureSetting
Definition: Texture.hpp:19
GLuint getSamplerID()
Definition: Texture.cpp:20
TextureSetting m_CurrSetting
Definition: Texture.hpp:27
TextureSetting getSetting() const
Definition: Texture.hpp:20
GLuint Texture::loadFromImage(const std::string &fileName)
Texture()
Definition: Texture.cpp:8
Definition: Texture.hpp:12
Definition: Texture.hpp:19
Definition: Common.hpp:7