Improving Numerical Accuracy
Solutions to Coplanar Primitives
- Decal
glEnable(GL_DEPTH_TEST), glDepthMask(GL_FALSE)
- Draw underlying polygon
- Draw top polygon (decal)
glEnable(GL_DEPTH_TEST), glDepthMask(GL_TRUE)
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE)
- Draw underlying polygon
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE)