ParameterGroupDataSharedPtr createStandardBumpmapParameterData( const SamplerSharedPtr & sampler ) { EffectSpecSharedPtr materialSpec = dp::fx::EffectLibrary::instance()->getEffectSpec("standardMaterialEffectBumped"); EffectSpec::iterator groupSpecIt = materialSpec->findParameterGroupSpec( std::string( "standardBumpmapParameters" ) ); DP_ASSERT( groupSpecIt != materialSpec->endParameterGroupSpecs() ); ParameterGroupDataSharedPtr parameterData = ParameterGroupData::create( *groupSpecIt ); DP_VERIFY( parameterData->setParameter( "bumpmapSampler", sampler ) ); DP_VERIFY( parameterData->setParameter<bool>( "bumpmapEnable", !!sampler ) ); return( parameterData ); }
ParameterGroupDataSharedPtr createStandardTextureParameterData( const SamplerSharedPtr & sampler ) { EffectSpecSharedPtr materialSpec = getStandardMaterialSpec(); EffectSpec::iterator groupSpecIt = materialSpec->findParameterGroupSpec( std::string( "standardTextureParameters" ) ); DP_ASSERT( groupSpecIt != materialSpec->endParameterGroupSpecs() ); ParameterGroupDataSharedPtr parameterData = ParameterGroupData::create( *groupSpecIt ); DP_VERIFY( parameterData->setParameter( "sampler", sampler ) ); DP_VERIFY( parameterData->setParameter<bool>( "textureEnable", !!sampler ) ); return( parameterData ); }