add webgl support

This commit is contained in:
2019-10-05 21:08:40 +02:00
parent a1c0dcb007
commit f2a73a905d
19 changed files with 370 additions and 11 deletions

View File

@@ -177,8 +177,12 @@ void NodePanelQuick::init_controls()
NodeButtonCustom* NodePanelQuick::init_button_brush(const std::string& name, bool szp, bool flp)
{
LOG("init_button_brush %s", name.c_str());
auto button = find<NodeButtonCustom>(name.c_str());
if (!button)
LOG("couldn't find button %s", name.c_str());
button->on_click = std::bind(&this_class::handle_button_brush_click, this, std::placeholders::_1);
LOG("button has %d children", button->m_children.size());
auto pr = static_cast<NodeStrokePreview*>(button->m_children[0].get());
pr->m_brush = std::make_shared<Brush>();
pr->m_brush->m_tip_size_pressure = szp;