22 #include "glcompiler.h" |
22 #include "glcompiler.h" |
23 #include "miscallenous.h" |
23 #include "miscallenous.h" |
24 #include "guiutilities.h" |
24 #include "guiutilities.h" |
25 #include "documentmanager.h" |
25 #include "documentmanager.h" |
26 #include "grid.h" |
26 #include "grid.h" |
|
27 #include "algorithms/invert.h" |
27 |
28 |
28 void checkGLError(HierarchyElement* element, QString file, int line) |
29 void checkGLError(HierarchyElement* element, QString file, int line) |
29 { |
30 { |
30 struct ErrorInfo |
31 struct ErrorInfo |
31 { |
32 { |
373 |
374 |
374 // TODO: try use interfaces to remove these special treatments? |
375 // TODO: try use interfaces to remove these special treatments? |
375 case LDObjectType::SubfileReference: |
376 case LDObjectType::SubfileReference: |
376 { |
377 { |
377 LDSubfileReference* subfileReference = static_cast<LDSubfileReference*>(object); |
378 LDSubfileReference* subfileReference = static_cast<LDSubfileReference*>(object); |
378 // TODO: move winding to Model and use it here |
379 auto data = subfileReference->inlinePolygons( |
379 auto data = subfileReference->inlinePolygons(m_documents, CounterClockwise); |
380 m_documents, |
|
381 m_renderer->model()->winding() |
|
382 ); |
380 |
383 |
381 for (LDPolygon& poly : data) |
384 for (LDPolygon& poly : data) |
382 compilePolygon (poly, index, info); |
385 compilePolygon (poly, index, info); |
383 break; |
386 break; |
384 } |
387 } |