2021-09-24 10:15:43 -04:00
|
|
|
#ifndef TEXTURE_H__
|
|
|
|
#define TEXTURE_H__
|
|
|
|
|
|
|
|
#include "define.h"
|
|
|
|
#include <IL/il.h>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
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__
|