src/gl/compiler.cpp

changeset 193
b4beff48bb7a
parent 189
815fbaae9cb2
child 200
ca23936b455b
--- a/src/gl/compiler.cpp	Wed May 25 17:25:24 2022 +0300
+++ b/src/gl/compiler.cpp	Wed May 25 17:42:02 2022 +0300
@@ -218,10 +218,10 @@
 	std::optional<ModelId> modelId = context->findIdForModel(model);
 	if (modelId.has_value())
 	{
-		PolygonCache* polygonCache= context->getPolygonCacheForModel(modelId.value());
-		if (polygonCache != nullptr)
+		PolygonCache* cache = context->getPolygonCacheForModel(modelId.value());
+		if (cache != nullptr)
 		{
-			for (const gl::Polygon& polygon : polygonCache->getPolygons(context))
+			for (const gl::Polygon& polygon : getCachedPolygons(cache, model, context))
 			{
 				fn(polygon);
 			}

mercurial