fix: opening a doc async did not update the layers list, added on_complete callback to update the layers panel

This commit is contained in:
2017-11-07 07:37:21 +00:00
parent 33ea544f0b
commit 3e546affc9
7 changed files with 34 additions and 20 deletions

View File

@@ -13,7 +13,7 @@ public:
bool create(const ui::Image& img);
void assign(GLuint tex, int w = -1, int h = -1, GLuint internal_format = GL_RGBA8, GLuint format = GL_RGBA);
bool load(std::string filename);
void destroy() { LOG("TEX destroy %d", m_tex); glDeleteTextures(1, &m_tex); }
void destroy() { if (m_tex) LOG("TEX destroy %d", m_tex); glDeleteTextures(1, &m_tex); }
void bind() const { glBindTexture(GL_TEXTURE_2D, m_tex); }
void unbind() const { glBindTexture(GL_TEXTURE_2D, 0); }
void update(const uint8_t* data);