Switched to using GL_TRUE & GL_FALSE constants for more robustness
Added enabling and disabling of depth buffer while drawing to stencil