render implement thread, wrap GL commands into tasks

This commit is contained in:
2019-07-06 22:25:07 +02:00
parent db27334ce5
commit 0012e2ce9b
18 changed files with 1252 additions and 904 deletions

View File

@@ -28,7 +28,6 @@ std::shared_ptr<NodeProgressBar> App::show_progress(const std::string& title)
NodeMessageBox* App::message_box(const std::string &title, const std::string& text, bool cancel_button)
{
async_start();
auto* m = layout[main_id]->add_child<NodeMessageBox>();
m->m_title->set_text(title.c_str());
m->m_message->set_text(text.c_str());
@@ -36,8 +35,6 @@ NodeMessageBox* App::message_box(const std::string &title, const std::string& te
if (!cancel_button)
m->btn_cancel->destroy();
layout[main_id]->update();
async_redraw();
async_end();
return m;
}
@@ -80,7 +77,6 @@ void App::dialog_about()
void App::dialog_newdoc()
{
auto show_dialog = [this] {
async_start();
auto dialog = std::make_shared<NodeDialogNewDoc>();
dialog->m_manager = &layout;
dialog->init();
@@ -153,7 +149,6 @@ void App::dialog_newdoc()
dialog->destroy();
App::I.hideKeyboard();
};
async_end();
};
if (canvas)
@@ -190,7 +185,6 @@ void App::dialog_newdoc()
void App::dialog_open()
{
auto show_dialog = [this] {
async_start();
// load thumbnail test
auto dialog = std::make_shared<NodeDialogOpen>();
dialog->m_manager = &layout;
@@ -217,7 +211,6 @@ void App::dialog_open()
// dialog->destroy();
// ActionManager::clear();
};
async_end();
};
if (canvas)
@@ -253,7 +246,6 @@ void App::dialog_open()
void App::dialog_browse()
{
auto show_dialog = [this] {
async_start();
// load thumbnail test
auto dialog = std::make_shared<NodeDialogBrowse>();
dialog->m_manager = &layout;
@@ -277,7 +269,6 @@ void App::dialog_browse()
dialog->destroy();
}
};
async_end();
};
if (canvas)