src/gl/compiler.cpp

changeset 193
b4beff48bb7a
parent 189
815fbaae9cb2
child 200
ca23936b455b
equal deleted inserted replaced
192:e6faeffed1d1 193:b4beff48bb7a
216 void iterateModelPolygons(Model* model, DocumentManager* context, Fn&& fn) 216 void iterateModelPolygons(Model* model, DocumentManager* context, Fn&& fn)
217 { 217 {
218 std::optional<ModelId> modelId = context->findIdForModel(model); 218 std::optional<ModelId> modelId = context->findIdForModel(model);
219 if (modelId.has_value()) 219 if (modelId.has_value())
220 { 220 {
221 PolygonCache* polygonCache= context->getPolygonCacheForModel(modelId.value()); 221 PolygonCache* cache = context->getPolygonCacheForModel(modelId.value());
222 if (polygonCache != nullptr) 222 if (cache != nullptr)
223 { 223 {
224 for (const gl::Polygon& polygon : polygonCache->getPolygons(context)) 224 for (const gl::Polygon& polygon : getCachedPolygons(cache, model, context))
225 { 225 {
226 fn(polygon); 226 fn(polygon);
227 } 227 }
228 } 228 }
229 } 229 }

mercurial