fix quick panel color slots, remove RGBA float framebuffers, disable merge framebuffers
This commit is contained in:
@@ -1634,7 +1634,7 @@ Here's a list of what's available in this release.
|
|||||||
<border id="ext-fbf" height="20" width="30" color="0 0 0 1" align="center" justify="center" margin="0 5 0 0">
|
<border id="ext-fbf" height="20" width="30" color="0 0 0 1" align="center" justify="center" margin="0 5 0 0">
|
||||||
<text id="txt-rec" text="FbF" color="0 0 0 1"/>
|
<text id="txt-rec" text="FbF" color="0 0 0 1"/>
|
||||||
</border>
|
</border>
|
||||||
<border id="ext-dpi" height="20" width="50" color=".2" align="center" justify="center" margin="0 5 0 0">
|
<border id="ext-dpi" height="20" width="60" color=".2" align="center" justify="center" margin="0 5 0 0">
|
||||||
<text id="txt-dpi" text="4x-dpi" color="1"/>
|
<text id="txt-dpi" text="4x-dpi" color="1"/>
|
||||||
</border>
|
</border>
|
||||||
</node>
|
</node>
|
||||||
|
|||||||
@@ -1082,7 +1082,7 @@ void App::brush_update()
|
|||||||
quick->m_slider_size->set_value(stroke->m_tip_size->get_value());
|
quick->m_slider_size->set_value(stroke->m_tip_size->get_value());
|
||||||
*quick->m_button_brush_current_preview->m_brush = *Canvas::I->m_current_brush;
|
*quick->m_button_brush_current_preview->m_brush = *Canvas::I->m_current_brush;
|
||||||
quick->m_button_brush_current_preview->draw_stroke();
|
quick->m_button_brush_current_preview->draw_stroke();
|
||||||
quick->m_button_color_current_inner->m_color = Canvas::I->m_current_brush->m_tip_color;
|
//quick->m_button_color_current_inner->m_color = Canvas::I->m_current_brush->m_tip_color;
|
||||||
if (floating_picker)
|
if (floating_picker)
|
||||||
floating_picker->set_color(Canvas::I->m_current_brush->m_tip_color);
|
floating_picker->set_color(Canvas::I->m_current_brush->m_tip_color);
|
||||||
if (floating_color)
|
if (floating_color)
|
||||||
|
|||||||
@@ -1356,23 +1356,23 @@ void Canvas::resize(int width, int height)
|
|||||||
m_size = { width, height };
|
m_size = { width, height };
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
#if defined(__IOS__) || defined(__ANDROID__)
|
//#if defined(__IOS__) || defined(__ANDROID__)
|
||||||
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
||||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA8);
|
m_tmp_dual[i].create(width, height, -1, GL_RGBA8);
|
||||||
m_tex[i].create(width, height, GL_RGBA8);
|
m_tex[i].create(width, height, GL_RGBA8);
|
||||||
#else
|
//#else
|
||||||
m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
// m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
||||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA32F);
|
// m_tmp_dual[i].create(width, height, -1, GL_RGBA32F);
|
||||||
m_tex[i].create(width, height, GL_RGBA32F);
|
// m_tex[i].create(width, height, GL_RGBA32F);
|
||||||
#endif
|
//#endif
|
||||||
m_tex2[i].create(width, height, GL_RGBA8);
|
m_tex2[i].create(width, height, GL_RGBA8);
|
||||||
}
|
}
|
||||||
m_layers_merge.resize(width, height);
|
m_layers_merge.resize(width, height);
|
||||||
for (auto& l : m_layers)
|
for (auto& l : m_layers)
|
||||||
l->resize(width, height);
|
l->resize(width, height);
|
||||||
m_smask.create(width, height, "mask");
|
m_smask.create(width, height, "mask");
|
||||||
m_merge_rtt.create(width, height);
|
//m_merge_rtt.create(width, height);
|
||||||
m_merge_tex.create(width, height);
|
//m_merge_tex.create(width, height);
|
||||||
m_unsaved = true;
|
m_unsaved = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1390,8 +1390,8 @@ void Canvas::destroy()
|
|||||||
l->destroy();
|
l->destroy();
|
||||||
m_smask.destroy();
|
m_smask.destroy();
|
||||||
m_mixer.destroy();
|
m_mixer.destroy();
|
||||||
m_merge_rtt.destroy();
|
//m_merge_rtt.destroy();
|
||||||
m_merge_tex.destroy();
|
//m_merge_tex.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Canvas::create(int width, int height)
|
bool Canvas::create(int width, int height)
|
||||||
@@ -1401,15 +1401,15 @@ bool Canvas::create(int width, int height)
|
|||||||
m_size = { width, height };
|
m_size = { width, height };
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
#if defined(__IOS__) || defined(__ANDROID__)
|
//#if defined(__IOS__) || defined(__ANDROID__)
|
||||||
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
||||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA8);
|
m_tmp_dual[i].create(width, height, -1, GL_RGBA8);
|
||||||
m_tex[i].create(width, height, GL_RGBA8);
|
m_tex[i].create(width, height, GL_RGBA8);
|
||||||
#else
|
//#else
|
||||||
m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
// m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
||||||
m_tmp_dual[i].create(width, height, -1, GL_RGBA32F);
|
// m_tmp_dual[i].create(width, height, -1, GL_RGBA32F);
|
||||||
m_tex[i].create(width, height, GL_RGBA32F);
|
// m_tex[i].create(width, height, GL_RGBA32F);
|
||||||
#endif
|
//#endif
|
||||||
m_tex2[i].create(width, height, GL_RGBA8);
|
m_tex2[i].create(width, height, GL_RGBA8);
|
||||||
}
|
}
|
||||||
#if defined(__IOS__) || defined(__ANDROID__)
|
#if defined(__IOS__) || defined(__ANDROID__)
|
||||||
@@ -1437,8 +1437,8 @@ bool Canvas::create(int width, int height)
|
|||||||
l->create(width, height, "");
|
l->create(width, height, "");
|
||||||
m_smask.create(width, height, "mask");
|
m_smask.create(width, height, "mask");
|
||||||
//m_smask.clear({1, 1, 1, 1});
|
//m_smask.clear({1, 1, 1, 1});
|
||||||
m_merge_rtt.create(width, height);
|
//m_merge_rtt.create(width, height);
|
||||||
m_merge_tex.create(width, height);
|
//m_merge_tex.create(width, height);
|
||||||
m_unsaved = true;
|
m_unsaved = true;
|
||||||
draw_merge();
|
draw_merge();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -492,13 +492,13 @@ void NodeCanvas::handle_resize(glm::vec2 old_size, glm::vec2 new_size)
|
|||||||
{
|
{
|
||||||
// actual screen size
|
// actual screen size
|
||||||
//new_size = new_size * root()->m_zoom;
|
//new_size = new_size * root()->m_zoom;
|
||||||
#if defined(__IOS__) || defined(__ANDROID__)
|
//#if defined(__IOS__) || defined(__ANDROID__)
|
||||||
|
// m_canvas->m_mixer.create((int)new_size.x * m_canvas->m_mixer_scale,
|
||||||
|
// (int)new_size.y * m_canvas->m_mixer_scale, -1, GL_RGBA16F);
|
||||||
|
//#else
|
||||||
m_canvas->m_mixer.create((int)new_size.x * m_canvas->m_mixer_scale,
|
m_canvas->m_mixer.create((int)new_size.x * m_canvas->m_mixer_scale,
|
||||||
(int)new_size.y * m_canvas->m_mixer_scale, -1, GL_RGBA16F);
|
(int)new_size.y * m_canvas->m_mixer_scale, -1, GL_RGBA8);
|
||||||
#else
|
//#endif
|
||||||
m_canvas->m_mixer.create((int)new_size.x * m_canvas->m_mixer_scale,
|
|
||||||
(int)new_size.y * m_canvas->m_mixer_scale, -1, GL_RGBA32F);
|
|
||||||
#endif
|
|
||||||
m_blender_rtt.create((int)new_size.x, (int)new_size.y, -1, GL_RGBA8);
|
m_blender_rtt.create((int)new_size.x, (int)new_size.y, -1, GL_RGBA8);
|
||||||
m_cache_rtt.create((int)new_size.x, (int)new_size.y, -1, GL_RGBA8);
|
m_cache_rtt.create((int)new_size.x, (int)new_size.y, -1, GL_RGBA8);
|
||||||
m_rtt.create((int)new_size.x, (int)new_size.y, -1, GL_RGBA8);
|
m_rtt.create((int)new_size.x, (int)new_size.y, -1, GL_RGBA8);
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ NodePanelQuick::MiniState NodePanelQuick::get_state() const
|
|||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
s.brushes[i] = static_cast<NodeStrokePreview*>(m_button_brushes[i]->m_children[0].get())->m_brush;
|
s.brushes[i] = static_cast<NodeStrokePreview*>(m_button_brushes[i]->m_children[0].get())->m_brush;
|
||||||
s.colors[i] = static_cast<NodeBorder*>(m_button_color_current->m_children[0].get())->m_color;
|
s.colors[i] = static_cast<NodeBorder*>(m_button_colors[i]->m_children[0].get())->m_color;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
@@ -82,7 +82,7 @@ void NodePanelQuick::set_state(const MiniState& state, bool fire_event /*= false
|
|||||||
auto b = static_cast<NodeStrokePreview*>(m_button_brushes[i]->m_children[0].get());
|
auto b = static_cast<NodeStrokePreview*>(m_button_brushes[i]->m_children[0].get());
|
||||||
b->m_brush = state.brushes[i];
|
b->m_brush = state.brushes[i];
|
||||||
b->draw_stroke();
|
b->draw_stroke();
|
||||||
auto c = static_cast<NodeBorder*>(m_button_color_current->m_children[0].get());
|
auto c = static_cast<NodeBorder*>(m_button_colors[i]->m_children[0].get());
|
||||||
c->m_color = state.colors[i];
|
c->m_color = state.colors[i];
|
||||||
}
|
}
|
||||||
set_selected_color_index(state.color_index, fire_event);
|
set_selected_color_index(state.color_index, fire_event);
|
||||||
@@ -97,9 +97,10 @@ void NodePanelQuick::reset_state(bool fire_event /*= false*/)
|
|||||||
b->m_brush = std::make_shared<Brush>();
|
b->m_brush = std::make_shared<Brush>();
|
||||||
b->m_brush->load_tip("data/brushes/Round-Hard.png", "data/brushes/thumbs/Round-Hard.png");
|
b->m_brush->load_tip("data/brushes/Round-Hard.png", "data/brushes/thumbs/Round-Hard.png");
|
||||||
b->draw_stroke();
|
b->draw_stroke();
|
||||||
auto c = static_cast<NodeBorder*>(m_button_color_current->m_children[0].get());
|
|
||||||
c->m_color = glm::vec4(0, 0, 0, 1);
|
|
||||||
}
|
}
|
||||||
|
static_cast<NodeBorder*>(m_button_colors[0]->m_children[0].get())->m_color = glm::vec4(0, 0, 0, 1);
|
||||||
|
static_cast<NodeBorder*>(m_button_colors[1]->m_children[0].get())->m_color = glm::vec4(.5, .5, .5, 1);
|
||||||
|
static_cast<NodeBorder*>(m_button_colors[2]->m_children[0].get())->m_color = glm::vec4(1, 1, 1, 1);
|
||||||
set_selected_brush_index(0, fire_event);
|
set_selected_brush_index(0, fire_event);
|
||||||
set_selected_color_index(0, fire_event);
|
set_selected_color_index(0, fire_event);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user