Unified opengl textures
This commit is contained in:
@@ -10,7 +10,10 @@ namespace GUI {
|
||||
|
||||
class GLTexture
|
||||
{
|
||||
private:
|
||||
//###################################################################################################################################################
|
||||
protected:
|
||||
// private:
|
||||
//###################################################################################################################################################
|
||||
unsigned int m_id;
|
||||
int m_width;
|
||||
int m_height;
|
||||
@@ -18,7 +21,10 @@ namespace GUI {
|
||||
|
||||
public:
|
||||
GLTexture();
|
||||
~GLTexture();
|
||||
//###################################################################################################################################################
|
||||
virtual ~GLTexture();
|
||||
// ~GLTexture();
|
||||
//###################################################################################################################################################
|
||||
|
||||
bool load_from_file(const std::string& filename, bool generate_mipmaps);
|
||||
void reset();
|
||||
@@ -26,11 +32,15 @@ namespace GUI {
|
||||
unsigned int get_id() const;
|
||||
int get_width() const;
|
||||
int get_height() const;
|
||||
|
||||
const std::string& get_source() const;
|
||||
|
||||
static void render_texture(unsigned int tex_id, float left, float right, float bottom, float top);
|
||||
|
||||
private:
|
||||
//###################################################################################################################################################
|
||||
protected:
|
||||
// private:
|
||||
//###################################################################################################################################################
|
||||
void _generate_mipmaps(wxImage& image);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user