2021-09-24 10:15:43 -04:00
|
|
|
#ifndef TEXTURE_H__
|
|
|
|
#define TEXTURE_H__
|
|
|
|
|
|
|
|
#include <string>
|
2023-09-30 14:46:54 -04:00
|
|
|
#include <IL/il.h>
|
|
|
|
#include "define.h"
|
2021-09-24 10:15:43 -04:00
|
|
|
|
|
|
|
class Texture
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Texture(const std::string& filename = "");
|
|
|
|
~Texture();
|
|
|
|
|
2023-09-16 00:12:14 -04:00
|
|
|
bool Load(const std::string& filename, bool useMipMaps = true);
|
2021-09-24 10:15:43 -04:00
|
|
|
bool IsValid() const;
|
|
|
|
void Bind() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
GLuint m_textureId;
|
|
|
|
bool m_isValid;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TEXTURE_H__
|