FIX:add new light for text shape

Jira: STUDIO-2623
Change-Id: I3a189154455040e8c2cb41ff8d8ac065661406ad
(cherry picked from commit 5854839c8f552b136cca6b3ff75605fa1e696fd0)
This commit is contained in:
zhou.xu 2023-08-29 16:22:14 +08:00 committed by Lane.Wei
parent c631a69c32
commit bcd8c90b4f
3 changed files with 12 additions and 3 deletions

View file

@ -1083,6 +1083,7 @@ int GLVolumeCollection::load_object_volume(
GLVolume& v = *this->volumes.back();
v.set_color(color_from_model_volume(*model_volume));
v.name = model_volume->name;
v.is_text_shape = model_volume->get_text_info().m_text.empty();
#if ENABLE_SMOOTH_NORMALS
v.indexed_vertex_array.load_mesh(mesh, true);
#else
@ -1322,6 +1323,7 @@ void GLVolumeCollection::render(
glsafe(::glEnableClientState(GL_VERTEX_ARRAY));
glsafe(::glEnableClientState(GL_NORMAL_ARRAY));
shader->set_uniform("is_text_shape", volume.first->is_text_shape);
shader->set_uniform("uniform_color", volume.first->render_color);
shader->set_uniform("z_range", m_z_range, 2);
shader->set_uniform("clipping_plane", m_clipping_plane, 4);