bool changeClip = geomNode->clipList() != m_currentClip;
QSGRenderer::ClipType clipType = QSGRenderer::NoClip;
if (changeClip) {
+ // The clip function relies on there not being any depth testing..
+ glDisable(GL_DEPTH_TEST);
clipType = updateStencilClip(geomNode->clipList());
+ glEnable(GL_DEPTH_TEST);
m_currentClip = geomNode->clipList();
#ifdef FORCE_NO_REORDER
glDepthMask(false);
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);
glEnable(GL_STENCIL_TEST);
- glDisable(GL_DEPTH_TEST);
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
glDepthMask(GL_FALSE);
if (stencilEnabled) {
m_clip_program.disableAttributeArray(0);
- glEnable(GL_DEPTH_TEST);
glStencilFunc(GL_EQUAL, clipDepth, 0xff); // stencil test, ref, test mask
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); // stencil fail, z fail, z pass
glStencilMask(0); // write mask
bindable()->reactivate();
- //glDepthMask(GL_TRUE); // must be reset correctly by caller.
} else {
glDisable(GL_STENCIL_TEST);
}