mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Unified opengl textures
This commit is contained in:
parent
b69e23ce73
commit
3fac0d92cd
4 changed files with 501 additions and 220 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue