MCPcopy Index your code
hub / github.com/benfry/processing4 / tessellate

Method tessellate

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

Source from the content-addressed store, hash-verified

3584
3585
3586 protected void tessellate() {
3587 if (root == this && parent == null) { // Root shape
3588 boolean initAttr = false;
3589 if (polyAttribs == null) {
3590 polyAttribs = PGraphicsOpenGL.newAttributeMap();
3591 initAttr = true;
3592 }
3593
3594 if (tessGeo == null) {
3595 tessGeo = PGraphicsOpenGL.newTessGeometry(pg, polyAttribs, PGraphicsOpenGL.RETAINED,
3596 PGL.bufferStreamingRetained);
3597 }
3598 tessGeo.clear();
3599
3600 if (initAttr) {
3601 collectPolyAttribs();
3602 }
3603
3604 for (int i = 0; i < polyAttribs.size(); i++) {
3605 VertexAttribute attrib = polyAttribs.get(i);
3606 tessGeo.initAttrib(attrib);
3607 }
3608
3609 tessellateImpl();
3610
3611 // Tessellated arrays are trimmed since they are expanded
3612 // by doubling their old size, which might lead to arrays
3613 // larger than the vertex counts.
3614 tessGeo.trim();
3615 }
3616 }
3617
3618
3619 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