setPolygonOffset method
Implementation
void setPolygonOffset(bool polygonOffset, [double? factor, double? units]) {
if (polygonOffset) {
enable(WebGL.POLYGON_OFFSET_FILL);
if (currentPolygonOffsetFactor != factor || currentPolygonOffsetUnits != units) {
gl.polygonOffset(factor!, units!);
currentPolygonOffsetFactor = factor;
currentPolygonOffsetUnits = units;
}
} else {
disable(WebGL.POLYGON_OFFSET_FILL);
}
}