update yoga

This commit is contained in:
2019-08-14 22:49:45 +02:00
parent a08e8c5796
commit e959fb4d91
5 changed files with 14 additions and 14 deletions

View File

@@ -495,8 +495,8 @@ bool App::update_ui_observer(Node *n)
n->handle_on_screen(false, true);
n->m_on_screen = true;
}
glm::ivec4 c = glm::vec4((int)box.x, (int)(height / zoom - box.y - box.w), (int)box.z, (int)box.w) * zoom;
glScissor(c.x + off_x, c.y + off_y, c.z, c.w);
glm::ivec4 c = glm::vec4(box.x, (height / zoom - box.y - box.w), box.z, box.w) * zoom;
glScissor(floorf(c.x + off_x), floorf(c.y + off_y), ceilf(c.z), ceilf(c.w));
n->draw();
return true;
}
@@ -532,7 +532,7 @@ void App::draw(float dt)
glBindFramebuffer(GL_FRAMEBUFFER, 0);
#endif
glViewport(off_x, off_y, (GLsizei)width, (GLsizei)height);
glEnable(GL_SCISSOR_TEST);
//glEnable(GL_SCISSOR_TEST);
for (int i = 0; i < layout[main_id]->m_children.size(); i++)
layout[main_id]->m_children[i]->watch(observer);
//msgbox->watch(observer);