void CC3ClipSpaceNode::initWithTag( GLuint aTag, const std::string& aName )
{
	super::initWithTag( aTag, aName );
	{
		setShouldDrawInClipSpace( true );
		setShouldUseLighting( false );
	}
}
示例#2
0
void CC3MeshNode::setShouldDrawInClipSpace( bool shouldClip )
{
	if (shouldClip != _shouldDrawInClipSpace) 
	{
		_shouldDrawInClipSpace = shouldClip;
		
		if (_shouldDrawInClipSpace) 
		{
			populateAsCenteredRectangleWithSize( CCSizeMake(2.0f, 2.0f) );
			setShouldDisableDepthTest( true );
			setShouldDisableDepthMask( true );
			setShouldUseLighting( false );
			setBoundingVolume( NULL );
		}
	}

	super::setShouldDrawInClipSpace( shouldClip );
}
示例#3
0
void CC3ShadowVolumeMeshNode::initWithTag( GLuint aTag, const std::string& aName )
{
	super::initWithTag( aTag, aName );
	_light = NULL;
	_isShadowDirty = true;
	_shouldDrawTerminator = false;
	_shouldShadowFrontFaces = true;
	_shouldShadowBackFaces = false;
	_shouldAddEndCapsOnlyWhenNeeded = false;
	_useDepthFailAlgorithm = false;
	setShouldUseLighting( false );
	setShouldDisableDepthMask( true );
	_shadowLagFactor = 1;
	_shadowLagCount = 1;
	setShadowOffsetFactor( 0 );
	setShadowOffsetUnits( -1 );
	_shadowVolumeVertexOffsetFactor = 0;
	_shadowExpansionLimitFactor = 100;
	setVisible( defaultVisible() );		// Use setter
	setEmissionColor( kCCC4FYellow );				// For terminator lines
}