mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
Tech ENABLE_GLBEGIN_GLEND_REMOVAL - Adapt GLModel::Geometry index format in dependence of data size, where possible
(cherry picked from commit prusa3d/PrusaSlicer@4d2d77e99c)
This commit is contained in:
parent
6d4e0840bc
commit
874f39aac1
4 changed files with 21 additions and 10 deletions
|
@ -345,9 +345,9 @@ void GLGizmoFlatten::update_planes()
|
|||
for (size_t i = 0; i < plane.vertices.size(); ++i) {
|
||||
init_data.add_vertex((Vec3f)plane.vertices[i].cast<float>(), (Vec3f)plane.normal.cast<float>());
|
||||
if (index_type == GLModel::Geometry::EIndexType::USHORT)
|
||||
init_data.add_ushort_index(i);
|
||||
init_data.add_ushort_index((unsigned short)i);
|
||||
else
|
||||
init_data.add_uint_index(i);
|
||||
init_data.add_uint_index((unsigned int)i);
|
||||
}
|
||||
plane.vbo.init_from(std::move(init_data));
|
||||
// FIXME: vertices should really be local, they need not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue