12345678910111213141516171819202122232425262728293031 |
- #ifndef TEXTURE_H
- #define TEXTURE_H
- #include <GL/glew.h>
- #include "common/utils/Types.h"
- class Texture final {
- public:
- enum Mode {
- NEAREST, LINEAR
- };
- Texture(Mode mode = NEAREST);
- ~Texture();
- Texture(const Texture& other) = delete;
- Texture(Texture&& other) = delete;
- Texture& operator=(const Texture& other) = delete;
- Texture& operator=(Texture&& other) = delete;
- void setRGBAData(int width, int height, const u32* data);
- void setRGBFloatData(int width, int height, const float* data);
- void bind(uint index) const;
- private:
- GLuint texture;
- };
- #endif
|