clear new layers
This commit is contained in:
@@ -641,7 +641,7 @@ bool App::mouse_scroll(float x, float y, float delta)
|
||||
MouseEvent e;
|
||||
e.m_type = kEventType::MouseScroll;
|
||||
e.m_pos = { x / zoom, y / zoom };
|
||||
e.m_scroll_delta = delta;
|
||||
e.m_scroll_delta = delta * 0.1f;
|
||||
auto ret = layout[main_id]->on_event(&e);
|
||||
layout[main_id]->update();
|
||||
return ret == kEventResult::Consumed;
|
||||
|
||||
@@ -81,6 +81,9 @@ public:
|
||||
bool create(int width, int height, std::string name)
|
||||
{
|
||||
m_rtt.create(width, height);
|
||||
m_rtt.bindFramebuffer();
|
||||
m_rtt.clear();
|
||||
m_rtt.unbindFramebuffer();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -229,7 +229,7 @@ void ui::Canvas::resize(int width, int height)
|
||||
m_tex2.create(width, height);
|
||||
for (auto& l : m_layers)
|
||||
{
|
||||
l.m_rtt.create(width, height);
|
||||
l.create(width, height, "");
|
||||
}
|
||||
}
|
||||
bool ui::Canvas::create(int width, int height)
|
||||
|
||||
@@ -1769,9 +1769,6 @@ public:
|
||||
glGetIntegerv(GL_VIEWPORT, vp);
|
||||
glGetFloatv(GL_COLOR_CLEAR_VALUE, cc);
|
||||
|
||||
double w = (double)m_rtt.getWidth();
|
||||
double h = (double)m_rtt.getHeight();
|
||||
|
||||
glClearColor(1, 1, 1, 1);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
glViewport(0, 0, m_rtt.getWidth(), m_rtt.getHeight());
|
||||
|
||||
Reference in New Issue
Block a user