Пример #1
0
/**
 * Template method disables depth testing and/or writing to the depth buffer if the
 * shouldDisableDepthTest and shouldDisableDepthMask property is set to YES, respectively,
 * and set the depth function.
 */
void CC3MeshNode::configureDepthTesting( CC3NodeDrawingVisitor* visitor )
{
	CC3OpenGL* gl = visitor->getGL();
	gl->enableDepthTest( !_shouldDisableDepthTest );
	gl->setDepthMask( !_shouldDisableDepthMask );
	gl->setDepthFunc( _depthFunction );
}
Пример #2
0
/**
 * During normal drawing, establish 2D drawing environment.
 * Don't configure anything if painting for node picking.
 */
void CC3Billboard::applyMaterialWithVisitor( CC3NodeDrawingVisitor* visitor )
{
	super::applyMaterialWithVisitor( visitor );
	if (visitor->shouldDecorateNode()) 
	{
		CC3OpenGL* gl = visitor->getGL();
		gl->alignFor2DDrawingWithVisitor( visitor );
		gl->setDepthMask( !m_shouldDisableDepthMask );
	}
}