mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX:add new light for text shape
Jira: STUDIO-2623 Change-Id: I3a189154455040e8c2cb41ff8d8ac065661406ad (cherry picked from commit 5854839c8f552b136cca6b3ff75605fa1e696fd0)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user