Tech ENABLE_GLBEGIN_GLEND_REMOVAL - Refactoring to simplify client code of GLModel::Geometry

(cherry picked from commit prusa3d/PrusaSlicer@be6b6590be)
This commit is contained in:
enricoturri1966 authored and Noisyfox committed 2023-11-04 11:41:03 +08:00
1 parent 6eed22015a
commit 269fbaa60c
10 files changed
+41 -40

No files matched your search

+2 -2
View File
@@ -118,8 +118,8 @@ namespace GUI {
GLModel::Geometry init_data;
init_data.format = { GLModel::Geometry::EPrimitiveType::LineLoop, GLModel::Geometry::EVertexLayout::P2, GLModel::Geometry::EIndexType::USHORT };
init_data.vertices.reserve(4 * GLModel::Geometry::vertex_stride_floats(init_data.format));
init_data.indices.reserve(4 * GLModel::Geometry::index_stride_bytes(init_data.format));
init_data.reserve_vertices(4);
init_data.reserve_indices(4);
// vertices
init_data.add_vertex(Vec2f(left, bottom));