src/gl/vertexprogram.cpp

changeset 120
8c9fff699241
parent 119
24275a4064f4
child 172
50f055543ff6
--- a/src/gl/vertexprogram.cpp	Wed Jul 28 08:23:09 2021 +0300
+++ b/src/gl/vertexprogram.cpp	Wed Jul 28 13:22:51 2021 +0300
@@ -102,15 +102,15 @@
 
 void VertexProgram::build(const Document *document)
 {
-	constexpr float size = 1;
 	constexpr glm::vec3 color = {0.0, 1.0, 1.0};
 	this->data.clear();
-	document->applyToVertices([&](const glm::vec3& vertex, const std::set<ldraw::id_t>&)
+	document->applyToVertices([&](const glm::vec3&, const VertexMap::VertexInfo& info)
 	{
 		reserveMore(this->data, ::countof(::markerGeometry));
 		for (const glm::vec3& point : ::markerGeometry)
 		{
-			this->data.push_back({vertex + point * size, color});
+			const glm::vec3 transformed = info.transform * glm::vec4{point, 1};
+			this->data.push_back({transformed, color});
 		}
 	});
 	this->buffer.bind();

mercurial