+void PrimitiveMesh::Buffer::FillRect(
+ float w, float h,
+ const glm::vec4 &color,
+ const glm::vec2 &pivot
+) {
+ Clear();
+ Reserve(4, 6);
+
+ vertices.emplace_back( -pivot.x, -pivot.y, 0.0f);
+ vertices.emplace_back(w-pivot.x, -pivot.y, 0.0f);
+ vertices.emplace_back( -pivot.x, h-pivot.y, 0.0f);
+ vertices.emplace_back(w-pivot.x, h-pivot.y, 0.0f);
+
+ colors.resize(4, color);
+
+ indices.assign({ 0, 2, 1, 1, 2, 3 });
+}
+
+
+void PrimitiveMesh::Update(const Buffer &buf) noexcept {