12345678910111213141516171819202122232425262728293031323334 |
- #ifndef TEXTURE_H
- #define TEXTURE_H
- #include <GL/glew.h>
- #include <GLFW/glfw3.h>
- #include <iostream>
- using namespace std;
- class Texture
- {
- public:
- Texture(const char* path);
- virtual ~Texture();
-
- void bind();
- bool isLoaded();
- private:
- bool load(const char* path);
- bool load(const char* path, FILE* file);
- void initGL();
-
- bool loaded = false;
-
- unsigned int width = 0;
- unsigned int height = 0;
- unsigned int* data = nullptr;
-
- GLuint texture = 0;
- };
- #endif
|