Texture.h 486 B

12345678910111213141516171819202122232425
  1. #ifndef TEXTURE_H
  2. #define TEXTURE_H
  3. #include <GL/glew.h>
  4. #include "utils/PNGReader.h"
  5. class Texture final {
  6. public:
  7. Texture();
  8. ~Texture();
  9. Texture(const Texture& other) = delete;
  10. Texture(Texture&& other) = delete;
  11. Texture& operator=(const Texture& other) = delete;
  12. Texture& operator=(Texture&& other) = delete;
  13. void setColors(int width, int height, const char* data, int channels);
  14. void bind() const;
  15. private:
  16. GLuint texture;
  17. };
  18. #endif