Texture.h 812 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef TEXTURE_H
  2. #define TEXTURE_H
  3. #include <GL/glew.h>
  4. #include "gaming-core/utils/Color.h"
  5. class Texture final {
  6. GLuint texture;
  7. public:
  8. enum Mode {
  9. NEAREST, LINEAR
  10. };
  11. Texture(Mode mode = NEAREST);
  12. ~Texture();
  13. Texture(const Texture& other) = delete;
  14. Texture(Texture&& other) = delete;
  15. Texture& operator=(const Texture& other) = delete;
  16. Texture& operator=(Texture&& other) = delete;
  17. void setColorData(int width, int height, const Color4* data);
  18. void setColorData(int width, int height, const Color3* data);
  19. void setColorData(int width, int height, const Color2* data);
  20. void setColorData(int width, int height, const Color1* data);
  21. void setRGBFloatData(int width, int height, const float* data);
  22. void bind(int index) const;
  23. };
  24. #endif