MCPcopy Index your code
hub / github.com/processing/processing / tessellate

Method tessellate

core/src/processing/opengl/PShapeOpenGL.java:2832–2861  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2830
2831
2832 protected void tessellate() {
2833 if (root == this && parent == null) { // Root shape
2834 boolean initAttr = false;
2835 if (polyAttribs == null) {
2836 polyAttribs = PGraphicsOpenGL.newAttributeMap();
2837 initAttr = true;
2838 }
2839
2840 if (tessGeo == null) {
2841 tessGeo = PGraphicsOpenGL.newTessGeometry(pg, polyAttribs, PGraphicsOpenGL.RETAINED);
2842 }
2843 tessGeo.clear();
2844
2845 if (initAttr) {
2846 collectPolyAttribs();
2847 }
2848
2849 for (int i = 0; i < polyAttribs.size(); i++) {
2850 VertexAttribute attrib = polyAttribs.get(i);
2851 tessGeo.initAttrib(attrib);
2852 }
2853
2854 tessellateImpl();
2855
2856 // Tessellated arrays are trimmed since they are expanded
2857 // by doubling their old size, which might lead to arrays
2858 // larger than the vertex counts.
2859 tessGeo.trim();
2860 }
2861 }
2862
2863
2864 protected void collectPolyAttribs() {

Callers 1

updateTessellationMethod · 0.45

Calls 9

newAttributeMapMethod · 0.95
newTessGeometryMethod · 0.95
collectPolyAttribsMethod · 0.95
tessellateImplMethod · 0.95
getMethod · 0.65
clearMethod · 0.45
sizeMethod · 0.45
initAttribMethod · 0.45
trimMethod · 0.45

Tested by

no test coverage detected