Commit adf802cf authored by Mike Kremer's avatar Mike Kremer
Browse files

Don't update stencil buffer if node is hidden.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7802 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 27db8d05
......@@ -85,16 +85,20 @@ StencilRefNode::StencilRefNode (BaseNode* _parent,
void StencilRefNode::enter(GLState& _state, unsigned int _drawmode)
{
glPushAttrib (GL_STENCIL_BUFFER_BIT);
glStencilFunc (GL_ALWAYS, reference_, ~0);
glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE);
if(visible()) {
glPushAttrib (GL_STENCIL_BUFFER_BIT);
glStencilFunc (GL_ALWAYS, reference_, ~0);
glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE);
}
}
//----------------------------------------------------------------------------
void StencilRefNode::leave(GLState& _state, unsigned int _drawmode)
{
glPopAttrib ();
if(visible()) {
glPopAttrib ();
}
}
//----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment