App::I static singleton to pointer
This commit is contained in:
@@ -76,7 +76,7 @@ void NodePanelGrid::init_controls()
|
||||
};
|
||||
|
||||
m_hm_load->on_click = [this](Node*) {
|
||||
App::I.pick_image([this](std::string path) {
|
||||
App::I->pick_image([this](std::string path) {
|
||||
Image img;
|
||||
if (img.load_file(path))
|
||||
{
|
||||
@@ -150,7 +150,7 @@ void NodePanelGrid::init_controls()
|
||||
// get the texture data and resize it
|
||||
Image img;
|
||||
img.create(m_texture.size().x, m_texture.size().y);
|
||||
App::I.render_task([&]
|
||||
App::I->render_task([&]
|
||||
{
|
||||
m_texture.bind();
|
||||
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, img.m_data.get());
|
||||
@@ -465,7 +465,7 @@ void NodePanelGrid::bake_uvs()
|
||||
//stbi_write_jpg("bake-out.jpg", fb.getWidth(), fb.getHeight(), 4, data_out.get(), 75);
|
||||
m_texture.update(data_out.get());
|
||||
m_texture.create_mipmaps();
|
||||
App::I.async_redraw();
|
||||
App::I->async_redraw();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user