refactor Brush to be used in shared_ptr

This commit is contained in:
2019-01-22 22:49:43 +01:00
parent 9e76cf3194
commit e26fcf1163
22 changed files with 254 additions and 197 deletions

View File

@@ -9,6 +9,7 @@ class Texture2D
GLint m_format = 0;
GLint m_iformat = 0;
public:
bool auto_destroy = false;
bool has_mips = false;
bool create(int width, int height, GLint internal_format = GL_RGBA8, GLint format = GL_RGBA, const uint8_t* data = nullptr);
bool create(const Image& img);
@@ -22,6 +23,7 @@ public:
bool ready() const { return m_tex != 0; }
void create_mipmaps();
glm::vec2 size() const;
~Texture2D();
};
class Sampler