Merge branch 'master' of https://github.com/Prusa-Development/PrusaSlicerPrivate into et_opengl_es_rebase

This commit is contained in:
enricoturri1966 2022-08-18 12:51:55 +02:00
commit 2b996158d2
195 changed files with 22338 additions and 23455 deletions
src/slic3r/GUI

View file

@ -604,7 +604,7 @@ void GLModel::init_from(const TriangleMesh& mesh, bool smooth_normals)
const indexed_triangle_set& its = mesh.its;
Geometry& data = m_render_data.geometry;
data.format = { Geometry::EPrimitiveType::Triangles, Geometry::EVertexLayout::P3N3, GLModel::Geometry::index_type(3 * its.indices.size()) };
data.format = { Geometry::EPrimitiveType::Triangles, Geometry::EVertexLayout::P3N3 };
data.reserve_vertices(3 * its.indices.size());
data.reserve_indices(3 * its.indices.size());
@ -616,10 +616,7 @@ void GLModel::init_from(const TriangleMesh& mesh, bool smooth_normals)
// indices
for (size_t i = 0; i < its.indices.size(); ++i) {
const stl_triangle_vertex_indices& idx = its.indices[i];
if (data.format.index_type == GLModel::Geometry::EIndexType::USHORT)
data.add_ushort_triangle((unsigned short)idx(0), (unsigned short)idx(1), (unsigned short)idx(2));
else
data.add_uint_triangle((unsigned int)idx(0), (unsigned int)idx(1), (unsigned int)idx(2));
data.add_triangle((unsigned int)idx(0), (unsigned int)idx(1), (unsigned int)idx(2));
}
// update bounding box
@ -2215,7 +2212,6 @@ GLModel::Geometry diamond(unsigned int resolution)
}
#if ENABLE_LEGACY_OPENGL_REMOVAL
#if ENABLE_SHOW_TOOLPATHS_COG
GLModel::Geometry smooth_sphere(unsigned int resolution, float radius)
{
resolution = std::max<unsigned int>(4, resolution);
@ -2278,7 +2274,6 @@ GLModel::Geometry smooth_sphere(unsigned int resolution, float radius)
return data;
}
#endif // ENABLE_SHOW_TOOLPATHS_COG
#endif // ENABLE_LEGACY_OPENGL_REMOVAL
} // namespace GUI