add ComboBox node, add blend modes button in stroke panel, move brush shader code to ShaderManager and avoid the same shader being recompiled many times

This commit is contained in:
2017-11-12 03:02:40 +00:00
parent fa4e67617b
commit daaa7f9d48
16 changed files with 154 additions and 54 deletions

View File

@@ -171,6 +171,13 @@ void ShaderManager::u_int(kShaderUniform id, int i)
{
m_current->u_int(id, i);
}
Shader* ui::ShaderManager::get(kShader id)
{
auto it = m_shaders.find(id);
return (it == m_shaders.end()) ? nullptr : &it->second;
}
void ui::ShaderManager::u_float(kShaderUniform id, float f)
{
m_current->u_float(id, f);