One interesting part is the z-fighting, which doesn’t happen with polygon offset fill.
1 2 3 4 | gl.polygonOffset(0.1, 0.1); gl.enable(gl.POLYGON_OFFSET_FILL); gl.drawElements(gl.TRIANGLES, this.indexBuffer.numIndices(), gl.UNSIGNED_SHORT, 0); gl.disable(gl.POLYGON_OFFSET_FILL); |
This is my solution to cg2 exercersise a02.1-2.4.
Leave a Reply