fix color picker

This commit is contained in:
2018-03-08 22:36:12 +01:00
parent 0bdb879e76
commit 485c0ee933
4 changed files with 13 additions and 7 deletions

View File

@@ -907,7 +907,7 @@ void ui::Canvas::export_equirectangular_thread(std::string file_path)
m_tmp[i].clear({ 1, 1, 1, 1 });
glActiveTexture(GL_TEXTURE0); // TODO: maybe remove this line
m_sampler.bind(0);
m_sampler_mask.bind(0);
for (auto layer_index : m_order)
{
ShaderManager::u_float(kShaderUniform::Alpha, m_layers[layer_index].m_opacity);
@@ -915,7 +915,7 @@ void ui::Canvas::export_equirectangular_thread(std::string file_path)
m_plane.draw_fill();
m_layers[layer_index].m_rtt[i].unbindTexture();
}
m_sampler.unbind();
m_sampler_mask.unbind();
// copy result to cubemap
glBindTexture(GL_TEXTURE_CUBE_MAP, cube_id);
@@ -955,9 +955,9 @@ void ui::Canvas::export_equirectangular_thread(std::string file_path)
ui::ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho(-.5f, .5f, -.5f, .5f, -1.f, 1.f));
ui::ShaderManager::u_int(kShaderUniform::Tex, 0);
glBindTexture(GL_TEXTURE_CUBE_MAP, cube_id);
m_sampler.bind(0);
m_sampler_mask.bind(0);
m_plane.draw_fill();
m_sampler.unbind();
m_sampler_mask.unbind();
glBindTexture(GL_TEXTURE_CUBE_MAP, 0);
m_latlong.unbindFramebuffer();
{