Tech ENABLE_LEGACY_OPENGL_REMOVAL - Refactoring of GLModel to automatically detect the data type to use into the index buffer in dependence of vertices count

This commit is contained in:
enricoturri1966 2022-03-09 11:51:02 +01:00
parent 46283cfde3
commit f8ce187262
16 changed files with 416 additions and 591 deletions
src/slic3r/GUI

View file

@ -1675,7 +1675,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
#if ENABLE_LEGACY_OPENGL_REMOVAL
const size_t indices_count = data.indices_count();
for (size_t i = 0; i < indices_count; ++i) {
indices.push_back(static_cast<IBufferType>(data.extract_ushort_index(i) + base_index));
indices.push_back(static_cast<IBufferType>(data.extract_index(i) + base_index));
}
#else
for (const auto& entity : data.entities) {