Blackcomb  prealpha
Engine-ish
Texture.h
1 #ifndef BLACKCOMB_TEXTURE_H
2 #define BLACKCOMB_TEXTURE_H
3 
4 #include <glad/glad.h>
5 
6 namespace blackcomb::renderer {
7  constexpr char MissingTextureFilename[] = "res/maps/unknown.png";
8 
12  class Texture {
13  public:
14  Texture(const char* filename);
15  int getWidth();
16  int getHeight();
17  void bind();
18  static void unbind();
19  GLuint textureId;
20  private:
21  int width, height;
22  };
23 }
24 
25 #endif //BLACKCOMB_TEXTURE_H
void bind()
Bind the texture for use.
Definition: Texture.cpp:43
Definition: Mesh.h:8
static void unbind()
Unbind the texture.
Definition: Texture.cpp:50
Loads and stores a texture.
Definition: Texture.h:12